Data editing > Expressions > Logical expressions > Comparing variables and arithmetic expressions to a list > Naming lists
 
Naming lists
Quick reference
To assign a name to a list of values, type:
definelist name=(list)
in the edit section. Where list is a comma-separated list of numbers, ranges or code strings enclosed in dollar signs.
If you have a list that is used more than once you can give it a name and refer to it by that name instead of typing in the complete list each time. To name a list, write:
definelist name=(list)
For example:
definelist fveg=(205:207,210,215,220)
To use a defined list, replace the list with the name:
c(145,147) .in. fveg
Note You cannot use a definelist in an .in. statement with a data-mapped variable. Quantum cannot handle this syntax because it needs to read the data in the definelist differently for data-mapped variables (as strings instead of column punches) but does not know at the time the definelist is parsed whether it will be used with a data-mapped variable.
See also
Comparing variables and arithmetic expressions to a list