Creating Strings
Strings are created by assigning a string name to a character string
with the TE or ASK1
command. A character string
consists of alphanumeric and printable characters. When creating strings,
keep in mind the following guidelines:
Strings can be nested, allowing one string to use another string.
For example, the string DISPIMAGE defined as
If the string contains a value that will change, an additional
pound sign allows the string to be expanded when it is run. For
example, if LL will change, type a pound sign before LL so
the string DISPIMAGE becomes
You can also assign strings to a single letter. To run these strings, press the Ctrl key and the appropriate letter. Strings can also be assigned to the function keys (F keys) with an Alt, Shift, or Ctrl combination. This is useful if you enter certain commands often.
Using Global Strings
A string whose first character is a question mark (?) is called
a global string. Global strings are useful for defining strings
you don't want accidently deleted. They are not saved in user-defined
string tables, but remain in the string table until you delete them.
Deleting Strings and Global Strings
The TD command deletes individual strings,
strings with a common prefix, or all the strings in the string table.
When you delete all the strings in the string table, two system
strings (H and Y) and any global strings remain. Global strings are stored
in the string table and will remain unless you delete them using
TD ALL GLOB.
Some McIDAS commands write global strings to the string table. If you have problems using the string table, clear out your string table with the TD ALL GLOB command.
Saving and Restoring String Tables
Each McIDAS session has its own string table which stores strings
until they are saved into a user-defined string table with the
TU SAVE command. The project number and the initials of the user
who created it are saved with each user-defined string table.
A string table can contain up to 256 strings, a workstation can
store up to 512 string tables. When a user-defined string table
is restored with the TU REST command, a copy of the strings from
the user-defined string table is written into the string table.
When a string table is saved, any existing table with the same
name and user initials is overwritten.
To restore a user-defined string table within a McIDAS session, specify its name and user initials with the TU REST command. You cannot delete another user's string tables. When a string table is restored, the default table is overwritten and unsaved strings are lost (except global strings).
Determining the Current String Table
The strings contained in the string table depend on how the
McIDAS session was started. If a McIDAS session was started:
Incrementing String Values
The REPEAT command increments variables
in a command by running it multiple times until a specific value is
reached. For example, you can use the REPEAT command with a string
containing the IMGDISP command to display
images in multiple frames with one command.