NEW VALUE
Value Item | |||
---|---|---|---|
NEW | SET | ATTRIBUTES | MESSAGES |
You can use the NEW VALUE command to create a new value item.
The following parameter has the same meaning for all NEW VALUE
commands.
- name
- The name to identify the value item. If an asterisk is used, a name is generated and returned in the variable #new.
NEW VALUE name [ tmode tstep tstop ] [ /G ]
NEW VALUE name tmode|* tstep|* tstop|* /String str [ /G ]
NEW VALUE name tmode|* tstep|* tstop|* /Number num [ /G ]
Create a new timer value item, string value item or number value item.
- tmode
- The timer mode. Turn the timer on (
1
|ON
) or off (0
|OFF
). If the timer is switched on, timer messages are sent at tstep intervals.
- tstep
- The interval at which timer messages should be sent in milliseconds.
- tstop
- The number of milliseconds for which the timer should run. If this value is 0, then the timer runs indefinitely.
- str
- The string to initialize the value item with.
- num
- The number to initialize the value item with.
- /G
- Garbage collection. If specified, the item is automatically deleted when exiting the macro
You can change the tmode tstep and tstop parameters later using the TIMER command.You can also create value items for storing vectors and arrays. The numerical values are stored in floats unless the option /Double is used. In contrast to the string and number value items, you cannot assign data with the NEW VALUE
command for vectors and arrays (see SET VALUE
for ways to assign data).
The following option is valid in conjunction with the options /Vector and /Array.
- /Double
- The values are stored in 64-bit floating-point numbers, otherwise they are stored in 32-bit floating-point numbers.
NEW VALUE name tmode|* tstep|* tstop|* /Vector len [ /Double ] [ /G ]
Create a new vector value item with len values.
- len
- The length of the vector.
NEW VALUE name tmode|* tstep|* tstop|* /Array rows cols [ /Double ] [ /G ]
Create a new array value item with rows rows and cols columns.
- rows
- The number of rows in the array.
- cols
- The number of columns in the array.