#define

 
Syntax


#define IDname 

     or

#define IDname   expression

     or

#define IDname(param,...)  expression (param,...)

Description


This statement directs the pre-processor to replace the word IDname with expression in the file before compiling.  This replacement can also contain parameters that will be replaced in corresponding positions as defined in expression.

It may also be used to control #ifdef

Example

#define COMPILETHIS



#ifdef COMPILETHIS

#endif
Differences from other BASICs

  • similar function in PBASIC
  • no equivalent in Visual BASIC, but may be done with C-pre-processor
See also