1 | command SDEF <name>[;<value>] |
---|
2 | ============ |
---|
3 | |
---|
4 | key: define symbol |
---|
5 | |
---|
6 | Defines a new symbol. If the qualifier /GLOBAL is entered it is created |
---|
7 | in the global symbol set, otherwise in the current local symbol set. |
---|
8 | The symbol value is initialized to <value>, if <value> is omitted, the |
---|
9 | symbol is initialized to a zero-length string. The length of a symbol name |
---|
10 | is restricted to 15 characters, the length of the symbol value to |
---|
11 | 80 characters. |
---|
12 | |
---|
13 | The local symbol set is saved and restored on each command level, the |
---|
14 | global set is not. That means, the global symbol set is accessable |
---|
15 | (reading and writing) from every command level, while the local set |
---|
16 | is accessable only from the current level. Each call of a command file |
---|
17 | saves the current local set and creates a new (empty) one, each |
---|
18 | RETURN statement deletes the local symbol set and restores the parent one. |
---|
19 | |
---|
20 | If a symbol is defined in both symbol sets, the definition of the |
---|
21 | local set takes preference to the definition of the global set. |
---|
22 | |
---|
23 | |
---|
24 | parameters: |
---|
25 | |
---|
26 | <name> --- parameter type: string |
---|
27 | Name of new symbol. The length of the name is restricted to 15 |
---|
28 | characters. |
---|
29 | |
---|
30 | <value> --- parameter type: string |
---|
31 | Initialization value of new symbol. The length of <value> is |
---|
32 | restricted to 80 characters. |
---|
33 | |
---|
34 | |
---|
35 | qualifiers |
---|
36 | |
---|
37 | /GLOBAL |
---|
38 | The symbol is created in the global symbol set (see above). |
---|
39 | |
---|
40 | /REPLACE |
---|
41 | A previously defined symbol of the same name in the same set is |
---|
42 | deleted before creating the new symbol. |
---|
43 | |
---|
44 | /CHECK |
---|
45 | If the symbol is already defined, the SDEF command is ignored. |
---|
46 | |
---|
47 | |
---|
48 | Examples: |
---|
49 | |
---|
50 | SDEF NEWSYM ! defines local symbol "NEWSYM" |
---|
51 | |
---|
52 | SDEF NEWSYM 1 ! defines local symbol "NEWSYM" and initialises |
---|
53 | ! it to "1" |
---|
54 | |
---|
55 | SDEF/GLOBAL VAL TST ! defines global symbol "VAL" and initialises |
---|
56 | ! it to "TST" |
---|
57 | |
---|