next up previous contents index
Next: Specifying Elements in Up: MIDAS Data Structures Previous: Specifying a Descriptor

Specifying Keywords

 

As is the case for descriptors, keywords also have a name (max. 8 chars.), a type and a length (i.e. no. of elements). However, this length is fixed, and once the keywords are created with a certain size, they cannot be extended. The possible types for keywords are: real, integer, character and double precision. Like for descriptors there are no mixed types possible.
In order to write a value to a keyword, the same format as for descriptors is used.

WRITE/KEYWORD INPUTC/C/1/8 AKeyword

This command would write the ASCII string AKeyword into the character keyword INPUTC and

WRITE/KEYWORD AZTEC/I/1/2 17,-22

would write the values 17 and -22 into the integer keyword AZTEC (elements 1 and 2).

Single keyword elements can also be written in a more direct way, via
key = value, e.g. to set the 12th element of keyword INPUTR to 1.234, use
inputr(12) = 1.234
The value can also be an expression made up of constants and elements of any MIDAS data structure, see the subsection gif.

Some of the commands dealing with keywords are:
READ/KEYWORD, WRITE/KEYWORD, SHOW/KEYWORD, DELETE/KEYWORD, COPY/KEYWORD,
COMPUTE/KEYWORD
. Keywords and descriptors can be copied to each other via COPY/KD and COPY/DK.



Rein Warmels
Mon Jan 22 12:06:29 MET 1996