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 item lists
  
Overview of keywords (SDL script) — Keywords for working with item lists
Declaring a list:
%list
Declares a global list.
%locallist
Declares a local list variable.
Setting items for a list:
%setlist
Sets the items in a global list.
%setlocallist
Sets the items in a local list.
Getting items from a list:
%getlist
Gets the items from a global list.
%getlocallist
Gets the items from a local list.
Searching for the current item in a list:
%inlist
Searches for the current item in a global list.
%inlocallist
Searches for the current item in a local list.
Using For loop to iterate through a list:
For loop
iterates through items in a list.
%for
Specifies start of a For loop.
%endfor
Specifies end of a For loop.
%exit
Optional keyword that exits a For loop.
* 
The following operators are used for evaluating list intersections and unions:
+
Evaluates the union of two lists.
*
Evaluates the intersection of two lists.