On the code at the bottom, what's the meaning of the ! operator in if(!LibBase)... ?
I tried to find it on some C book I have but ! seems to be the NOT operator. From what I understand the goal would be to evaluate the returned value of the function OpenLibrary and if not zero than the statements after If get done other wise the else part get's done (the basic If thing...).
But from the code below it's evaluating the negation of the
returned Libase ?! Obviously this doesn't make sense so I'm missing something here.
P.S. No, I'm still not learning C, I'm just reading some parts of the Rom Kernel Manuals on my DevCD and some of the examples are in C only...
struct Library *LibBase; /* Global: declare this above main() */
main()
{
LibBase = OpenLibrary("library.name",version);
if(!LibBase) { /* Library did not open, so exit */ }
else { /* Library opened, so use its functions */ }
}