VAR
---

Format:        VAR number [ number | ON | OFF ]

Purpose:       Sets   or  displays  the  value  of  a  VT-DOS 
          variable.

Use:           The first number specifies the variable number 
          to  which the command refers.  The numbers  of  the 
          various  VT-DOS variables that can be displayed  or 
          changed using this command are given below.

               If  no  second parameter is  given,  then  the 
          current  value  of the variable is printed  on  the 
          screen.

               If the second parameter is a number,  then the 
          variable  is  set  to that  value.  If  the  second 
          parameter  is ON or OFF then the variable is set to 
          0  or  255  respectively.  Many  variables  control 
          whether  some feature is 'on' or  'off'  (eg.  disk 
          verify after write),  and these variables generally 
          use 0 to mean 'on' and 255 to mean 'off'.

Examples:

     VAR 0
     0

               No second parameter was given,  so the current 
          value of the specified VT-DOS variable was printed. 
          In  this  case,  the current value was 0 which  may 
          mean 'on'.


     VAR 0, 42

               A  second parameter of 42 was  given,  so  the 
          specified variable is set to 42.


     VAR 0 OFF

               The  variable  0 is set to  255,  which  often 
          means 'off'.



               The  standard variables that may be useful  to 
          use with the VAR command are:


     0...10

               Variables 0 to 10 are available for use by VT-
          DOS  transient programs,  and may be used to return 
          results to COMMAND.COM or other programs.


     11...20

               These  are  reserved  for use  by  VT-DOS  and 
          should not be used.


     25 - keyboard auto-repeat rate

               This is the auto-repeat rate for keys  pressed 
          on  the keyboard in units of 1/50  second.  Default 
          value is 3.


     26 - Keyboard lock state

               A value of 0 means that no keyboard lock is in 
          effect,  1 means CAPS lock,  2 means SHIFT lock and 
          16 means ALT lock.


     27 - Keyboard auto-repeat delay

               This  is  the  delay in units of  1/50  second 
          before keys start auto-repeating when they are held 
          down. Default value is 30.


     28 - Last error

               This is the error number returned by the  last 
          command  executed.  Note that reading this with the 
          VAR command will set it to zero as the VAR  command 
          itself returns no error.


     29 - Batch file echo

               When   lines  are  read  from  a  batch  file, 
          normally  they are executed  immediately.  If  this 
          variable is OFF, however, then the lines are echoed 
          to the screen before execution.  This is done after 
          % parameter substitution.


     30 - Prompt type

               A  value of ON means that the prompt  consists 
          of  a  drive letter for the current drive  and  the 
          current  directory.  If  OFF,  then just the  drive 
          letter is used.  The latter has the advantage  that 
          printing  the  drive  letter does not  require  any 
          accessing of the disk. Default value is ON.


     31 - Date/time format

               This  variable controls the format that  dates 
          and times are printed and input in.  Useful  values 
          are:

                -----------------------------------------
               | Date / Time format  | 12 hour | 24 hour |
               |-----------------------------------------|
               | UK       (DD-MM-YY) |   27    |   155   |
               | American (MM-DD-YY) |   39    |   167   |
               | ISO      (YY-MM-DD  |   57    |   185   |
                -----------------------------------------

          A value of 0 (the default) is equivalent to a value 
          of 27.


     32 - Boot drive

               The drive that COMMAND.COM was loaded from.  A 
          value of 1 means A:, 2 means B: etc.


     33 - Default drive

               The  default drive.  A value of 1 means A:,  2 
          means B: etc.


     34 - Step rate

               This  variable  controls the disk  drive  head 
          stepping  rate,  and  applies to  all  drives.  The 
          default value is 0. The value is interpreted by VT-
          DOS as follows:

                    0 => 6 mS.
                    1 => 12 mS.
                    2 => 20 mS.
                    3 => 30 mS.


     35 - Disk changed checking

               A  value  ON  (as  by  default)  enables  full 
          checking  for  disks having been  changed.  An  OFF 
          value  decreases this checking which may  speed  up 
          some  operations,  but the chances of corrupting  a 
          disk due to it having been changed are increased.


     37 - Verify-after-write

               If this variable is ON,  then whenever data is 
          written to disk it is immediately read off again to 
          verify that it was written correctly.  This reduces 
          the risk of badly written data going unnoticed, but 
          increases the time required to write data.  Default 
          value is OFF.


     38 - Abort error

               This  is  the error code that caused the  last 
          disk error that was aborted.
