•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  STG Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : GFA-Basic Editor
Author      : Lonny Pursell
Version     : GBE.HYP v3.74 (12/31/2023)
Subject     : Programming/Documentation
Nodes       : 171
Index Size  : 4296
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Default
@help       : STG Help
@options    : +g -i -s +z
@width      : 75
@hostname   : THING   
@hostname   : STRNGSRV
@hostname   : HIGHWIRE
@hostname   : CAB     
View Ref-FileBuild application based on whether it is running Interpreted or Compiled.
The idea is to reduce the size of the binary by removing unused code segments.
The following example would generate a larger binary:

Valid parameters for #IFM: make         ma
                           run          ru
                           compile      co
                           interpreted  in

Example #1: (typical code used to determine how the program is running)

IF BYTE{BASEPAGE+256}=96
  PRINT "compiled"
ELSE
  PRINT "interpreted"
ENDIF

This generates code which is never executed but remains in the binary.
Thus making it larger and slower in some cases.

Example #2: (same code using the preprocessor commands)

REM #IFM CO
PRINT "compiled"
REM #EIM IN
PRINT "interpreted"
REM #FIM

Only the one PRINT statement ends up in the compiled binary as the rest of the
code is removed or unneeded.  The result is a smaller and faster binary.