Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > SDL script for generating code > Keywords > Overview of keywords (SDL script) — All keywords
  
Overview of keywords (SDL script) — All keywords
The following keywords can be used in SDL script.
%and
Logical AND operator for evaluating conditions.
%comment
Generates an item property as a code comment.
%comment_text
Generates text as a code comment.
%custom
Returns the value of a standard or extended property for the current item.
%else
Optional keyword that specifies statements to run when the condition is false in an if...then...else statement.
%endfile
Specifies that code is no longer generated to the active file. Closes the active file and redirects output to the previous file on the output stack.
%endfor
Specifies end of For loop.
%endif
Specifies end of if...then...else statement.
%endwhile
Specifies end of While loop.
%error
Adds an error message to the ACS Final Synchronization Log.
%exit
Optional keyword that exits a For loop.
%file
Specifies the file to which code is generated.
%fileexists
Tests whether a file exists.
%for
Specifies start of For loop, which provides iterative processing of items liked to the current item, or iterative processing of items in a list.
%function
Calls state machine generation functions.
%getchar
Returns the character that is in a specified position.
%getlength
Returns the length of a string.
%getlist
Gets the items from a global list.
%getlocallist
Gets the items from a local list.
%getlocalvar
Gets the value of a local variable.
%getparam
Gets the value of a local variable that has been passed as a parameter to a called generation template.
%getvar
Gets the value of a global variable.
%if
Specifies the condition in an if...then...else statement.
%inlist
Searches for the current item in a global list.
%inlocallist
Searches for the current item in a local list.
%isin
Searches for a substring in a string.
%isnumeric
Evaluates whether a variable can be interpreted as a numeric.
%lcustom
Returns the value of a standard or extended property for the current item. The value is returned as an all lowercase string.
%list
Declares a global list.
%load
Loads a generation template.
%locallist
Declares a local list variable.
%localnumeric
Declares a local numeric variable.
%localstring
Declares a local string variable
%matchcase
Evaluates whether the case and characters of a string match the case and characters of another string.
%numeric
Declares a global numeric variable in a Generate.sdl template.
%or
Logical OR operator for evaluating conditions.
%param
Specifies local variables to pass as parameters when loading a generation template.
%separator
Optional keyword that specifies a separator for delimiting iterations of a For loop.
%setcustom
Sets the value of the current item's standard or extended property.
%setlist
Sets the value of a global list.
%setlocallist
Sets the items in a local list.
%setlocalvar
Sets the value of a local variable.
%setparam
Sets the value of a local variable that has been passed as a parameter to a called generation template.
%setvar
Sets the value of a global variable.
%string
Declares a global string variable in a Generate.sdl template.
%then
Specifies statements to run when the condition is true in an if...then...else statement.
%ucustom
Returns the value of a standard or extended property for the current item. The value is returned as an all uppercase string.
%warning
Adds a warning message to the ACS Final Synchronization Log.
%while
Specifies the start of a While loop.