next up previous 277
Next: Modification
Up: Group Expressions
Previous: Group Expressions


Indirection

It is sometimes convenient to store the strings specifying the objects to be used within a text file. The name of the text file can then be given in response to a prompt for a group expression, rather than giving a long list of explicit values. This is done by preceding the name of the text file with an up-arrow (``^'') character. For instance, the group expression ``^style.dat'' would result in the file style.dat being opened and the strings read from the file. Each line within the file is considered to be a group expression, and is processed in the same way as a group expression supplied directly. In particular, a text file may contain references to other text files. If the file style.dat contained the following two lines:

grid=1,colour(grid)=red,border=1
colour(border)=red,^labels.dat

then the strings grid=1, colour(grid)=red, border=1 and colour(border)=red would be returned to the application, and in addition the file labels.dat would be searched for further strings. This nesting of text files can go down to seven levels. Text files may also contain comments. Anything occurring after a ``#'' character is ignored. To ignore an entire line the # character must be in column 1 (any blanks in front of the # character are considered to be significant).


next up previous 277
Next: Modification
Up: Group Expressions
Previous: Group Expressions

POLPACK
Starlink User Note 223
D.S. Berry & T.M. Gledhill
26th February 2003
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council