| Playing with Scan Codes |
| QTIPS - Compiling Protection Code |
| QTIPS - Invalid Code and Command |
| QTIPS - Code/Command Help |
| Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd) |
RevMedia FKB
| Document | V4I6A3 |
| Title | QTIPS - Handy Compiler Options |
| Keywords | COMPILER |
| Text | Peter Walsh of Turner Information SYSTEMS strikes again WITH this QTip about pre compiler directives "The R/Basic pre compiler supports a very useful undocumented feature It allows conditional compilation for example: #define TESTMODE #ifdef TESTMODE print variable1 print variable2 #endif The #define is similar to an EQUATE but is a directive to the pre compiler only Thus the two print statements above will always be executed However if the #define is commented out the print statements will be treated similar to comments and will be stripped FROM the source code before the compiler sees it and thus will not even appear in the OBJECT code It is great for testing The syntax is similar to 'C' pre compiler directives However there does not appear to be a #else but there is a #ifndef (if not defined) This has been tested in Arev 2 12" Sprezzatura have tested this in version 3 0 as well In addition to the features described by Peter the pre compiler ALSO supports #undefine which permits the unsetting of a flag previously set by #define (Volume 4 Issue 6 Page 6) |
Page last modified: 30/01/03