BCX Console Demonstration Program S124.bas

 ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ' BCX Version 1.87 adds more powerful MACRO capabilities using CONST's
 ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 CONST ByeBye = "Goodbye!"     'ByeBye is a string constant
 
 CONST STRINGPTR(A) = (char*)A 'A MACRO with one argument
 
 DIM pA AS LPSTR ' allocate a 32 bit string POINTER variable
 DIM pB AS LPSTR ' ...           ditto         ...
 
 ' Try out our new MACRO
 
 pA = STRINGPTR("Hello!") 'pA points to "Hello!"
 pB = pA + 1              'pB points to "ello!" (example of POINTER arithmetic)
 
 '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ' Prepending or Appending the "$" character fools BCX into
 ' treating VARIABLES and CONST's as STRINGS
 '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 PRINT $pA     ' Displays "Hello!"
 PRINT $pB     ' Displays "ello!"
 PRINT $ByeBye ' Displays "Goodbye!"