Tables and axes > Include and substitution > Grid tables > #def with grids
 
#def with grids
You do not use #def with grids themselves, but there can be times when your job contains #def statements and grids. When this happens, you must be careful about the letters you use for symbolic parameters. If you use the same letters for symbolic parameters on a #def statement as in a grid axis, you job either fails at the compile stage or produces incorrect tables.
If you use the same letter for a column symbolic parameter on #def and in a grid axis, the specification from #def overrides the specification in the grid. If the two parameters refer to different columns your grid table will contain incorrect data for that column. For example, if you specify #def col(a)=145 and then write n01text;col(a)=167 in the grid axis, Quantum will create the element using column 145.
With punch(p)=, the specification from #def does not carry forward to grid axes. If you specify punch(p) on #def but not in a grid axis your run will fail at the compile stage with the message ‘grid axis with no substitution’, even if #def declares the punch letter you have used in the grid. This also happens if you specify punch(p) with #def and in a grid axis, and you use the same letter to represent the punch, since Quantum ignores the specification in the grid.
With punches you must use different letters in the grid and on #def.
Although grids do not normally use text symbolic parameters, if a grid contains the notation &txt, where txt is declared on a #def statement, substitution will take place. For example, specifying #def txt=Brand A and then writing n01&txt in a grid axis will generate an element in the grid labeled Brand A.
See also
Grid tables