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) — Keywords for working with variables
  
Overview of keywords (SDL script) — Keywords for working with variables
Declaring a variable:
%localnumeric
Declares a local numeric variable.
%localstring
Declares a local string variable
%numeric
Declares a global numeric variable in a Generate.sdl template
%string
Declares a global string variable in a Generate.sdl template
Setting a variable:
%setlocalvar
Sets the value of a local variable.
%setvar
Sets the value of a global variable.
Getting the value of a variable:
%getlocalvar
Gets the value of a local variable.
%getvar
Gets the value of a global variable.
Working with passed parameters (passed when loading generation templates):
%param
Specifies local variables to pass as parameters when loading a generation template.
%setparam
Sets the value of a local variable that has been passed as a parameter to a called generation template.
%getparam
Gets the value of a local variable that has been passed as a parameter to a called generation template.
Miscellaneous:
%comment_text
Generates text as a code comment.
%getchar
Returns the character that is in a specified position.
%getlength
Returns the length of a string.
%isin
Searches for a substring in a string, where either string can be a variable.
%matchcase
Evaluates whether the case and characters of a string match the case and characters of another string.