Directives
MNEMONIC 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.


*Note* As of Version 4.20, WindX supports the use of this directive via the [WDX] tag. If you are running an earlier version of ProvideX on a WindX PC, you still need to encapsulate the command in an EXECUTE "[WDX]..." directive. See [WDX] Direct Action to Client Machine.


  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

   
See Also Mnemonics
   
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

Then, a subsequent PRINT 'CP' directive will change the screen font to Courier
New with a size of 8 points. PRINT 'SP'restores the screen font to standard print.



*Note* The TEXT plane font must always be a fixed font.


  WindX Examples:

OPEN(chan)"[WDX]\\mach\printer_share"
MNEMONIC(chan)'FF'=$0C$ ! automatically goes to WindX workstation MNEMONIC(chan)'*R'="erase "+filename$ ! local to server, not workstation MNEMONIC(chan)'*R'="[WDX]erase "+filename$ ! on workstation, not server