Current Page:
NeXtMidas Training
Getting Started - Part 2
Advanced Results Parameters
Using Flag Strings
|
|
- Using Flag Strings
- Many NeXtMidas commands (such as
PLOT ) use the concept of flag strings.
- Flag strings are string representations of flag numbers.
- Flag strings are preferred over flag numbers because:
- Strings are more readable
- Allows new flags to be added or removed more easily.
- The pipe character (|) is used to separate flag strings.
nM> plot fftdemo /bg
nM> set reg.plot.readout "SHOW|ONTITLE|ONAXIS|X|Y"
- The tilde character (~) is often used to toggle a flag.
nM> set reg.plot.readout ~SHOW ! Toggles on -> off
nM> set reg.plot.readout ~SHOW ! Toggles off -> on
- The minus character (-) is used to remove a flag.
nM> set reg.plot.readout -ONTITLE
nM> set reg.plot.readout -VIEW
- The plus character (+) is used to add a flag.
nM> set reg.plot.readout +ONTITLE
- Flag strings modifiers like plus (+) and minus (-)
can be used in conjunction with the pipe (|) separator
nM> set reg.plot.readout -ONTITLE|+VIEW
- Deprecated: In the past it was possible to use the hex values to set
the flags (e.g. "
0X4786 "); this is deprecated since the hex values mean nothing
to someone reading your macro, and they are not backwards-compatible if a new mask option
is added.
- Coming soon: Enhanced ways of getting/setting mask values from
a macro. Also special identifiers
ALL (all options),
NONE (none of the options), and DEFAULT
(use default settings).
Java Experts Take Note: |
Most of the work for converting flags to Strings is done in the Parser
class in the methods mask and mask2s .
|
|
|
|