Welcome | spec | C-PLOT | Support | Users | Contact
 
Contents -> STANDARD MACRO GUIDE -> Utility Macros -> Basic Aliases
spec Manual


3.3.2. - Basic Aliases



The main purpose of these macros is to provide a shorthand way of typing some useful commands.
    def d         'print date()'        # Print current time and date
    def p         'print'               # Shorthand for print
    def h         'help'                # Shorthand for help, below
    def hi        'history'             # Shorthand for history
    def beep      'printf("\a")'        # Sound the bell
    def cl        'tty_cntl("cl")'      # Clear the screen
    def com       'comment "$*"'        # Shorthand for comment, below
    
    def ond       'if (DATAFILE)        # Send output to data file
                  { on(DATAFILE) }'
    def offd      'if (DATAFILE)        # Stop sending
                  { off(DATAFILE)'
    def onp       'if (PRINTER)         # Send output to the printer
                  { on(PRINTER) }'
    def offp      'if (PRINTER != ")   # Stop sending
                  { off(PRINTER) }'
    def ont       'on("tty")'           # Send output to the terminal
    def offt      'off("tty")'          # Stop sending
    
    def fon       'if ($# == 1) on("$1")
                   else { print "Usage: fon filename"; on(); }'
    def foff      'if ($# == 1) off("$1")
                   else { print "Usage: foff filename";on(); }'
    
    def waitall   '{ user_waitall; wait(0) }'   # Wait for async activity
    def waitmove  '{ user_waitmove; wait(1) }'  # Wait for moving to end
    def waitcount '{ user_waitcount; wait(2) }' # Wait for counting to end
    def chk_move  '(wait(0x21) || USER_CHK_MOVE)'
    def chk_count '(wait(0x22) || USER_CHK_COUNT)'
    def chk_acq   '(wait(0x24) || USER_CHK_ACQ)'
    def w         '{ waitall; beep }'   # Wait, and be audible when done
    



  Top
  Prev | Next