Article # 3, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Using #define and @define correctly in GOC.
Q. I get a warning in the Borland compiler about the variable not being used in the following code: @define DEBUG .. Boolean error; error = FileWrite( .... ); #ifdef DEBUG if ( error ) { ... } #endif A. The problem is that the @define does not necessarily mean that DEBUG is #define'd. You need to do both an @define DEBUG and a #define DEBUG for the code to be compiled properly. Note: @define (and its ilk) are constructs of the Goc preprocessor #define (and its ilk) are constructs of the C compiler Generally you shouldn't try to mix and match these as was done in the example above.