Programming Guide : 2. Writing Scripts and Procedures : Compiler Limitations
 
Share this page                  
Compiler Limitations
A compilation unit (that is, an entire 4GL source file, including all its included files) should not contain more than:
2728 blocks
Each of these items constitutes a block: the compilation unit itself, each field script, event block or initialize block with a declare statement, local procedure, or method.
32767 integer literals
This limit includes integer literals generated internally by the 4GL compiler.
32767 floating-point literals
32767 string literals inside expressions
32767 string literals outside expressions
This limit includes string literals generated internally by the 4GL compiler.
A single execution unit, a local procedure, method, global procedure (excluding its local procedures) or frame (excluding its local procedures), should not contain more than 32767 variables. This limit includes temporary variables generated internally by 4GL.
The OpenROAD compiler imposes a limit on the complexity of a single expression. The limit may be violated in complex conditions of if, for, and while statements, especially if the condition contains several groups of comparisons that have both AND and OR clauses. For example, a statement like the following can cause a compilation error if there is insufficient memory:
if a = 't' and b = 'h' and c = 'e' and d = 'n'
or a = 'w' and b = 'a' and c = 'n' and d = 'q'
or a = 's' and b = 'g' and c = 'r' and d = 'k'
or a = 't' and b = 'h' and c = 'e' and d = 'n'
then
    callproc found_it;
endif;
You can avoid the compilation error by splitting the complex if statement into multiple if and elseif statements. For example:
f = false;
if a = 't' and b = 'h' and c = 'e' and d = 'n'
    then f = true;
elseif a = 'w' and b = 'a' and c = 'n' and d = 'q'
    then f = true;
elseif a = 's' and b = 'g' and c = 'r' and d = 'k'
    then f = true;
elseif a = 't' and b = 'h' and c = 'e' and d = 'n'
    then f = true;
endif;
if f = true then
    callproc found_it;
endif