Skip to content

COMPILE

FUNCTION

This command enables a script to compile a Thoroughbred Basic public program. If the command is successful, the script can call the program.

SYNTAX

COMPILE cpp_string$ AS program-name
[ERROR PROCESS IS procedure]
cpp_string$
is an uncompiled Thoroughbred Basic program in the LIST format described below.
program-name
is the name of the compiled program.
procedure
the name of a procedure to perform.

NOTES

  • This command enables you to dynamically generate an executable public program from within any script.
  • The cpp-string$ has the following format:
Byte(s) Description
1 - 8 Name of program
9 - 10 Length of first Thoroughbred Basic program line; unsigned binary
11 - n First Thoroughbred Basic program line in listed format
Length and listed format repeat as necessary
  • The program is automatically ADDRed.

SEE ALSO

Descriptions of ADDR, CALL, and CPP in the Thoroughbred Basic Language Reference.

From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF