 | Why should you want to know which extensions are in a compiler? A program runs because they are there, or it doesn't because they are not. A good practice is to list the words that are needed in comment. With [DEFINED] you don't have to, because they are in the program.
In C it isn't clear either which words are supported. Some feature strdup(), some don't.
> It would also require asking for each word separately, and if a system > wanted to do on-demand loading of extensions, it would have to > organize each word separately. Lots of effort for the programmer and > the system implementor. No. If the first word of a wordset fails, you load the file. The next [DEFINED] would act accordingly or drop out if it *still* isn't defined. I don't think I would bother with the next words. Why? I loaded the thing didn't I? After
#include
I won't check whether fclose() is defined as well, don't I..?
For all kinds of constants (e.g. STACK-CELLS) I prefer constants to environmental queries. Faster and easier to handle.
Hans Bezemer
|
|