basic command

The basic BASIC program invokes the BASIC and/or FlashBASIC compiler, which translates the specified source code into executable object code with case-sensitivity in effect. This causes the compiler to only accept uppercase keywords.


basic file.reference itemlist* {(options)}


options a Displays object code generated by the FlashBASIC compiler.
  b Turns on array bounds checking when used with the o option level 1-9. Without this option in effect, situations such as array subscripts out of range, which result in a fatal BASIC debugger abort, ignores the condition, possibly resulting in a monitor halt. This option is not necessary when using the o option level 0 (the default), or when not using the o option at all.
  c Compresses the object by suppressing the end-of-line (EOL) opcodes from the object code item. This option is designed to be used with debugged and cataloged programs. Because the EOL opcodes are used to count lines for error messages, any run-time error message in a program compiled with the c option indicates the error is on line 0. Additionally, the c option removes the ability to single-step with the BASIC debugger.
  d Prevents the run-time d option from entering the debugger.
  e Lists only error lines encountered during the compilation of the program. The listing indicates line number in the source code item, the source line itself, and a description of the error associated with the line.
  f When used with the o option, generates floating point arithmetic.
  h Hides FlashBASIC object code from other users. In other words, the code is not shared.
  i Lists lines from any included program as part of the listing. If used with the l option, the source program listing, the included lines are indicated by a plus sign after the line number.
  k Keeps a shared FlashBASIC module loaded.
  l Generates a line-by-line listing of the source program during compilation. Error lines with associated error messages are indicated. When the l option is used, the asterisk does not display. Each line of the listing takes place at the asterisk.
  m Generates a program map of the descriptor table and correlates source code lines to generated object code frames. Each variable in the program is listed along with its decimal offset.
  o Produces FlashBASIC optimized code.
Note: If any module in a program is compiled with the 0 option, than all modules in that program must also have been compiled with the o option.
  p Routes all output generated by the compilation, except the cross-reference listing, to the printer, via the spooler.
  s Suppresses generation of a symbol table. The symbol table is used exclusively by the FlashBASIC debugger for reference; therefore, it needs to be kept only if the user uses the debugger.
  x Creates a cross-reference of all the labels and variables used in the FlashBASIC program and stores this information in the bsym file, which must exist before using. The x option first clears data in the bsym file, then creates an item for every variable and label used in the program, using the variable or label name as the item-ID. After creating the cross-reference items, attribute one contains the line numbers where the variable or label is referenced; each line number is a value. The line number where a label is defined, or where the value of the variable is changed is preceded by an asterisk. If the variable names and labels are in both uppercase and lowercase, the D-pointer for the bsym file-defining item should not have the s option.
  w Optimizes without source when used with the o option. This allows optimizing programs without source code.
Note: The normal dictionary object statistics are not updated when this option is used.
  y Allows multiple FlashBASIC compiles concurrently. Normally, each FlashBASIC compile attempts to set BASIC lock 49 to keep multiple compiles from dramatically slowing down the machine. The y option avoids this logic.
Note: The program, which results from a basic command, is not necessarily case sensitive. This is a run-time option that can be set in the program with a casing on or at TCL with a case-on.

The compile command allows keywords to be in uppercase or lowercase. For example, with case sensitivity in effect, the variables TOTAL and total are treated as two separate variables.


Compiles the program testprog in the bp file. The object code is placed in the dictionary of bp.

basic bp testprog