knowledge-database (beta)

Current group: comp.lang.forth

RfD: extension queries

RfD: extension queries  
Hans Bezemer
From:Hans Bezemer
Subject:RfD: extension queries
Date:20 Jan 2005 01:51:00 -0800
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
   

Copyright © 2006 knowledge-database   -   All rights reserved