ProvideX V8.20 > Language Reference > 2. Directives
209
MNEMONIC Directive
          Define File Command Sequence
Format
MNEMONIC [(chan)]mnm_name$=esc_sequ$
Where:
chan
Channel or logical file number for which the mnemonic is defined.
mnm_name$
Valid mnemonic name, enclosed in apostrophes. String expression.
esc_sequ$
Escape or command sequence required by the file/device in order
to process the mnemonic. String expression.
Description
Use the MNEMONIC directive to define additional mnemonics for files and/or
devices. Once you define a mnemonic for a given logical file number, it stays active
until the channel is closed. When ProvideX encounters a user-defined mnemonic in a
PRINT or INPUT statement, it converts the mnemonic to the character string in the
escape sequence.
Under WindX
WindX supports the use of this MNEMONIC directive via the [WDX] tag. After
opening a channel across a WindX connection, all declared mnemonics (except '*R'
and '*X') are sent automatically to the WindX workstation. ProvideX considers the
'*R' and '*X' mnemonics to be local to the server unless you use the [WDX] tag in
declaring them. ( '*R' declares an operating system command to execute on channel
close, and '*X' declares a program to call on channel close.)
The following is an example of the EXECUTE command under WindX prior to Version
4.20:
IF WDX%<>$00$ THEN EXECUTE "[WDX]MNEMONIC(LFO)'5X'=$1B+hex$" ELSE GOTO MY_LABEL
For more information, see [WDX] Direct Action to Client Machine, p.797.
See Also
Chapter 5. Mnemonics, p.575.
Examples
To define and use a mnemonic:
0010 OPEN(1) "/dev/printerxx"
0020 MNEMONIC 'US'=ESC+"_" ! Define mnemonic
....
0030 PRINT(1)'US',"Title line...", ! Underscored
The example below illustrates how the MNEMONIC directive can be used for flexible
text fonts on a screen in Windows. Define the font and the logical screen size in a
statement. For example, to assign settings for the ProvideX standard mnemonics 'CP'
and 'SP':
MNEMONIC(0)'CP'="Courier New,-8":120,40
MNEMONIC(0)'SP'="*":80,25