Syntax Errors
Syntax errors occur when the syntax of the CXL language is not followed when coding a script. This could be due to a mistake in typing or an omission of some required part of a statement such as the ending semicolon (;). Omitted closing characters in pairs of parentheses, curly brackets {}, quotation marks, and square brackets [] are also common syntax errors. Map Designer flags these errors with a message as in the following example.
Example
$1 ~ /Company:/ {coname = trim(substr($0, length($1)+1, length($0)); }
Error near line 18, near token ‘;’: syntax error (25513)
The message usually pinpoints the line containing the error and the character that follows the point where the problem was first detected. In this case, there is a missing parenthesis before the semicolon (;). Note that the error position symbol ^ never points directly to the error, but to some character, usually the first, following the error.
The Map Designer may also log a somewhat less informative message when the exact position of the syntax error cannot be determined. Such as:
Error near line 27, near token `': syntax error (25513)
This indicates an error at the end of the program such as an omitted closing }.
Last modified date: 02/01/2024