Tables and axes > Include and substitution > Assigning global values to symbolic parameters
 
Assigning global values to symbolic parameters
Quick reference
To assign global values to symbolic parameters, type:
#def [col(letter1)=number1] [;punch(letter2)='code'] [;name=text]
where number1 is a two-digit number in the range 00 to 99.
*def is an alternative to #def.
More information
Occasionally a group of includes will have the same column, code or text parameter in common, even though they can differ in all other aspects. You can either enter all values separately on each include, in which case they refer only to the parameters in the file included, or define the common parameter values on a #def statement so they remain operative until overwritten by another #def.
The format of #def is:
#def [col(a)=cc][;punch(b)='p'][;txt=text]
where:
col, punch and txt are optional, depending on the value to be defined.
a and b are the parameters whose values are to be defined.
cc is a column number.
p is a code.
text is a string of text.
#def can also be writted as *def. The examples below #def.
For example, to define a column that is common to a group of include files, write:
#def col(b)=157
Symbolic parameters for text shows how to use symbolic text to write more efficient code. Continuing that example, suppose that you have a number of include files for each area of London:
#include tab1;punch(p)='1';area=Central London
#include tab2;punch(p)='1';area=Central London
#include tab3;punch(p)='1';area=Central London
#include tab1;punch(p)='2';area=Outer London
#include tab2;punch(p)='2';area=Outer London
#include tab3;punch(p)='2';area=Outer London
By using #def, you can rewrite this more efficiently:
#def punch(p)='1';area=Central London
#include tab1
#include tab2
#include tab3
#def punch(p)='2';area=Outer London
#include tab1
#include tab2
#include tab3
See also
Include and substitution