RATS 10.1
RATS 10.1

Miscellaneous /

Compiled Sections and Compile Mode

Home Page

← Previous Next →

Ordinarily, RATS executes each instruction in order, and finishes with one instruction before moving on to the next. However, PROCEDUREs, loops (DO, WHILE, etc.), IF-ELSE statements, and the symbols “{”and “}” all put RATS into compile mode (thus these structures are called compiled sections).

 

In compile mode, RATS “compiles” or processes all instructions in the block, but does not execute them immediately. It only begins executing the block when it encounters an END instruction or “}” symbol signaling an end to the block (or, in the case of procedures, an EXECUTE instruction calling the procedure).

 

When compiling and executing a block, RATS prefixes each instruction name with numbers in parentheses indicating the location of the instruction within the compiled section. If RATS encounters an error in a compiled block, it will use the location numbers to indicate the point at which the error occurred.

 

As mentioned above, the symbol “{” tells RATS to begin a compiled section. RATS will continue compiling instructions until it sees a matching “}” symbol. These are most commonly used in IF instructions, or with FIND, but you can use them just about anywhere you like.


 


Copyright © 2025 Thomas A. Doan