home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / DBASE / REXL210.ZIP / APPENDIX.DOC next >
Text File  |  1992-05-16  |  261KB  |  7,691 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                           RExL  Version 2.10
  11.  
  12.  
  13.           A Rule-based Applications Development Environment
  14.  
  15.                                  From
  16.  
  17.  
  18.                          The Software Loft,
  19.                          Lough Guitane,
  20.                          Killarney,
  21.                          Co. Kerry,
  22.                          Ireland.            Tel: [+353] 64-54014
  23.  
  24.                Internet:      softloft@iruccvax.ucc.ie
  25.  
  26.                Compuserve:    100042,1237
  27.  
  28.  
  29.  
  30.  
  31.             -- Part II -- The Appendices to the Manual --
  32.  
  33.  
  34.  
  35.  
  36.      Information in this  document is subject  to change  without
  37.      notice and does  not represent a commitment  on the part  of
  38.      The Software Loft.   The software  described in this  manual
  39.      may be  used and  copied within  the  terms of  the  license
  40.      agreement.
  41.  
  42.      Turbo C, Turbo Pascal and Sidekick are registered trademarks
  43.      of  Borland  International.    dBase  III+  and  dBase   are
  44.      registered trademarks of Ashton-Tate.
  45.  
  46.      (C)  Copyright,  The  Software  Loft,  1992.    All   rights
  47.      reserved.  If you have  any difficulties, please contact  us
  48.      at the following address:
  49.  
  50.                The Software Loft
  51.                Lough Guitane
  52.                Killarney
  53.                Co. Kerry
  54.                Ireland             Telephone: [+353] 64-54014
  55.  
  56.                Internet:      softloft@iruccvax.ucc.ie
  57.  
  58.                Compuserve:    100042,1237
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.                             Contents
  97.  
  98.  
  99.  
  100.           Chapter 1  Function Families                     3
  101.              1.1  Introduction . . . . . . . . . . . . . . 3
  102.              1.2  Array handling . . . . . . . . . . . . . 3
  103.              1.3  Binary operations  . . . . . . . . . . . 4
  104.              1.4  Database operations  . . . . . . . . . . 4
  105.              1.5  Date and time manipulation . . . . . . . 5
  106.              1.6  RExL error handling functions  . . . . . 6
  107.              1.7  Keyboard handling functions  . . . . . . 7
  108.              1.8  Operating system interface functions . . 7
  109.              1.9  Financial functions  . . . . . . . . . . 8
  110.              1.10  Mathematical functions  . . . . . . . . 8
  111.              1.11  Screen handling functions . . . . . . . 9
  112.              1.12  Miscellaneous functions . . . . . . . . 9
  113.  
  114.           Chapter 2  The Database Module                  11
  115.              2.1  Introduction to Databases  . . . . . .  11
  116.              2.2  Indexes  . . . . . . . . . . . . . . .  13
  117.              2.3  Using Database Files . . . . . . . . .  15
  118.                 2.3.1  Opening and selecting files . . .  15
  119.                 2.3.2  Reading and writing to files  . .  16
  120.                    2.3.2.1  Using functions  . . . . . .  16
  121.                    2.3.2.2  Direct field access  . . . .  18
  122.                 2.3.3  Moving around in a file . . . . .  20
  123.                 2.3.4  Miscellaneous functions . . . . .  20
  124.                    2.3.4.1  Statistical analysis of
  125.                             data . . . . . . . . . . . .  20
  126.                    2.3.4.2  Deletion of information  . .  20
  127.                    2.3.4.3  Other functions  . . . . . .  21
  128.  
  129.           Chapter 3  Function Reference                   23
  130.  
  131.           Chapter 4  Keystroke reference                  95
  132.              4.1  Editor keystrokes  . . . . . . . . . .  95
  133.              4.2  Screen designer keystrokes . . . . . .  97
  134.              4.3  Debugger keystrokes  . . . . . . . . .  99
  135.  
  136.  
  137.  
  138.  
  139.  
  140.                                   i
  141.  
  142.  
  143.  
  144.           Chapter 5  Error Messages                      103
  145.              5.1  Error messages common to runtime and
  146.                   editor . . . . . . . . . . . . . . . . 103
  147.                 5.1.1  Bad help file format  . . . . . . 103
  148.                 5.1.2  Cannot locate system  . . . . . . 103
  149.                 5.1.3  Cannot open print file  . . . . . 103
  150.                 5.1.4  Couldn't open file  . . . . . . . 103
  151.                 5.1.5  Macros nested too deep (20=max) . 104
  152.                 5.1.6  Help file index is not loaded . . 104
  153.                 5.1.7  Unable to locate help file  . . . 104
  154.                 5.1.8  Macro recursion not allowed . . . 104
  155.                 5.1.9  Error loading configuration
  156.                        file  . . . . . . . . . . . . . . 104
  157.                 5.1.10  Zero memory allocation
  158.                         request! . . . . . . . . . . . . 104
  159.                 5.1.11  Not enough memory to perform
  160.                         selected operation . . . . . . . 105
  161.                 5.1.12  This window is not movable . . . 105
  162.                 5.1.13  No directories available . . . . 105
  163.                 5.1.14  No files in directory  . . . . . 105
  164.                 5.1.15  No macros defined  . . . . . . . 105
  165.                 5.1.16  --- Out of memory ---  . . . . . 105
  166.                 5.1.17  No screens defined . . . . . . . 105
  167.                 5.1.18  Not enough memory to load
  168.                         system . . . . . . . . . . . . . 105
  169.                 5.1.19  No unused rules available  . . . 105
  170.                 5.1.20  No unused screens available  . . 106
  171.                 5.1.21  No variables defined . . . . . . 106
  172.                 5.1.22  Rule is not used in current
  173.                         listing  . . . . . . . . . . . . 106
  174.                 5.1.23  Error saving configuration
  175.                         file . . . . . . . . . . . . . . 106
  176.                 5.1.24  Screen is not used in current
  177.                         listing  . . . . . . . . . . . . 106
  178.                 5.1.25  Screen file is corrupt . . . . . 106
  179.                 5.1.26  Too many files open  . . . . . . 107
  180.                 5.1.27  Too many keys in macro
  181.                         (500=max)  . . . . . . . . . . . 107
  182.                 5.1.28  Variable is not used in current
  183.                         listing  . . . . . . . . . . . . 107
  184.                 5.1.29  Wrong source file format . . . . 107
  185.                 5.1.30  Wrong screen file format . . . . 107
  186.                 5.1.31  Error opening screen file  . . . 107
  187.              5.2  Error messages unique to editor  . . . 107
  188.                 5.2.1  Incorrect format in listing
  189.                        file  . . . . . . . . . . . . . . 107
  190.                 5.2.2  Cannot nest fields  . . . . . . . 108
  191.  
  192.  
  193.  
  194.                                   ii
  195.  
  196.  
  197.  
  198.                 5.2.3  Can only delete recursed rule from
  199.                        first level of recursion  . . . . 108
  200.                 5.2.4  Unable to locate runtime module . 108
  201.                 5.2.5  Area crosses fields . . . . . . . 108
  202.                 5.2.6  Can't have a field of this type in
  203.                        this screen . . . . . . . . . . . 108
  204.                 5.2.7  Illegal array dimension . . . . . 109
  205.                 5.2.8  Maximum number of fields
  206.                        reached . . . . . . . . . . . . . 109
  207.                 5.2.9  Memory low, should save now!  . . 109
  208.                 5.2.10  Not used in listing  . . . . . . 109
  209.                 5.2.11  This is the main rule and is called
  210.                         to start the kbs . . . . . . . . 109
  211.                 5.2.12  Cannot change rule name to one
  212.                         already existing . . . . . . . . 109
  213.                 5.2.13  This screen already exists . . . 109
  214.                 5.2.14  Toggle fields must be more than 5
  215.                         and less than 75 characters
  216.                         wide . . . . . . . . . . . . . . 110
  217.                 5.2.15  Unable to create screen file . . 110
  218.                 5.2.16  Error saving file  . . . . . . . 110
  219.                 5.2.17  Error loading file . . . . . . . 110
  220.                 5.2.18  Error loading screen file  . . . 110
  221.                 5.2.19  Cannot change name of Main
  222.                         Program  . . . . . . . . . . . . 110
  223.              5.3  Error messages unique to runtime-
  224.                   debugger . . . . . . . . . . . . . . . 110
  225.                 5.3.1  Array bounds overflow . . . . . . 110
  226.                 5.3.2  Can't set a breakpoint here . . . 111
  227.                 5.3.3  Cannot open printer for output  . 111
  228.                 5.3.4  Cannot find editor  . . . . . . . 111
  229.                 5.3.5  Divide by zero  . . . . . . . . . 111
  230.                 5.3.6  String-numeric collision  . . . . 111
  231.                 5.3.7  Can't have string for radio button
  232.                        parameter . . . . . . . . . . . . 112
  233.                 5.3.8  Stack underflow . . . . . . . . . 112
  234.                 5.3.9  Stack overflow  . . . . . . . . . 112
  235.                 5.3.10  Numeric value out of range . . . 112
  236.                 5.3.11  Rule stack overflow  . . . . . . 112
  237.                 5.3.12  Invalid database file handle . . 112
  238.                 5.3.13  Unable to allocate rule stack  . 112
  239.                 5.3.14  Math error : Parameter out of range
  240.                         in function XXX  . . . . . . . . 113
  241.                 5.3.15  Math error : Parameter singularity
  242.                         in function XXX  . . . . . . . . 113
  243.                 5.3.16  Math error : numeric overflow  . 113
  244.                 5.3.17  Math error : numeric underflow . 113
  245.                 5.3.18  Math error : precision loss  . . 113
  246.  
  247.  
  248.                                  iii
  249.  
  250.  
  251.  
  252.              5.4  Critical Errors  . . . . . . . . . . . 113
  253.                 5.4.1  Write protect error . . . . . . . 114
  254.                 5.4.2  Drive not ready . . . . . . . . . 114
  255.                 5.4.3  Printer out of paper  . . . . . . 114
  256.                 5.4.4  Write fault . . . . . . . . . . . 114
  257.                 5.4.5  Read fault  . . . . . . . . . . . 114
  258.                 5.4.6  General Failure . . . . . . . . . 114
  259.                 5.4.7  Sector not found  . . . . . . . . 114
  260.                 5.4.8  Unknown unit  . . . . . . . . . . 115
  261.                 5.4.9  Unknown command . . . . . . . . . 115
  262.                 5.4.10  CRC error  . . . . . . . . . . . 115
  263.                 5.4.11  Bad request structure length . . 115
  264.                 5.4.12  Seek error . . . . . . . . . . . 115
  265.                 5.4.13  Unknown media type . . . . . . . 115
  266.  
  267.           Chapter 6  Extra Utilities                     117
  268.              6.1  RExLPC . . . . . . . . . . . . . . . . 117
  269.              6.2  RDU  . . . . . . . . . . . . . . . . . 118
  270.                 6.2.1  Introduction  . . . . . . . . . . 119
  271.                 6.2.2  Loading and Running . . . . . . . 119
  272.                 6.2.3  RDU menu system . . . . . . . . . 119
  273.                    6.2.3.1  File Menu  . . . . . . . . . 119
  274.                 6.2.4  Edit Menu . . . . . . . . . . . . 120
  275.                 6.2.5  Search Menu . . . . . . . . . . . 122
  276.                 6.2.6  Utilities Menu  . . . . . . . . . 124
  277.                 6.2.7  Options Menu  . . . . . . . . . . 126
  278.              6.3  RExLRD . . . . . . . . . . . . . . . . 127
  279.              6.4  RExLRT . . . . . . . . . . . . . . . . 128
  280.              6.5  ScrList  . . . . . . . . . . . . . . . 129
  281.              6.6  ScrGrab  . . . . . . . . . . . . . . . 130
  282.              6.7  ScrXtrct . . . . . . . . . . . . . . . 131
  283.              6.8  ScrAdd . . . . . . . . . . . . . . . . 132
  284.              6.9  MI . . . . . . . . . . . . . . . . . . 132
  285.              6.10  KbdSpeed  . . . . . . . . . . . . . . 134
  286.              6.11  KbdScan . . . . . . . . . . . . . . . 135
  287.  
  288.           Chapter 7  Afterword                           137
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.                                   iv
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.                              Tables
  313.  
  314.  
  315.           Table 1.1: Functions in AR function family . . . 3
  316.           Table 1.2: Functions in BT function family . . . 4
  317.           Table 1.3: Functions in DB function family . . . 5
  318.           Table 1.4: Functions in DT function family . . . 5
  319.           Table 1.5: Functions in ER function family . . . 6
  320.           Table 1.6: Functions in KB function family . . . 7
  321.           Table 1.7: Functions in OS function family . . . 8
  322.           Table 1.8: Financial functions . . . . . . . . . 8
  323.           Table 1.9: Math functions  . . . . . . . . . . . 9
  324.           Table 1.10: Screen functions . . . . . . . . . . 9
  325.           Table 1.11: Miscellaneous functions  . . . . . .10
  326.           Table 2.1: Simple Database Record Structure  . .12
  327.           Table 2.2: dBase Expression Compatibility with
  328.                      RExL  . . . . . . . . . . . . . . . .14
  329.           Table 2.3: Miscellaneous Database Functions  . .21
  330.           Table 3.1: ARsize() Input Indexing . . . . . . .26
  331.           Table 3.2: BEEP() Frequencies  . . . . . . . . .29
  332.           Table 3.3: Color Attribute Codes . . . . . . . .30
  333.           Table 3.4: DISPLAY() escape sequences  . . . . .50
  334.           Table 3.5: Valid Format Specifiers for
  335.                      DTformat()  . . . . . . . . . . . . .54
  336.           Table 3.6: OSdir() File Attribute Coding . . . .74
  337.           Table 3.7: OSdriveok() return values . . . . . .75
  338.           Table 3.8: OSstat() Return Indexing  . . . . . .78
  339.           Table 3.9: CPU Type Return Coding  . . . . . . .79
  340.           Table 3.10: Coprocessor Type Return Coding . . .79
  341.           Table 3.11: Video Adapter Type Return Coding . .79
  342.           Table 3.12: Color Attribute Codes  . . . . . . .81
  343.           Table 4.1: Cursor movement keys  . . . . . . . .95
  344.           Table 4.2: Hilite bar movement keys  . . . . . .95
  345.           Table 4.3: Modifier keys . . . . . . . . . . . .96
  346.           Table 4.4: Editor list keys  . . . . . . . . . .96
  347.           Table 4.5: Editor miscellaneous keys . . . . . .96
  348.           Table 4.6: Screen designer movement keys . . . .97
  349.           Table 4.7: Screen designer field definition
  350.                      keys  . . . . . . . . . . . . . . . .97
  351.           Table 4.8: Screen designer line draw keys  . . .98
  352.           Table 4.9: Screen designer miscellaneous keys  .98
  353.           Table 4.10: Screen designer block mark keys  . .99
  354.  
  355.  
  356.                                   v
  357.  
  358.  
  359.  
  360.           Table 4.11: Debugger hilite bar movement keys  .99
  361.           Table 4.12: Debugger list keys . . . . . . . . .99
  362.           Table 4.13: Debugger miscellaneous keys  . . . 100
  363.           Table 4.14: KB function return values  . . . . 101
  364.           Table 6.1: Keystrokes in structure create  . . 124
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.                                   vi
  411.        - Appendices.                         Page: 3 -
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.                               Chapter 1
  421.  
  422.                           Function Families
  423.  
  424.  
  425.      1.1  Introduction
  426.  
  427.  
  428.      This appendix gives a brief  introduction to the use of  and
  429.      the design behind  the the seven  function families in  RExL
  430.      and the various miscellaneous functions.
  431.  
  432.  
  433.      1.2  Array handling
  434.  
  435.  
  436.      There are nine functions which are used to manipulate arrays
  437.      and determine information about them.  The functions are  as
  438.      follows:
  439.  
  440.               Table 1.1: Functions in AR function family
  441.  
  442.      ARavg()        ARcount()      ARinit()
  443.      ARmax()        ARmin()        ARsize()
  444.      ARstd()        ARsum()        ARvar()
  445.  
  446.      The functions fall into two groups, the smaller first  group
  447.      has two  functions  in  it:  ARinit()  and  ARsize().    The
  448.      ARinit() function is used to  initialise the contents of  an
  449.      array, while the second determines, at runtime, the size  of
  450.      a particular dimension of an array.
  451.  
  452.      The other functions in this family are used for  statistical
  453.      analysis of the contents of the arrays.  The function  names
  454.      are based upon  similar functions  found in  Lotus 123,  and
  455.      where appropriate, the parameter lists are the same.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  465.        - Appendices.                         Page: 4 -
  466.  
  467.  
  468.      1.3  Binary operations
  469.  
  470.  
  471.      There are six functions, using the initial letters BT  which
  472.      are used to perform binary operations.  The functions are as
  473.      follows:
  474.  
  475.               Table 1.2: Functions in BT function family
  476.  
  477.      BTand()        BTnot()        BTor()
  478.      BTshl()        BTshr()        BTxor()
  479.  
  480.      The function  names  are  based  upon  the  equivalent  8086
  481.      assembly language functions.   All the BT functions  convert
  482.      their  parameters  to  sixteen  bit  words,  any  parameters
  483.      greater than 65535  being set  to 65535  and any  parameters
  484.      less than 1 being set to 0.
  485.  
  486.      Typically, these functions are used in conjunction with  the
  487.      four memory access  functions, PEEK(),  PEEKW(), POKE()  and
  488.      POKEW() to determine  information which  cannot be  obtained
  489.      through the other system functions.
  490.  
  491.      For example, to determine if the NumLock state is active  or
  492.      not, the following line could be used:
  493.  
  494.                [Expr] NumLockOn:=BTand(PEEK(0,1047),32)
  495.  
  496.      The use of the memory access functions should be avoided  if
  497.      you intend  your  application  to run  on  widely  different
  498.      machines.
  499.  
  500.  
  501.      1.4  Database operations
  502.  
  503.  
  504.      The thirty-nine dBase file and index manipulation  functions
  505.      use the initial letters DB.  The functions are as follows:
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  519.        - Appendices.                         Page: 5 -
  520.  
  521.  
  522.               Table 1.3: Functions in DB function family
  523.  
  524.      DBappend()     DBavg()        DBbottom()
  525.      DBcloseall()   DBclosedbf()   DBclosendx()
  526.      DBcount()      DBcountflds()  DBdelete()
  527.      DBdeleted()    DBexact()      DBgo()
  528.      DBlocate()     DBmax()        DBmin()
  529.      DBmkdbf()      DBmkndx()      DBnext()
  530.      DBpack()       DBprev()       DBrecall()
  531.      DBreccount()   DBrecno()      DBreindex()
  532.      DBreplace()    DBrnum()       DBrstr$()
  533.      DBseek()       DBseldbf()     DBselndx()
  534.      DBskip()       DBstd()        DBstruct()
  535.      DBsum()        DBtop()        DBusedbf()
  536.      DBusendx()     DBvar()        DBzap()
  537.  
  538.      Because of the size and complexity of the database module in
  539.      RExL, it is treated on its own in the next appendix.
  540.  
  541.  
  542.      1.5  Date and time manipulation
  543.  
  544.  
  545.      The eighteen date  and time manipulation  functions use  the
  546.      initial letters DT.  The functions are as follows:
  547.  
  548.               Table 1.4: Functions in DT function family
  549.  
  550.      DTdate()       DTdate$()      DTdatevalue()
  551.      DTday$()       DTdayno()      DTformat()
  552.      DThourno()     DTminuteno()   DTmonth$()
  553.      DTmonthno()    DTnow()        DTsecondno()
  554.      DTsetdate()    DTsettime()    DTtime()
  555.      DTtime$()      DTtimevalue()  DTyearno()
  556.  
  557.      The date functions  are again, based  largely upon those  in
  558.      Lotus 123, with a few minor inconsistencies removed.
  559.  
  560.      The date  module can  use dates  in  any of  the three  most
  561.      common date formats, European,  American and Japanese.   The
  562.      exact format which is in use initially is determined by  the
  563.      settings in the CONFIG.SYS file  in your machine.  If  there
  564.      is no  specific format  set up,  then the  date format  will
  565.      default to American.  The DTformat() command can be used  to
  566.      set the  date and  time formats  and separators  explicitly,
  567.      overriding the defaults.
  568.  
  569.  
  570.  
  571.  
  572.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  573.        - Appendices.                         Page: 6 -
  574.  
  575.  
  576.      Date and  time  information  are  stored  in  RExL  as  real
  577.      numbers.  The integer portion  of a date-time number is  the
  578.      Julian day number  while the  fractional part  is the  time,
  579.      expressed as a fraction of 24 hours.
  580.  
  581.      The Julian day number of a particular date is the number  of
  582.      days elapsed since and including the first of January,  4713
  583.      BC (the  reasons for  this exact  date being  chosen as  the
  584.      origin are  historically amusing).   The  Julian day  number
  585.      system is used widely in date calculations and should not be
  586.      confused with the Julian Calendar.   The algorithms used  in
  587.      RExL to calculate the Julian day number do not take  account
  588.      of the ten  day transition from the  Julian Calendar to  the
  589.      Gregorian  Calendar  which  occurred  from  October  5th  to
  590.      October 15th  in 1582  in Rome  and at  various other  later
  591.      dates around the rest of the world.
  592.  
  593.      Dates before 0 AD cannot be represented in RExL.  Apart from
  594.      any other  considerations, there  was no  standard  calendar
  595.      then, rendering calculations somewhat useless.
  596.  
  597.      Date and time functions which  return a date or time  number
  598.      will return zero if the date or time was invalid.
  599.  
  600.  
  601.      1.6  RExL error handling functions
  602.  
  603.  
  604.      The five error  handling functions use  the initial  letters
  605.      ER. The functions are as follows:
  606.  
  607.               Table 1.5: Functions in ER function family
  608.  
  609.      ERclear()      ERmsg$()       ERnum()
  610.      ERok()         ERwatch()
  611.  
  612.      Whenever an error  occurs in  the runtime  portion of  RExL,
  613.      internal variables save the text of the error and the  error
  614.      number.  These  variables can be  interrogated by using  the
  615.      ERmsg$() function (to  retrieve the text  of the error)  and
  616.      ERnum() (to retrieve the error code).
  617.  
  618.      If no  errors have  occurred, then  calls to  ERmsg$()  will
  619.      return an  empty string  and calls  to ERnum()  will  return
  620.      zero.  Once an error has occurred, the text and error number
  621.      remain fixed until the next error occurs, an application  is
  622.      LOAD()'ed or the ERclear() function is used.
  623.  
  624.  
  625.  
  626.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  627.        - Appendices.                         Page: 7 -
  628.  
  629.  
  630.      While the  development of  an  application is  in  progress,
  631.      errors should be left on, to detect errors such as divide by
  632.      zero, which  would otherwise  not be  seen.   In  the  final
  633.      distribution version, the error display can be disabled with
  634.      the ERwatch() function.
  635.  
  636.  
  637.      1.7  Keyboard handling functions
  638.  
  639.  
  640.      The five keyboard handling functions use the initial letters
  641.      KB.  The functions are as follows:
  642.  
  643.               Table 1.6: Functions in KB function family
  644.  
  645.      KBclear()      KBlast()
  646.      KBread()       KBready()
  647.      KBwait()
  648.  
  649.      The IBM PC uses a keyboard buffer to store keystrokes  until
  650.      they can be processed by a program.  The normal size of  the
  651.      buffer is 15 keystrokes.  The KBclear() function resets  and
  652.      empties the  keyboard buffer,  while the  KBready()  reports
  653.      whether a keystroke is pending  in the keyboard buffer.  The
  654.      other two functions  in the  group are  used for  retrieving
  655.      keystrokes from the  buffer, optionally  waiting a  variable
  656.      time span for one.   When a screen has been terminated,  the
  657.      KBlast() function  can be  used to  determine the  keystroke
  658.      which caused its termination.
  659.  
  660.      If a keystroke returned by RExL is a character key, then the
  661.      ASCII code of  the character will  be returned  immediately.
  662.      Keys that  do not  have ASCII  codes, such  as the  function
  663.      keys, return a more complex coding, the details of which are
  664.      not necessary. The complete  list of function return  values
  665.      is listed in appendix D, with the other keystrokes RExL  can
  666.      return.   Note that  the <Insert>  key  is captured  by  the
  667.      runtime module and is not returned to the application.
  668.  
  669.  
  670.      1.8  Operating system interface functions
  671.  
  672.  
  673.      The thirteen operating system interface functions, which use
  674.      the initial letter code OS, are as follows:
  675.  
  676.  
  677.  
  678.  
  679.  
  680.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  681.        - Appendices.                         Page: 8 -
  682.  
  683.  
  684.               Table 1.7: Functions in OS function family
  685.  
  686.      OScd()         OScmd()   OScopy()
  687.      OSdel()        OSdir()   OSdrive()
  688.      OSexists()     OSmd()    OSnumber()
  689.      OSrd()         OSren()   OSstat()
  690.      OSwd$()
  691.  
  692.      These functions  perform  most  of the  operations  commonly
  693.      needed to interface  with the operating  system under  which
  694.      RExL is  working.    The commands  are  modelled  after  the
  695.      corresponding DOS commands and require the same parameters.
  696.  
  697.      The OSstat()  function is  the only  function in  the  group
  698.      which has no direct DOS counterpart.  It returns the  status
  699.      of the machine,  including the  processor, co-processor  and
  700.      display adapter type as well as the operating system version
  701.      and information about the currently selected disk.
  702.  
  703.  
  704.      1.9  Financial functions
  705.  
  706.  
  707.      The financial functions in RExL are used in the  calculation
  708.      of ordinary annuities.   There are  seven functions in  this
  709.      group which does not use a common initial two-letter group.
  710.  
  711.                     Table 1.8: Financial functions
  712.  
  713.      CTERM()        FV()
  714.      PMT()          PV()
  715.      RATE()         SLN()
  716.      SYD()          TERM()
  717.  
  718.      The functions in  this group are based  upon those in  Lotus
  719.      123.  The annuity due for the FV() and PV() functions may be
  720.      calculated easily by multiplying the result of the  ordinary
  721.      annuity by the expression 1+rate, where rate is the periodic
  722.      interest rate.
  723.  
  724.  
  725.      1.10  Mathematical functions
  726.  
  727.  
  728.      As with the financial functions,  the math functions do  not
  729.      have a  common  initial  letter pair.  The  thirty-one  math
  730.      functions are as follows:
  731.  
  732.  
  733.  
  734.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  735.        - Appendices.                         Page: 9 -
  736.  
  737.  
  738.                       Table 1.9: Math functions
  739.  
  740.      ABS()     ACOS()    AND()
  741.      ASIN()    ATAN()    CEIL()
  742.      COS()     DEG()     DIV()
  743.      EQV()     EXP()     FALSE()
  744.      FLOOR()   IMP()     LOG()
  745.      LOG10()   MAX()     MIN()
  746.      MOD()     NOT()     OR()
  747.      PI()      POW()     RAD()
  748.      RAND()    ROUND()   SEED()
  749.      SIN()     SQRT()    TAN()
  750.      TRUE()    XOR()
  751.  
  752.      All math functions  requiring an angle  parameter must  have
  753.      the angle expressed in radian measure.  The RAD() and  DEG()
  754.      functions can be used to convert degrees to radians and vice
  755.      versa.
  756.  
  757.  
  758.      1.11  Screen handling functions
  759.  
  760.  
  761.      The functions in this section are used for handling screens:
  762.      input, output, box drawing and painting areas as well as for
  763.      loading screens.  There are fifteen functions in this group:
  764.  
  765.                      Table 1.10: Screen functions
  766.  
  767.      BEEP()         CODE()         ATTRXY()
  768.      BOX()          CHAR$()        CHARXY$()
  769.      CLS()          DISPLAY()      FILL()
  770.      GOTOXY()       INPUT()        INPUT$()
  771.      INVERSE()      LOADSCR()      PAINT()
  772.  
  773.  
  774.      1.12  Miscellaneous functions
  775.  
  776.  
  777.      This final group of functions  fall into no clearly  defined
  778.      grouping.  The functions in the group are as follows:
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  789.        - Appendices.                         Page: 10 -
  790.  
  791.  
  792.                  Table 1.11: Miscellaneous functions
  793.  
  794.      ESCWATCH()     EXACT()        FIND()
  795.      IIF()          IF$()          INIT()
  796.      LEFT$()        LENGTH()       LOAD()
  797.      LOWER$()       MID$()         OUTPUT()
  798.      PAUSE()        PEEK()         PEEKW()
  799.      POKE()         POKEW()        QUIT()
  800.      REPEAT$()      REPLACE$()     RIGHT$()
  801.      SOUNDEX$()     STRING$()      SUFFIX$()
  802.      TRIM$()        UPPER$()       VALUE()
  803.      VERSION()
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  843.        - Appendices.                         Page: 11 -
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.                               Chapter 2
  853.  
  854.                          The Database Module
  855.  
  856.  
  857.      The database function family, the largest single grouping of
  858.      functions, in RExL is fully compatible with the database and
  859.      index file format used in dBase III+.  Since this feature is
  860.      central to RExL,  it's treated on its  own in this  appendix
  861.      which contains  a  complete  introduction  to  the  database
  862.      facilities in RExL.
  863.  
  864.  
  865.      2.1  Introduction to Databases
  866.  
  867.  
  868.      There are a few terms relating to databases which need to be
  869.      understood before we can move on to the next section.
  870.  
  871.      Most database formats, including the dBase format used here,
  872.      store their information in fixed fields.  A field is  simply
  873.      storage area of fixed length (known as the field size) which
  874.      is referenced from  RExL through a  field name.   The  field
  875.      names follow the  same conventions as  RExL variable  names,
  876.      save that the  dollar character `$'  is not  used to  denote
  877.      strings. The maximum width of a field name in the dBase file
  878.      format is ten characters.
  879.  
  880.      Each field can be one of the following four different types:
  881.  
  882.          o  Numeric: which are used to store numeric  information
  883.             within a fixed number of  digits.  The maximum  field
  884.             width of  a numeric  field is  nineteen digits.    If
  885.             there are decimal  fractions to be  stored, then  the
  886.             field must contain space for a decimal point and  the
  887.             field must also have a fixed decimal fraction  width,
  888.             at most two less than the size of the field.
  889.  
  890.          o  String: These fields are  used to store character  or
  891.             string information with a maximum field width of  255
  892.             characters.   Because of  the limit  of 80  character
  893.             long strings  in the  current  release of  RExL,  any
  894.  
  895.  
  896.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  897.        - Appendices.                         Page: 12 -
  898.  
  899.  
  900.             fields  which  are  wider  then  80  characters   are
  901.             truncated.
  902.  
  903.          o  Date: This field,  used to store  dates, has a  fixed
  904.             field width  of  8  characters.  Since  there  is  no
  905.             intrinsic  date  type  in   RExL,  date  fields   are
  906.             converted to Julian day numbers, compatible with  the
  907.             date system in use elsewhere in RExL.
  908.  
  909.          o  Logical: This  final field  type stores  yes-no  type
  910.             logical information.  As with the date fields,  there
  911.             is no intrinsic logical data type in RExL, so logical
  912.             information is  returned as  a  numeric type,  0  for
  913.             False and 1 for True.
  914.  
  915.      Traditionally, to avoid having to repeat the field types too
  916.      often, the types are abbreviated  to single letter: `N'  for
  917.      numeric, `C'  for  character,  `D'  for  date  and  `L'  for
  918.      logical.  The memo type, which is not commonly used in dBase
  919.      applications, is not supported in RExL.
  920.  
  921.      Fields  are   collected   together   to  form   records   of
  922.      information.
  923.  
  924.      Whenever an application  has a database  open for use,  RExL
  925.      maintains a pointer, known as  the record pointer, into  the
  926.      database pointing  at the  record which  all operations  are
  927.      based upon.   When a database  is first  opened, the  record
  928.      pointer is placed at the first record in the database.
  929.  
  930.      As a  complete example  of a  record structure,  a  customer
  931.      database might be designed as follows:
  932.  
  933.              Table 2.1: Simple Database Record Structure
  934.  
  935.      Field Name     Type      Width          Decimal Places
  936.      CUSTNAME       `C'       30
  937.      BALANCE        `N'       8                   2
  938.      MAILSHOT       `L'       1
  939.      NEXTBILL       `D'       8
  940.  
  941.      The above  database structure  demonstrates the  use of  the
  942.      four different field types.  When databases are created, the
  943.      width of the  logical and date  fields is set  automatically
  944.      and does not have to be specified, the same is true for  the
  945.      decimal places specifier in character field types.
  946.  
  947.  
  948.  
  949.  
  950.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  951.        - Appendices.                         Page: 13 -
  952.  
  953.  
  954.      Databases are  stored  on  disk with  a  file  extension  of
  955.      ".DBF",  so  the   above  structure  could   be  stored   as
  956.      "CUSTOMER.DBF".
  957.  
  958.  
  959.      2.2  Indexes
  960.  
  961.  
  962.      Databases are  designed for  the  storage and  retrieval  of
  963.      large amounts of information.  If the information is held in
  964.      an random  manner  (like  a shuffled  pack  of  cards)  then
  965.      searching for a  particular item of  information can  become
  966.      prohibitively slow if there are large numbers of records  in
  967.      the database. The dBase file format specifies a way in which
  968.      indexes may be  generated through  which it  is possible  to
  969.      access information rapidly in a large database.
  970.  
  971.      An index file, used to store the indexing information, is  a
  972.      separate DOS file (using the extension ".NDX") which is used
  973.      in tandem  with a  database file  to allow  rapid access  to
  974.      specific information.   This  rapid  access is  achieved  by
  975.      storing the indexing information in strict order (alphabetic
  976.      or date or numeric).
  977.  
  978.      The function of the index file is analogous to a card  index
  979.      system in a library, where  a box contains a sorted list  of
  980.      cards, one  for each  book in  the library.   When  somebody
  981.      looks for a  book, the card  index can  be searched  quickly
  982.      (since it is sorted) and upon finding the wanted book  name,
  983.      the card will contain some information on how to locate  the
  984.      book in  the  library.  In  the same  way,  the  index  file
  985.      contains sorted information  together with  pointers to  the
  986.      records in the database which  match the information in  the
  987.      index file.
  988.  
  989.      The index  is  generated  using an  index  expression  which
  990.      defines the order in which  the records in the database  are
  991.      to be  retrieved in.   Initially,  when the  index is  first
  992.      created, the index expression  is evaluated for all  records
  993.      in  the  database.    Subsequently,  whenever  a  record  is
  994.      modified, added or removed from  the database, the index  is
  995.      updated to reflect the new contents of the database.
  996.  
  997.      In the example from the end of the previous section, if  the
  998.      developer decided that  the records were  to be sorted  with
  999.      respect to the name of the customer, then an index could  be
  1000.      generated with the  index expression CUSTNAME.   Thus,  when
  1001.      the user  of the  end system  wanted  to view  a  particular
  1002.  
  1003.  
  1004.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1005.        - Appendices.                         Page: 14 -
  1006.  
  1007.  
  1008.      customer's record, the customer  name would be entered,  the
  1009.      name would then  be searched for  in the  index file and  if
  1010.      located, would then be returned to the user of the system.
  1011.  
  1012.      Since the index  files used by  RExL may  also be used  with
  1013.      dBase, Clipper and other packages which adhere to the ".NDX"
  1014.      standard, the search expression  must be a dBase  expression
  1015.      and not a  RExL expression. The  simplest dBase  expressions
  1016.      are simply  field  names  and for  most  purposes,  this  is
  1017.      sufficient.  The  RExL call  to generate  the customer  name
  1018.      index from the previous paragraph would be as follows:
  1019.  
  1020.                  [Expr] DBmkndx("CUSTndx","CUSTNAME")
  1021.  
  1022.      This  would  create  an  index  file  called  "CUSTndx.NDX",
  1023.      sorting  the  records  with  respect  to  the  field   named
  1024.      "CUSTNAME".
  1025.  
  1026.      The dBase expression parser built into RExL also copes  with
  1027.      more complicated expressions involving dBase function  calls
  1028.      and mathematical  operators.   The following  table gives  a
  1029.      brief summary  of  the  functions and  operators  supported:
  1030.      (dBase  does  not   follow  the   dollar  character   string
  1031.      convention, so some of the  functions in the table may  seem
  1032.      slightly at odds with the rest of RExL.)
  1033.  
  1034.          Table 2.2: dBase Expression Compatibility with RExL
  1035.  
  1036.      Function       Meaning
  1037.      * + - / ^      Ordinary mathematical operators
  1038.      >= <= >
  1039.      < = <>         Ordinary relational operators
  1040.      DATE()         Return system date as `D'
  1041.      DELETED()      Return delete of current record as `L'
  1042.      DTOC()         Convert date field to `C'. (not recommended)
  1043.      DTOS()         Convert date field to `C'. (recommended)
  1044.      CTOD()         Convert string to date.
  1045.      IIF()          Equivalent to RExL IIF()
  1046.      RECNO()        Returns the current record number
  1047.      RECCOUNT()     Returns the number of records in the database
  1048.      STR()          Convert number to string as STRING$()
  1049.      SUBSTR()       Equivalent to RExL MID$()
  1050.      TIME()         Return system time
  1051.      VAL()          Convert string to number
  1052.      UPPER()        Equivalent to UPPER$()
  1053.      SOUNDEX()      Equivalent to SOUNDEX$()
  1054.  
  1055.  
  1056.  
  1057.  
  1058.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1059.        - Appendices.                         Page: 15 -
  1060.  
  1061.  
  1062.      The  DTOC()  function  is  supported,  although  is  is  not
  1063.      recommended as  an  index  expression function:    Since  it
  1064.      returns the  year  as a  two  digits  instead of  four,  the
  1065.      function can only cope with  dates in a single century.  The
  1066.      DTOS() function returns the date as a string with the format
  1067.      "yyyymmdd" (y for year,  m for month and  d for day) and  is
  1068.      therefore more suitable for indexing since it can deal  with
  1069.      multiple centuries.
  1070.  
  1071.      A full description of the database functions above is beyond
  1072.      the scope of this introduction.   Consult your dBase  manual
  1073.      for precise  details on  how these  functions and  operators
  1074.      operate.
  1075.  
  1076.  
  1077.      2.3  Using Database Files
  1078.  
  1079.  
  1080.      2.3.1  Opening and selecting files
  1081.  
  1082.      The handling of database files  is based largely around  the
  1083.      concept of  file  handles, which  are  very similar  to  the
  1084.      notion of work-spaces used in the dBase documentation.  When
  1085.      a data file is opened (using DBusedbf()) or an index file is
  1086.      opened (using DBusendx()), a file handle (a reference number
  1087.      greater than zero)  is returned to  RExL, through which  the
  1088.      application can make references to that file or index.   The
  1089.      advantage of the file handle system is that a  theoretically
  1090.      arbitrary number of  files and indexes may  be kept open  at
  1091.      any one time and any file or index can be referenced through
  1092.      its file handle.   In practice  however, the  number of  DOS
  1093.      files which may be opened simultaneously is limited (by DOS)
  1094.      to twenty,  five of  which cannot  be reassigned,  so up  to
  1095.      fifteen database and index files may be open simultaneously.
  1096.      (Note that  in  version  2.10,  it  is  possible  to  access
  1097.      multiple database  files  without  having to  make  repeated
  1098.      calls to DBseldbf().)
  1099.  
  1100.      speech For  example, assuming  that  the database  file  and
  1101.      index file from the previous sections have been created  and
  1102.      exist in the work directory.  The following code can be used
  1103.      to open and select the two files:
  1104.  
  1105.      [Expr] DBFhandle:=DBusedbf("customer")
  1106.      [Expr] NDXhandle:=DBusendx("custndx")
  1107.      [Expr] DBseldbf(DBFhandle)
  1108.      [Expr] DBselndx(NDXhandle)
  1109.      [Expr] DBtop()
  1110.  
  1111.  
  1112.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1113.        - Appendices.                         Page: 16 -
  1114.  
  1115.  
  1116.      The first line opens the  customer database and returns  the
  1117.      database file handle  which RExL has  assigned to  it.   The
  1118.      second line opens the index file and assigns the index  file
  1119.      handle  to  NDXhandle.    Next,  the  database  file  opened
  1120.      previously is selected  or made  the current  work file,  at
  1121.      this point the records are  not yet sorted, since the  index
  1122.      file has not been selected. The fourth line applies the sort
  1123.      order to the current database.  Finally, the current  record
  1124.      number is set to the first record in the database (it's good
  1125.      practice always to know what the current record is).
  1126.  
  1127.      In a real-life application,  the return values of  DBFhandle
  1128.      and NDXhandle would  be checked for  validity, to make  sure
  1129.      that they had been opened correctly.
  1130.  
  1131.      2.3.2  Reading and writing to files
  1132.  
  1133.      There are two  ways in which information  can be written  to
  1134.      and read  from  database  files.    The  first  method  uses
  1135.      specific functions to read and  write database files and  is
  1136.      compatible with RExL version 2.00, but is cumbersome to use.
  1137.      The second, newer and more efficient method is to use the  @
  1138.      notation introduced  in  version  2.10, generally  known  as
  1139.      `direct field access'.  The  next two subsections deal  with
  1140.      both methods.
  1141.  
  1142.      2.3.2.1  Using functions
  1143.  
  1144.      There are four  functions which are used  to read and  write
  1145.      the currently selected database file.  These are DBappend(),
  1146.      used to  append a  blank  record to  the  end of  the  file,
  1147.      DBreplace() to write to the file and DBrnum() and  DBrstr$()
  1148.      to read from it.
  1149.  
  1150.      a) Writing to a file
  1151.  
  1152.      The DBreplace() command requires  two parameters, the  first
  1153.      is the field name while  the second parameter, which may  be
  1154.      either string or  numeric in  type, specifies  the value  to
  1155.      place into the  field.  This function  is equivalent to  the
  1156.      dBase  command  REPLACE.    The  action  of  DBreplace()  is
  1157.      slightly more complicated than it may at first seem.   First
  1158.      of all, if the field is numeric and the number being written
  1159.      is too wide  for the field,  then the field  will be set  to
  1160.      zero.  If the field  is string and the string being  written
  1161.      is too long, then it will be truncated.
  1162.  
  1163.  
  1164.  
  1165.  
  1166.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1167.        - Appendices.                         Page: 17 -
  1168.  
  1169.  
  1170.      It is also possible to write string values to numeric fields
  1171.      (although the strings must clearly contain numeric value for
  1172.      this to work) and to write numeric values to string  fields,
  1173.      where \rexl\  will  attempt to  convert  the number  into  a
  1174.      string before writing  it to  the field.   Generally,  these
  1175.      cross-breed replacements should be avoided where possible.
  1176.  
  1177.      For logical fields, a value of \true\ will be written to the
  1178.      field if the second parameter is numeric and non zero, or if
  1179.      it is string and equal to  "Y" "y" "T" or "t". In all  other
  1180.      cases, the value written will be  false.  If the field is  a
  1181.      date field,  then the  second parameter  will be  internally
  1182.      converted to a date number and written to the field.
  1183.  
  1184.      The DBappend()  command is  used to  place a  new and  blank
  1185.      record at the end of  the currently selected database  file.
  1186.      If this  has been  performed successfully,  then the  record
  1187.      pointer will be placed there.
  1188.  
  1189.      b) Reading from a file
  1190.  
  1191.      The two functions DBrnum() and DBrstr$() are used to extract
  1192.      information from the current  record.  DBrnum() returns  the
  1193.      field expressed as a number, where possible, while DBrstr$()
  1194.      returns the field  expressed as  a string,  which is  always
  1195.      possible.
  1196.  
  1197.      DBrstr$() is subject to much the same caveats as DBreplace()
  1198.      as regards reading strings: If  the field contains a  string
  1199.      longer than 80  characters, then it will  be truncated.   As
  1200.      with DBreplace()  it is  possible, but  not recommended,  to
  1201.      perform cross-breed reading, from  numeric fields to  string
  1202.      variables and string fields to numeric values.
  1203.  
  1204.      When the two  field reading  functions are  applied to  date
  1205.      fields, the  return value  will be  the value  of the  field
  1206.      converted to the appropriate  type.  Thus DBrstr$()  applied
  1207.      to a date  field will return  a date  string in the  current
  1208.      date format, while  a call to DBrnum()  applied to the  same
  1209.      field  will  return  the  Julian  day  number  of  the  date
  1210.      specified in the field.
  1211.  
  1212.      The two functions  can also  be applied  to logical  fields,
  1213.      where DBrnum() will return 1.0 for a true value in the field
  1214.      and 0.0 for a false value. DBrstr$ will return "Y" for  true
  1215.      and "N" for false.
  1216.  
  1217.  
  1218.  
  1219.  
  1220.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1221.        - Appendices.                         Page: 18 -
  1222.  
  1223.  
  1224.      2.3.2.2  Direct field access
  1225.  
  1226.      a) Basics
  1227.  
  1228.      The `@' operator is used to access database fields  directly
  1229.      and is mapped  internally to a call  to either DBrstr$()  or
  1230.      DBrnum().  There  are two forms of  the operator, the  first
  1231.      which corresponds  to DBrstr$(),  is `@$'  and is  used  for
  1232.      accessing the value  of a field  as a  string.  The  second,
  1233.      taking the place of the DBrnum() function, is the `@' symbol
  1234.      on its own and is used to access  the value of a field as  a
  1235.      string.
  1236.  
  1237.      To use the access operator, it is simply placed at the start
  1238.      of the database  field name. For  example, to  read a  field
  1239.      called `CUSTNO', and  assign its  value to  a variable,  the
  1240.      following expression could be written:
  1241.  
  1242.                [Expr] customer:=@custno
  1243.  
  1244.      Similarly, the contents of a character field may be returned
  1245.      to a string as follows:
  1246.  
  1247.                [Expr] name$:=@$name
  1248.  
  1249.      where `NAME' is a character field.
  1250.  
  1251.      As with  the read  functions  DBrstr$() and  DBrnum(),  full
  1252.      cross-type read operations  are permitted.   This again,  is
  1253.      most noticeable  when  using  date fields:    using  the  @$
  1254.      operator on a  date field will  return a  date string  while
  1255.      using the @  operator will return the  Julian Day Number  of
  1256.      the date specified in the field.
  1257.  
  1258.      Information may  also be  written to  the database  file  in
  1259.      exactly the same manner as it is read, so that a string  may
  1260.      be assigned to a string field using:
  1261.  
  1262.                [Expr] @$name:="Joe Smith"
  1263.  
  1264.      and to a numeric field using:
  1265.  
  1266.                [Expr] @age:=24
  1267.  
  1268.  
  1269.      b) Accessing multiple database files
  1270.  
  1271.  
  1272.  
  1273.  
  1274.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1275.        - Appendices.                         Page: 19 -
  1276.  
  1277.  
  1278.      The syntax of  the @  operator can  be extended  to allow  a
  1279.      single   token   to    access   multiple   database    files
  1280.      simultaneously.   The  general  format  of  the  extended  @
  1281.      operator is:
  1282.  
  1283.                Numeric value:      @<num_variable>.<field>
  1284.      and
  1285.                String value:       @$<num_variable>.<field>
  1286.  
  1287.      where <num_variable>  is a  simple (ie.  non-array)  numeric
  1288.      variable whose value is the file handle for a database file,
  1289.      the dot is a full stop character and <field> is the name  of
  1290.      the field whose value is being assigned or retrieved.
  1291.  
  1292.      If, for  example,  two database  files  had been  opened  as
  1293.      follows:
  1294.  
  1295.                db_one:=dbusedbf("customer")
  1296.                db_two:=dbusedbf("orders")
  1297.  
  1298.      then a character  field, NAME, in the  customer file can  be
  1299.      accessed using the expression:
  1300.  
  1301.                @$db_one.name
  1302.  
  1303.      while a numeric field `ORDERVAL'  in the orders file can  be
  1304.      accessed using:
  1305.  
  1306.                @db_two.orderval
  1307.  
  1308.      Note again  that only  simple numeric  variables can  appear
  1309.      between the  @symbol  and the  full  stop.   Direct  numeric
  1310.      values, expressions and arrays are not allowed.
  1311.  
  1312.      This extension to  the format of  the @  operator is a  very
  1313.      powerful feature and extends  considerably the power of  the
  1314.      language in interrogating database files.  In particular, it
  1315.      does away with  the need  to select  and reselect  different
  1316.      database files in  order to use  them and  also reduces  the
  1317.      likelihood of introducing bugs by having the wrong  database
  1318.      open at a particular time.
  1319.  
  1320.      Perhaps its  greatest benefit  is that  it allows  a  single
  1321.      screen to access  multiple database  files, something  which
  1322.      was extremely cumbersome in the previous version.
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1329.        - Appendices.                         Page: 20 -
  1330.  
  1331.  
  1332.      2.3.3  Moving around in a file
  1333.  
  1334.      There are  six functions  used to  move the  record  pointer
  1335.      within the file  from one record  to another.   With all  of
  1336.      these functions, the movement is carried out with respect to
  1337.      the current index file, if one is open.
  1338.  
  1339.      The first two  functions, DBtop() and  DBbottom(), move  the
  1340.      record pointer to  the first and  last records  in the  file
  1341.      while DBprev()  and  DBnext()  move the  previous  and  next
  1342.      records.
  1343.  
  1344.      DBskip() will skip, forward or backward through the file  by
  1345.      a specified number of  records.  If an  index is open,  then
  1346.      index ordering will  be used.  DBgo() is  used to  go to  an
  1347.      absolute record  number, but  unlike DBskip(),  it does  not
  1348.      obey any index.
  1349.  
  1350.      There are two functions used to find information in a  file.
  1351.      The first of these, DBlocate() is used to locate a  specific
  1352.      string or  number  in a  database  field (date  and  logical
  1353.      fields are  not currently  supported by  DBlocate()).   This
  1354.      function is based upon the LOCATE command in dBase.
  1355.  
  1356.      In a large file, locating a record may take some time, since
  1357.      it must read  and check every  record to  see if the  search
  1358.      condition is  met.    It  is  therefore  usually  better  to
  1359.      generate an index and use  it with the DBseek() function  to
  1360.      find information.  DBseek(), based upon the SEEK command  in
  1361.      dBase, is used  to find information  in a  file through  its
  1362.      current index.   Because the index  file is  kept in  strict
  1363.      order, the seek can be performed very rapidly.
  1364.  
  1365.      2.3.4  Miscellaneous functions
  1366.  
  1367.      2.3.4.1  Statistical analysis of data
  1368.  
  1369.      There  are  seven  functions,  based  largely  upon  similar
  1370.      functions in Lotus 123, which  can be used to perform  basic
  1371.      statistical analysis upon the data in a database file.   The
  1372.      functions, covered fully in  the function reference, are  as
  1373.      follows:  DBavg(),  DBcount(),  DBstd(),  DBsum(),  DBvar(),
  1374.      DBmax() and DBmin().
  1375.  
  1376.      2.3.4.2  Deletion of information
  1377.  
  1378.      Four  functions  are   used  to  control   the  removal   of
  1379.      information  from  database  files.  These  are  DBdelete(),
  1380.  
  1381.  
  1382.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1383.        - Appendices.                         Page: 21 -
  1384.  
  1385.  
  1386.      DBdeleted(),  DBpack()  and  DBrecall().  When  a  call   to
  1387.      DBdelete() is made to delete a record, the record is  marked
  1388.      for deletion  and  not  physically removed  from  the  file.
  1389.      Thus, a further call to DBrecall() can be made to unmark the
  1390.      record to return it to its normal status.
  1391.  
  1392.      The DBdeleted() function can be used to determine whether  a
  1393.      record has  been  marked  for deletion  or  not,  while  the
  1394.      DBpack() function will permanently  remove all records  from
  1395.      the database which have been marked for deletion.
  1396.  
  1397.      2.3.4.3  Other functions
  1398.  
  1399.      There are nine  other functions  in the  database packed  in
  1400.      RExL which are used to  perform maintenance on the  database
  1401.      file itself.  These functions are
  1402.  
  1403.              Table 2.3: Miscellaneous Database Functions
  1404.  
  1405.      Function       Use
  1406.      DBcountflds()  Returns the number of fields in the database
  1407.      DBexact()      Turn database case sensitivity on and off
  1408.      DBmkdbf()      Create a database
  1409.      DBmkndx()      Create an index file
  1410.      DBreindex()    Re-create an index file
  1411.      DBreccount()   Return the number of records in a database
  1412.      DBrecno()      Return the current record number
  1413.      DBstruct()     Return the current database structure
  1414.      DBzap()        Remove all records from a database
  1415.  
  1416.      By default, the database module is case sensitive,  contrary
  1417.      to the rest of RExL.   This is for reasons of  compatibility
  1418.      with dBase  which  is  case  sensitive.    However,  if  the
  1419.      database files  will  not  be used  with  dBase,  then  case
  1420.      sensitivity can  be  safely set  to  off.   If  index  files
  1421.      generated with  case sensitivity  off are  used with  dBase,
  1422.      then the  results are  unpredictable, since  the index  file
  1423.      format is not identical.
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1437.        - Appendices.                         Page: 22 -
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1491.        - Appendices.                         Page: 23 -
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.                               Chapter 3
  1501.  
  1502.                           Function Reference
  1503.  
  1504.  
  1505.      --------------------------------------------------------------------
  1506.  
  1507.      ABS(number)
  1508.  
  1509.      ABS()  returns  the  absolute  value  (or  modulus)  of  the
  1510.      parameter.
  1511.  
  1512.      Returns:  The parameter expressed as a positive number
  1513.  
  1514.      See also: FLOOR CEIL ROUND
  1515.  
  1516.      Example:  val:=ABS(-10) Returns 10 to the variable val
  1517.  
  1518.      Example:  val:=ABS(10) Returns 10 to the variable val
  1519.  
  1520.      --------------------------------------------------------------------
  1521.  
  1522.      ACOS(number)
  1523.  
  1524.      Returns the arc-cosine of the parameter. The return value is
  1525.      expressed in radians. To convert radians to degrees, use the
  1526.      DEG() function. The value returned  will be in the range  of
  1527.      zero radians to pi radians.
  1528.  
  1529.      Returns:  A number
  1530.  
  1531.      See also: ASIN ATAN DEG
  1532.  
  1533.      Example:  val:=ACOS(0.5) Returns 1.04719775 radians to val.
  1534.  
  1535.      --------------------------------------------------------------------
  1536.      AND(log1,log2)
  1537.  
  1538.      AND() performs a logical AND operation upon the two  logical
  1539.      parameters passed to the function and returns the result  of
  1540.      the  test.  The  function  returns  True  if  both   logical
  1541.      parameters are True otherwise it returns False.
  1542.  
  1543.  
  1544.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1545.        - Appendices.                         Page: 24 -
  1546.  
  1547.  
  1548.      Returns:  A number
  1549.  
  1550.      See also: NOT EQV XOR OR IMP
  1551.  
  1552.      Example:  val:=AND(TRUE(),FALSE())
  1553.  
  1554.                Returns False to to the variable val.
  1555.  
  1556.      ---------------------------------------------------------------------
  1557.      ARavg(num[#],start,end)
  1558.  
  1559.      ARavg() returns  the  average of  the  elements of  the  one
  1560.      dimensional numeric  array parameter  between the  specified
  1561.      start and end elements. Note that unlike ARcount(),  ARavg()
  1562.      takes account of zero values in its calculation.
  1563.  
  1564.      In order  to  determine if  the  value  for the  average  is
  1565.      meaningful, you should also calculate the standard deviation
  1566.      of the data, using the ARstd() function.
  1567.  
  1568.      Returns:  A number
  1569.  
  1570.      See also: ARcount ARsum DBavg
  1571.  
  1572.      Example:  avg:=ARavg(score[#],0,9)
  1573.  
  1574.                Returns, to  the  variable  avg,  the  average  of
  1575.      score[#] over the first to tenth elements inclusive.
  1576.  
  1577.      ---------------------------------------------------------------------
  1578.      ARcount(numstr[#],start,end)
  1579.  
  1580.      ARcount() counts the elements  of the one dimensional  array
  1581.      parameter which are  nonzero, if  the array  is numeric,  or
  1582.      nonempty, if  the array  is of  type  string. The  count  is
  1583.      performed between  the  specified  start  and  end  elements
  1584.      inclusive.
  1585.  
  1586.      Returns:  The number of nonempty elements
  1587.  
  1588.      See also: ARavg ARsum DBcount
  1589.  
  1590.      Example:  n:=ARcount(name$[#],0,2)
  1591.  
  1592.                Returns, to the variable n, the number of nonempty
  1593.      strings in the string array, name$[#], between the first and
  1594.      third elements.
  1595.  
  1596.  
  1597.  
  1598.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1599.        - Appendices.                         Page: 25 -
  1600.  
  1601.  
  1602.      ---------------------------------------------------------------------
  1603.      ARinit(numstr[#])
  1604.  
  1605.      ARinit() clears all  elements of an  array, setting  numeric
  1606.      array values  to  0  and  string array  values  to  "".  The
  1607.      function accepts arrays of any dimension.
  1608.  
  1609.      Returns:  True
  1610.  
  1611.      Example:  ARinit(name$[#])
  1612.  
  1613.                Resets all elements of name$[#] to "".
  1614.  
  1615.      ---------------------------------------------------------------------
  1616.  
  1617.      ARmax(num[#],start,end)
  1618.  
  1619.      ARmax() returns  the  maximum  value of  the  numeric  array
  1620.      parameter between the specified start and end elements.
  1621.  
  1622.      Returns:  A number
  1623.  
  1624.      See also: ARcount ARmin
  1625.  
  1626.      Example:  mmax:=ARmax(score[#],0,9)
  1627.  
  1628.                Returns, to the variable  mmax, the maximum  value
  1629.      of the  numeric  array  score[#] over  the  first  to  tenth
  1630.      elements inclusive.
  1631.  
  1632.      ---------------------------------------------------------------------
  1633.  
  1634.      ARmin(num[#],start,end)
  1635.  
  1636.      ARmin() returns  the  minimum  value of  the  numeric  array
  1637.      parameter between the specified start and end elements.
  1638.  
  1639.      Returns:  A number
  1640.  
  1641.      See also: ARcount ARmax
  1642.  
  1643.      Example:  mmin:=ARmin(score[#],0,9)
  1644.  
  1645.                Returns, to the variable  mmin, the minimum  value
  1646.      of the  numeric  array  score[#] over  the  first  to  tenth
  1647.      elements inclusive.
  1648.  
  1649.      ---------------------------------------------------------------------
  1650.  
  1651.  
  1652.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1653.        - Appendices.                         Page: 26 -
  1654.  
  1655.  
  1656.      ARsize(numstr[#],dimension)
  1657.  
  1658.      ARsize() returns the  size of  the specified  array, in  the
  1659.      specified dimension. The dimensions are defined as follows:
  1660.  
  1661.                   Table 3.1: ARsize() Input Indexing
  1662.  
  1663.      Dimension           Meaning
  1664.           1              x dimension (first dimension)
  1665.           2              y dimension (second dimension)
  1666.           3              z dimension (third dimension)
  1667.  
  1668.      Returns:  The size of the specified dimension
  1669.  
  1670.      Example:  ARsize(name$[#],1)
  1671.  
  1672.                Returns the size of the first, or x, dimension  of
  1673.      the string array name$[#].
  1674.  
  1675.      ---------------------------------------------------------------------
  1676.  
  1677.      ARstd(num[#],start,end)
  1678.  
  1679.      ARstd() returns  the population  standard deviation  of  the
  1680.      values  in  num[#]  between  the  specified  start  and  end
  1681.      elements,  inclusive.  This  function  uses  the  n   method
  1682.      (biased)  to  determine  the   standard  deviation  of   the
  1683.      population data.
  1684.  
  1685.      The standard deviation can be thought of as a measure of the
  1686.      validity of the average of the set of data. If the deviation
  1687.      is small,  then the  average is  good, if  the deviation  is
  1688.      large, then the value for the average could be meaningless.
  1689.  
  1690.      Returns:  A number
  1691.  
  1692.      See also: ARvar ARavg ARcount
  1693.  
  1694.      Example:  std:=ARstd(score[#],0,9)
  1695.  
  1696.                Returns,  to  the   variable  std,  the   standard
  1697.      deviation of the value of  score[#] over the first to  tenth
  1698.      elements inclusive.
  1699.  
  1700.      ---------------------------------------------------------------------
  1701.  
  1702.      ARsum(num[#],start,end)
  1703.  
  1704.  
  1705.  
  1706.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1707.        - Appendices.                         Page: 27 -
  1708.  
  1709.  
  1710.      ARsum() returns the summation of the elements in the  num[#]
  1711.      array  between  the  specified   start  and  end   elements,
  1712.      inclusive.
  1713.  
  1714.      Returns:  A number
  1715.  
  1716.      See also: ARvar ARstd ARavg ARcount
  1717.  
  1718.      Example:  sum:=ARsum(score[#],0,9)
  1719.  
  1720.                Returns, to the variable sum, the sum of the first
  1721.      ten elements of the array score[#]
  1722.  
  1723.      ---------------------------------------------------------------------
  1724.  
  1725.      ARvar(num[#],start,end)
  1726.  
  1727.      ARvar() returns  the population  variance of  the values  in
  1728.      num[#]  between  the  specified  start  and  end   elements,
  1729.      inclusive. This  function  uses  the n  method  (biased)  to
  1730.      determine the standard deviation of the population data.
  1731.  
  1732.      ARvar() is  also  equal  to the  sqaure  of  the  population
  1733.      standard deviation of the array, as returned by the  ARstd()
  1734.      function.
  1735.  
  1736.      Returns:  A number
  1737.  
  1738.      See also: ARstd ARavg ARcount
  1739.  
  1740.      Example:  var:=ARvar(score[#],0,9)
  1741.  
  1742.                Returns, to  the    variable var,  the  population
  1743.      variance of the value of  the array score[#] over the  first
  1744.      to tenth elements inclusive.
  1745.  
  1746.      ---------------------------------------------------------------------
  1747.  
  1748.      ASIN(number)
  1749.  
  1750.      Returns the inverse sine of the parameter. The return  value
  1751.      is expressed in radians and  can range in value from from  -
  1752.      pi/2 to pi/2.
  1753.  
  1754.      Returns:  A number
  1755.  
  1756.      See also: ACOS, ATAN
  1757.  
  1758.  
  1759.  
  1760.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1761.        - Appendices.                         Page: 28 -
  1762.  
  1763.  
  1764.      Example:  val:=ASIN(0.5)
  1765.  
  1766.                Returns 0.52335987756 radians to val
  1767.  
  1768.      ---------------------------------------------------------------------
  1769.  
  1770.      ATAN(number)
  1771.  
  1772.      Returns the  inverse tangent  of the  parameter. The  return
  1773.      value is expressed  in radians and can  range from -pi/2  to
  1774.      pi/2.
  1775.  
  1776.      Returns:  A number
  1777.  
  1778.      See also: ASIN, ACOS
  1779.  
  1780.      Example:  val:=ATAN(0.5)
  1781.  
  1782.                Returns 0.463647609 radians to val
  1783.  
  1784.      ---------------------------------------------------------------------
  1785.  
  1786.      ATTRXY(xpos, ypos)
  1787.  
  1788.      This function returns the attribute (or color value) of  the
  1789.      character displayed at position (xpos,ypos).  The entry  for
  1790.      BOX() has a table of color values which can be used to  work
  1791.      out the actual colors used on the screen.
  1792.  
  1793.      Returns:  A number between 0 and 255
  1794.  
  1795.      See also: PAINT CHARXY
  1796.  
  1797.      Example:  col:=ATTRXY(10,10)
  1798.  
  1799.                Returns the attribute  value of  the character  at
  1800.      screen co-ordinates (10,10).
  1801.  
  1802.      ---------------------------------------------------------------------
  1803.      BEEP(frequency,time)
  1804.  
  1805.      Sounds the  computer's internal  speaker. The  frequency  is
  1806.      measured in  Hertz  and  time  is  measured  in  millseconds
  1807.      (thousandths of a second). If the time parameter is set to 0
  1808.      then the  sound  will be  generated  until another  call  to
  1809.      BEEP() is made.  If time  set to -1, the beeper is  switched
  1810.      off. The following  is a  table of  natural frequencies  and
  1811.      their corresponding musical notes.   time can be as long  as
  1812.  
  1813.  
  1814.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1815.        - Appendices.                         Page: 29 -
  1816.  
  1817.  
  1818.      65534 milliseconds, or  about 65  seconds.   A frequence  of
  1819.      440Hz is A below Middle C.
  1820.  
  1821.                     Table 3.2: BEEP() Frequencies
  1822.  
  1823.        Note   Frequency Note   Frequency
  1824.           C    130.810   C    523.250
  1825.           D    146.830   D    587.330
  1826.           E    164.810   E    659.260
  1827.           F    174.610   F    698.460
  1828.           G    196.000   G    783.990
  1829.           A    220.000   A    880.000
  1830.           B    246.940   B    987.770
  1831.           C    261.630   C    1046.500
  1832.           D    293.660   D    1174.700
  1833.           E    329.630   E    1318.500
  1834.           F    349.230   F    1396.900
  1835.           G    392.000   G    1568.000
  1836.           A    440.000   A    1760.000
  1837.           B    493.880   B    1975.500
  1838.  
  1839.      Returns:  True
  1840.  
  1841.      Example:  BEEP(523.250,1000)
  1842.  
  1843.                Sounds the beeper at middle C for one second.
  1844.  
  1845.      ---------------------------------------------------------------------
  1846.  
  1847.      BOX(x, y, w, h, color, type)
  1848.  
  1849.      Draws a character box on screen. The parameters specify  the
  1850.      coordinates of the top left corner and the desired width and
  1851.      height of the box. The sixth parameter specifies the type of
  1852.      box: type is zero for a single line box and one for a double
  1853.      line box. The color  parameter specifies the attribute  with
  1854.      which the box is to be  drawn. The interior of the box  will
  1855.      be filled with spaces.  Attributes are calculated by  adding
  1856.      the color number of the background (paper color) to that  of
  1857.      the foreground  (ink) color.  The  following are  the  color
  1858.      numbers:
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1869.        - Appendices.                         Page: 30 -
  1870.  
  1871.  
  1872.                    Table 3.3: Color Attribute Codes
  1873.  
  1874.      Color     Foreground     Background
  1875.      Black          0              0
  1876.      Blue           1              16
  1877.      Green          2              32
  1878.      Cyan           3              48
  1879.      Red            4              64
  1880.      Magenta        5              80
  1881.      Brown          6              96
  1882.      Light Gray     7              112
  1883.      Dark Gray      8              (128)
  1884.      Light Blue     9              (144)
  1885.      Light Green    10             (160)
  1886.      Light Cyan     11             (176)
  1887.      Light Red      12             (192)
  1888.      Light Mgnta    13             (208)
  1889.      Yellow         14             (224)
  1890.      White          15             (240)
  1891.      Blink          128            -
  1892.  
  1893.      If the  last  screen  displayed  during  execution  had  the
  1894.      flash-intensity bit set to `intensity', then a further eight
  1895.      background colors, indicated above by the bracketed numbers,
  1896.      are available, at  the expense  of blinking.  Note that  the
  1897.      background colors are derived from the foreground colors  by
  1898.      multiplying by sixteen.
  1899.  
  1900.      Returns:  True
  1901.  
  1902.      See also: PAINT INVERSE
  1903.  
  1904.      Example:  BOX(0,0,79,24,31,1)
  1905.  
  1906.                Draws a double lined white on blue box around  the
  1907.      screen.
  1908.  
  1909.      ---------------------------------------------------------------------
  1910.  
  1911.      BTand(bit1,bit2)
  1912.  
  1913.      BTand() performs  a  bitwise  and  operation  upon  the  two
  1914.      parameters. As with all the bit manipulation functions,  the
  1915.      values are  internally converted  to sixteen  bit words,  so
  1916.      numbers greated than 65535 are treated as 65535 and  numbers
  1917.      less than 1 are treated as zero.
  1918.  
  1919.      Returns:  A number between 0 and 65535
  1920.  
  1921.  
  1922.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1923.        - Appendices.                         Page: 31 -
  1924.  
  1925.  
  1926.      See also: BTnot BTor BTshl BTshr BTxor
  1927.  
  1928.      Example:  bt:=BTand(6,4)
  1929.  
  1930.                Returns a value of 4 to the variable bt
  1931.  
  1932.      ---------------------------------------------------------------------
  1933.  
  1934.      BTnot(bits)
  1935.  
  1936.      BTnot() performs  a  bitwise 16  bit  NOT operation  on  its
  1937.      numeric parameter.
  1938.  
  1939.      Returns:  A number between 0 and 65535
  1940.  
  1941.      See also: BTand BTor BTshl BTshr BTxor
  1942.  
  1943.      Example:  bt:=BTnot(65535) Returns  a  value  of  1  to  the
  1944.      variable bt
  1945.  
  1946.      ---------------------------------------------------------------------
  1947.  
  1948.      BTor(bit1,bit2)
  1949.  
  1950.      BTor() performs a bitwise or operation upon two  sixteen-bit
  1951.      parameters.
  1952.  
  1953.      Returns:  A number between 0 and 65535
  1954.  
  1955.      See also: BTnot BTand BTshl BTshr BTxor
  1956.  
  1957.      Example:  bt:=BTor(6,4)
  1958.  
  1959.                Returns a value of 6 to the variable bt
  1960.  
  1961.      ---------------------------------------------------------------------
  1962.  
  1963.      BTshl(bit1,bit2)
  1964.  
  1965.      BTshl() performs a bitwise left shift of the first parameter
  1966.      by the number of bits specified by the second parameter. The
  1967.      return value of BTshl() is equivalent to the product of  the
  1968.      first parameter and  two raised to the  power of the  second
  1969.      parameter.
  1970.  
  1971.      Returns:  A number between 0 and 65535
  1972.  
  1973.      See also: BTnot BTor BTand BTshr BTxor
  1974.  
  1975.  
  1976.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  1977.        - Appendices.                         Page: 32 -
  1978.  
  1979.  
  1980.      Example:  bt:=BTshl(2,2)
  1981.  
  1982.                Returns a value of 8 to the variable bt
  1983.  
  1984.      ---------------------------------------------------------------------
  1985.  
  1986.      BTshr(bit1,bit2)
  1987.  
  1988.      BTshr()  performs  a  bitwise  right  shift  of  the   first
  1989.      paremeter by  the number  of bits  specified by  the  second
  1990.      parameter. The return value of BTshr() is equivalent to  the
  1991.      quotient of the first parameter divided by two raised to the
  1992.      power of the second parameter.
  1993.  
  1994.      Returns:  A number between 0 and 65535
  1995.  
  1996.      See also: BTnot BTor BTshl BTand BTxor
  1997.  
  1998.      Example:  bt:=BTshr(8,2)
  1999.  
  2000.                Returns a value of 2 to the variable bt
  2001.  
  2002.      ---------------------------------------------------------------------
  2003.  
  2004.      BTxor(bit1,bit2)
  2005.  
  2006.      BTxor() performs a bitwise  exclusive or operation upon  the
  2007.      two sixteen bit parameters.
  2008.  
  2009.      Returns:  A number between 0 and 65535
  2010.  
  2011.      See also: BTnot BTor BTshl BTshr BTand
  2012.  
  2013.      Example:  bt:=BTxor(32767,16)
  2014.  
  2015.                Returns a value of 32751 to the variable bt
  2016.  
  2017.      ---------------------------------------------------------------------
  2018.  
  2019.      CEIL(number)
  2020.  
  2021.      CEIL()  returns  the  smallest   number  greater  than   the
  2022.      parameter.
  2023.  
  2024.      Returns:  A number
  2025.  
  2026.      See also: FLOOR
  2027.  
  2028.  
  2029.  
  2030.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2031.        - Appendices.                         Page: 33 -
  2032.  
  2033.  
  2034.      Example:  a:=CEIL(5.5)
  2035.  
  2036.                Returns the value 6.0 to the variable a.
  2037.  
  2038.      ---------------------------------------------------------------------
  2039.  
  2040.      CHAR$(asciicode)
  2041.  
  2042.      Returns the ASCII character whose ASCII code is asciicode.
  2043.  
  2044.      Returns:  A one-character string
  2045.  
  2046.      See also: CODE
  2047.  
  2048.      Example:  t$:=CODE(65)
  2049.  
  2050.                Returns the letter "A", whose ASCII code is 65, to
  2051.      the variable t$.
  2052.  
  2053.      ---------------------------------------------------------------------
  2054.  
  2055.      CHARXY$(xpos,ypos)
  2056.  
  2057.      CHARXY$() returns the ASCII code of the character  displayed
  2058.      at the  screen coordinates  (xpos,ypos). The  top left  hand
  2059.      corner of the screen is position (0,0) and the bottom  right
  2060.      corner is position (79,24).
  2061.  
  2062.      Returns:  A number
  2063.  
  2064.      See also: CHAR$ ATTRXY
  2065.  
  2066.      Example:  asciival:=CHARXY(0,0)
  2067.  
  2068.                Assigns the ascii value of the character displayed
  2069.      at position (0,0), the top left corner.
  2070.  
  2071.      ---------------------------------------------------------------------
  2072.  
  2073.      CLS()
  2074.  
  2075.      CLS() clears the screen. The screen will be set to white  on
  2076.      black and the cursor  position will be set  to the top  left
  2077.      hand corner.
  2078.  
  2079.      Returns:  True
  2080.  
  2081.      Example:  CLS()
  2082.  
  2083.  
  2084.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2085.        - Appendices.                         Page: 34 -
  2086.  
  2087.  
  2088.                Clears the screen.
  2089.  
  2090.      ---------------------------------------------------------------------
  2091.      CODE(character$)
  2092.  
  2093.      Returns the ASCII  code of the  first letter  of the  string
  2094.      parameter.  See appendix F for a table of ASCII codes.
  2095.  
  2096.      Returns:  A number
  2097.  
  2098.      See also: CHAR$
  2099.  
  2100.      Example:  asciival:=CODE("A")
  2101.  
  2102.                Returns 65  to asciival,  the ASCII  code for  the
  2103.      letter "A".
  2104.  
  2105.      ---------------------------------------------------------------------
  2106.  
  2107.      COS(angle)
  2108.  
  2109.      Calculates the  cosine  of the  angle,  where the  angle  is
  2110.      measured in radians. The return  value will be in the  range
  2111.      of -1  to 1.  The ACOS()  function  is used  to convert  the
  2112.      cosine of an angle to the angle.
  2113.  
  2114.      Returns:  A number
  2115.  
  2116.      Example:  val:=COS(0.5)
  2117.  
  2118.                Returns 0.8775825619 to the variable val.
  2119.  
  2120.      ---------------------------------------------------------------------
  2121.  
  2122.      CTERM(rate, end, start)
  2123.  
  2124.      CTERM() returns the number of compound periods it would take
  2125.      for the start value, at the specified interest rate to  grow
  2126.      to the end  value. The  rate should  be the  specified as  a
  2127.      decimal fraction rather than a percentage.
  2128.  
  2129.      Returns:  A number
  2130.  
  2131.      See also: FV PMT PV RATE TERM
  2132.  
  2133.      Example:  yrs:=CTERM(0.1,100,10)
  2134.  
  2135.  
  2136.  
  2137.  
  2138.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2139.        - Appendices.                         Page: 35 -
  2140.  
  2141.  
  2142.                Returns 24.1588 interest  periods to the  variable
  2143.      yrs, indicating that it would  take 24 years and two  months
  2144.      for an amount of $10  to grow to $100 at  a rate of 10%  per
  2145.      annum.
  2146.  
  2147.      ---------------------------------------------------------------------
  2148.  
  2149.      DBappend(none)
  2150.  
  2151.      Adds a new blank record to the end of the currently selected
  2152.      database file.
  2153.  
  2154.      Returns:  True if successful, False otherwise
  2155.  
  2156.      See also: DBreplace
  2157.  
  2158.      Example:  DBappend()
  2159.  
  2160.      ---------------------------------------------------------------------
  2161.  
  2162.      DBavg(field$,start,end)
  2163.  
  2164.      DBavg() returns the average of  the fields of the  currently
  2165.      open database, between the specified start and end   fields.
  2166.      (Note that  unlike  the  function DBcount(),  DBavg()  takes
  2167.      account of zero values). Note that the specified field  must
  2168.      be numeric and not string.
  2169.  
  2170.      Returns:  A number
  2171.  
  2172.      See also: DBcount DBsum DBavg
  2173.  
  2174.      Example:  avg:=DBavg("AMOUNT",1,10)
  2175.  
  2176.                avg is assigned the average of the field  "AMOUNT"
  2177.      in the current database between the first and tenth  records
  2178.      inclusive.
  2179.  
  2180.      ---------------------------------------------------------------------
  2181.  
  2182.      DBbottom()
  2183.  
  2184.      Places  the  record  pointer  at  the  last  record  in  the
  2185.      currently selected database file in index order.
  2186.  
  2187.      Returns:  True if successful, False otherwise
  2188.  
  2189.      See also: DBtop
  2190.  
  2191.  
  2192.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2193.        - Appendices.                         Page: 36 -
  2194.  
  2195.  
  2196.      Example:  DBbottom()
  2197.  
  2198.                This will go  to the  last record  in the  current
  2199.      database using the current index.
  2200.  
  2201.      ---------------------------------------------------------------------
  2202.  
  2203.      DBcloseall()
  2204.  
  2205.      Closes all  open  database and  index  files. It  is  better
  2206.      practice to close each file separately using DBclosedbf().
  2207.  
  2208.      Returns:  True if successful, False otherwise.
  2209.  
  2210.      Example:  DBcloseall()
  2211.  
  2212.      ---------------------------------------------------------------------
  2213.  
  2214.      DBclosedbf()
  2215.  
  2216.      Closes the currently  open database file.  Any active  index
  2217.      files will also  be closed.  It will  fail if  there are  no
  2218.      files open.
  2219.  
  2220.      Returns:  True if successful, False otherwise
  2221.  
  2222.      See also: DBcloseall DBclosendx
  2223.  
  2224.      Example:  DBclosedbf()
  2225.  
  2226.      ---------------------------------------------------------------------
  2227.  
  2228.      DBclosendx(num)
  2229.  
  2230.      Closes the index  file addressed  by the  index file  handle
  2231.      num.
  2232.  
  2233.      Returns:  True if successful, False otherwise
  2234.  
  2235.      See also: DBusendx
  2236.  
  2237.      Example:  DBclosendx(names)
  2238.  
  2239.                Closes the index file  linked to the index  handle
  2240.      names.
  2241.  
  2242.      ---------------------------------------------------------------------
  2243.  
  2244.  
  2245.  
  2246.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2247.        - Appendices.                         Page: 37 -
  2248.  
  2249.  
  2250.      DBcount(field$,start,end)
  2251.  
  2252.      DBcount()  counts  the  fields   of  the  currently   active
  2253.      database,  between  the  specified  start  and  end  records
  2254.      elements, which are  nonzero, if  the field  is numeric,  or
  2255.      nonempty, if the field is of type string.
  2256.  
  2257.      Returns:  The number of nonempty fields
  2258.  
  2259.      See also: DBavg DBsum DBcount
  2260.  
  2261.      Example:  n:=DBcount("DONATION",1,DBreccount())
  2262.  
  2263.                n  is  assigned  the  number  of  records  in  the
  2264.      currently open database which have nonempty DONATION fields.
  2265.  
  2266.      ---------------------------------------------------------------------
  2267.  
  2268.      DBcountflds()
  2269.  
  2270.      DBcountflds() returns the  number of fields  in a record  in
  2271.      the currently selected database file. This function is  most
  2272.      useful for determining if a call to DBstruct() would  result
  2273.      in an error from too many fields in the database.
  2274.  
  2275.      Returns:  A number
  2276.  
  2277.      Example:  ARsize(name$[#],1)<DBcountflds()
  2278.  
  2279.                This line fails if the size of the name$[#]  array
  2280.      is smaller than the number  of fields in the database.  This
  2281.      is a  useful check  to perform  whenever an  application  is
  2282.      dealing with unknown databases.
  2283.  
  2284.      ---------------------------------------------------------------------
  2285.  
  2286.      DBdelete()
  2287.  
  2288.      Marks the current record in the currently open database  for
  2289.      deletion. It may  be physically deleted  using the  DBpack()
  2290.      command and  recalled  from  deletion using  the  DBrecall()
  2291.      function.
  2292.  
  2293.      Returns:  True if successful, False otherwise
  2294.  
  2295.      See also: DBpack DBrecall DBdeleted
  2296.  
  2297.      Example:  DBdelete()
  2298.  
  2299.  
  2300.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2301.        - Appendices.                         Page: 38 -
  2302.  
  2303.  
  2304.      ---------------------------------------------------------------------
  2305.  
  2306.      DBdeleted()
  2307.  
  2308.      Returns True if  the current database  record is marked  for
  2309.      deletion.
  2310.  
  2311.      Returns:  True if marked, False otherwise
  2312.  
  2313.      See also: DBpack DBrecall DBdelete
  2314.  
  2315.      Example:  DBdeleted()
  2316.  
  2317.      ---------------------------------------------------------------------
  2318.  
  2319.      DBexact(number)
  2320.  
  2321.      DBexact() switches case sensitivity off, if the parameter is
  2322.      zero or  on for  nonzero values.  By default,  the  database
  2323.      module is  case sensitive,  to maintain  compatibility  with
  2324.      dBase index files.  If you intend to  use the same  database
  2325.      and  index  files   with  dBase,  you   should  leave   case
  2326.      sensitivity on.
  2327.  
  2328.      Returns:  True
  2329.  
  2330.      Example:  DBexact(0)
  2331.  
  2332.                Switches case sensitivity  off, to follow the RExL
  2333.      convention.
  2334.  
  2335.      ---------------------------------------------------------------------
  2336.      DBgo(recnum)
  2337.  
  2338.      DBgo() moves  the current  record pointer  to record  number
  2339.      recnum in  the  currently  selected database.  The  function
  2340.      returns false if  the specified record  number is less  than
  2341.      one or greater than the number of records in the database.
  2342.  
  2343.      Returns:  True if successful, False otherwise
  2344.  
  2345.      See also: DBrecno DBskip
  2346.  
  2347.      Example:  DBgo(DBreccount())
  2348.  
  2349.                This positions  the  record  pointer at  the  last
  2350.      record in the currently selected database. This performs the
  2351.      same action as DBbottom().
  2352.  
  2353.  
  2354.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2355.        - Appendices.                         Page: 39 -
  2356.  
  2357.  
  2358.      ---------------------------------------------------------------------
  2359.  
  2360.      DBlocate(field$,numstr,start,direction)
  2361.  
  2362.      DBlocate() will locate  the number or  string numstr in  the
  2363.      field  field$,  in  the  currently  open  database.   Unlike
  2364.      DBseek(), it does not  require an index to  be open and  the
  2365.      search can be  carried out  on any  field in  the file.  The
  2366.      search starts from record number start and moving  backwards
  2367.      if direction is negative and  forwards if zero or  positive.
  2368.      In the  current release,  only numeric  and string  database
  2369.      fields may be used with DBlocate().
  2370.  
  2371.      Returns:  True if located successfully, False otherwise
  2372.  
  2373.      See also: DBseek
  2374.  
  2375.      Example:  DBlocate("CUST","MCCA01",0,1)
  2376.  
  2377.                Tries to  find the  string  "MCCA01" in  the  CUST
  2378.      field of the current database starting from the first record
  2379.      in the database moving forward.
  2380.  
  2381.      Example:  DBlocate("CUSTNUM",1234)
  2382.  
  2383.                Tries to find the number 1234 in the field CUSTNUM
  2384.      in the current database.
  2385.  
  2386.      ---------------------------------------------------------------------
  2387.  
  2388.      DBmax(field$,start,end)
  2389.  
  2390.      DBmax()  returns  the  maximum  value  of  the  field  named
  2391.      "field$" in  the  current  database, between  the  specified
  2392.      start and end records. Note that the specified field must be
  2393.      numeric and not string.
  2394.  
  2395.      Returns:  A number
  2396.  
  2397.      See also: DBcount DBsum DBavg DBmin
  2398.  
  2399.      Example:  q:=DBmax("PAYMENT",1,10)
  2400.  
  2401.                Returns, to the variable  q, the maximum value  of
  2402.      the PAYMENT field in the current database between the  first
  2403.      and tenth records, inclusive.
  2404.  
  2405.      ---------------------------------------------------------------------
  2406.  
  2407.  
  2408.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2409.        - Appendices.                         Page: 40 -
  2410.  
  2411.  
  2412.      DBmin(field$,start,end)
  2413.  
  2414.      DBmin() returns the minimum value of the field specified  by
  2415.      field$ in the current database, between the specified  start
  2416.      and end records. The specified field must be numeric.
  2417.  
  2418.      Returns:  A number
  2419.  
  2420.      See also: DBcount DBsum DBavg DBmax
  2421.  
  2422.      Example:  q:=DBmin("PAYMENT",1,10)
  2423.  
  2424.                Returns, to the variable  q, the minimum value  of
  2425.      the PAYMENT field in the current database between the  first
  2426.      and tenth records, inclusive.
  2427.  
  2428.      ---------------------------------------------------------------------
  2429.  
  2430.      DBmkdbf(name$,num,n$[#],t$[#],len[#],dec[#])
  2431.  
  2432.      DBmkdbf() creates a new database file name$ with num  number
  2433.      of fields. The specifictions for the fields are contained in
  2434.      the arrays passed  to the  function: The  first array  n$[#]
  2435.      specifies the list  of field names in  the file, the  second
  2436.      t$[#] defines the  types of  the fields  ("C" for  character
  2437.      fields, "N" for  numeric, "D" for date  and "L" for  logical
  2438.      fields), the third array contains field widths and the final
  2439.      array specifies  the number  of decimal  places for  numeric
  2440.      fields.
  2441.  
  2442.      Returns:  True if successful, False otherwise.
  2443.  
  2444.      Example:  DBmkdbf("NEWFILE",4,n$[#],t$[#],len[#],dec[#])
  2445.  
  2446.                Creates a database  called NEWFILE.DBF, with  four
  2447.      fields as defined by the arrays.
  2448.  
  2449.      ---------------------------------------------------------------------
  2450.  
  2451.      DBmkndx(indexname$,keyname$)
  2452.  
  2453.      Creates an index file  for the currently selected  database.
  2454.      The first parameter  specifies a  file name  and the  second
  2455.      specifies a field name to index it on. The file extension of
  2456.      the index file will be  ".NDX". irrespective of whether  one
  2457.      was specified or not.  The index will be opened after it has
  2458.      been created.
  2459.  
  2460.  
  2461.  
  2462.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2463.        - Appendices.                         Page: 41 -
  2464.  
  2465.  
  2466.      Returns:  True if successful, False otherwise
  2467.  
  2468.      See also: DBusendx
  2469.  
  2470.      Example:  idx:=DBmkndx("test","name")
  2471.  
  2472.                Creates an  index called  "test.ndx" which  orders
  2473.      the currently selected database on the NAME field.
  2474.  
  2475.      ---------------------------------------------------------------------
  2476.  
  2477.      DBnext()
  2478.  
  2479.      Increments the record pointer to  the next record, in  index
  2480.      order if an index  is open. It will  return an error if  the
  2481.      record pointer is already at the end of the file.
  2482.  
  2483.      Returns:  True if successfully moved, False otherwise
  2484.  
  2485.      See also: DBprev
  2486.  
  2487.      Example:  DBnext()
  2488.  
  2489.                Goes to the  next record in  the current  database
  2490.      using the current index.
  2491.  
  2492.      ---------------------------------------------------------------------
  2493.  
  2494.      DBpack()
  2495.  
  2496.      Removes all the records in the currently open database  file
  2497.      which have  been marked  for deletion  using the  DBdelete()
  2498.      function.    Deleted  records   cannot  be  recovered   with
  2499.      DBrecall() after a call to this function has been made.
  2500.  
  2501.      Returns:  True if successful, False otherwise
  2502.  
  2503.      See also: DBrecall DBdelete
  2504.  
  2505.      Example:  DBpack()
  2506.  
  2507.                Deletes all records marked for deletion.
  2508.  
  2509.      ---------------------------------------------------------------------
  2510.  
  2511.      DBprev()
  2512.  
  2513.  
  2514.  
  2515.  
  2516.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2517.        - Appendices.                         Page: 42 -
  2518.  
  2519.  
  2520.      Decrements the  current  record  pointer  to  point  at  the
  2521.      previous record,  in index  order if  one is  open. It  will
  2522.      return an  error if  the record  pointer is  already at  the
  2523.      beginning of the file.
  2524.  
  2525.      Returns:  True if successfully moved, False otherwise
  2526.  
  2527.      See also: DBnext
  2528.  
  2529.      Example:  DBprev()
  2530.  
  2531.      ---------------------------------------------------------------------
  2532.  
  2533.      DBrecall()
  2534.  
  2535.      Undoes the  effect of  a DBdelete()  call by  resetting  the
  2536.      deletion marker on the current  record. The record will  not
  2537.      then be removed in a subsequent call to DBpack().
  2538.  
  2539.      Returns:  True
  2540.  
  2541.      See also: DBpack DBdelete
  2542.  
  2543.      Example:  DBrecall()
  2544.  
  2545.                Recalls the current record from deletion.
  2546.  
  2547.      ---------------------------------------------------------------------
  2548.  
  2549.      DBreccount()
  2550.  
  2551.      Returns the  number of  records  in the  currently  selected
  2552.      database.
  2553.  
  2554.      Returns:  A number
  2555.  
  2556.      See also: DBrecno DBgo
  2557.  
  2558.      Example:  maxrec:=DBreccount()
  2559.  
  2560.                Sets the variable maxrec to the number of  records
  2561.      in the database.
  2562.  
  2563.      ---------------------------------------------------------------------
  2564.  
  2565.      DBrecno()
  2566.  
  2567.  
  2568.  
  2569.  
  2570.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2571.        - Appendices.                         Page: 43 -
  2572.  
  2573.  
  2574.      Returns the number  of the current  record in the  currently
  2575.      selected database.
  2576.  
  2577.      Returns:  A number
  2578.  
  2579.      See also: DBreccount DBgo
  2580.  
  2581.      Example:  currec:=DBrecno()
  2582.  
  2583.                Sets the  variable  currec  to the  current  recor
  2584.      number.
  2585.  
  2586.      ---------------------------------------------------------------------
  2587.  
  2588.      DBreindex(indexhandle)
  2589.  
  2590.      Reindexes an  index  file  addressed  by  indexhandle.  This
  2591.      command is used if you  have an index file which has  become
  2592.      out of date  with respect  to its  corresponding data  file,
  2593.      caused by adding or deleting records from the database while
  2594.      having the index closed.
  2595.  
  2596.      Returns:  True if successful, False otherwise
  2597.  
  2598.      See also: DBmkndx
  2599.  
  2600.      Example:  DBreindex(ihandle)
  2601.  
  2602.                Reindexes the index file  referenced by the  index
  2603.      handle ihandle.
  2604.  
  2605.      ---------------------------------------------------------------------
  2606.  
  2607.      DBreplace(fieldname$, numstr)
  2608.  
  2609.      Writes the string or number numstr to the field specified by
  2610.      fieldname$. The value will be stored accurate to the  number
  2611.      of places available in  the data file, or  as zero if it  is
  2612.      too large.  See the  `Introduction  to Databases'  for  more
  2613.      information on how this function behaves.
  2614.  
  2615.      Returns:  True if successful, False otherwise
  2616.  
  2617.      See also: DBrstr$ DBrnum
  2618.  
  2619.      Example:  DBreplace("custcode",10)
  2620.  
  2621.                Writes the value 10 to the CUSTCODE field.
  2622.  
  2623.  
  2624.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2625.        - Appendices.                         Page: 44 -
  2626.  
  2627.  
  2628.      Example:  DBreplace("custname","RH")
  2629.  
  2630.                Writes the string "RH" to the CUSTNAME field.
  2631.  
  2632.      ---------------------------------------------------------------------
  2633.  
  2634.      DBrnum(fieldname$)
  2635.  
  2636.      Returns the value of the field named fieldname$ as a number.
  2637.      See the `Introduction to Databases' for more information  on
  2638.      how this  function behaves.  This function  is included  for
  2639.      compatibility with  earlier versions  of RExL  and has  been
  2640.      superceded by the `@' and `@$' operators.
  2641.  
  2642.      Returns:  A number
  2643.  
  2644.      See also: DBrstr$
  2645.  
  2646.      Example:  a:=DBrnum("custcode")
  2647.  
  2648.                Returns the  value of  the field  CUSTCODE to  the
  2649.      variable a.
  2650.  
  2651.      ---------------------------------------------------------------------
  2652.  
  2653.      DBrseek(dbf_handle, numstr)
  2654.  
  2655.      DBrseek() finds  an  index key  value  of the  type  variant
  2656.      parameter numstr  in the  database  file referenced  by  the
  2657.      handle dbf_handle. If  the seek  value in  numstr is  longer
  2658.      than the index key expression,  then the seek value will  be
  2659.      truncated. If the database file has no index attached to  it
  2660.      then an error will be generated and the function will fail.
  2661.  
  2662.      This function is extremely powerful as it adds a measure  of
  2663.      relational database capability to RExL.
  2664.  
  2665.      Returns:  1 if a successful seek was performed
  2666.                2 if a partial match was located
  2667.                0 if no match could be found.
  2668.  
  2669.      See also: DBlocate DBseek
  2670.  
  2671.      Example:  [Expr] DBseek(cust, "Robin")
  2672.  
  2673.                Positions the record pointer  at the first  record
  2674.      in the database  file referenced  by the  file handle  cust,
  2675.      which contains a key field value of "Robin".
  2676.  
  2677.  
  2678.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2679.        - Appendices.                         Page: 45 -
  2680.  
  2681.  
  2682.      Example:  [Expr] DBseek(orders,@cust.orderno)
  2683.  
  2684.                Finds the first occurrence  (in the database  file
  2685.      referenced by the  file handle orders) of  the value in  the
  2686.      orderno field of the database file referenced by the  handle
  2687.      cust. This   example illustrates  the  power  of  DBrseek(),
  2688.      where the  contents  of one  database  can   be   used    to
  2689.      retrieve  information immediately from another database.
  2690.  
  2691.      ---------------------------------------------------------------------
  2692.  
  2693.      DBrstr$(fieldname$)
  2694.  
  2695.      Returns the value of the field named fieldname$ as a string.
  2696.      See the `Introduction to Databases' for more information  on
  2697.      how this  function behaves.  This function  is included  for
  2698.      compatibility with  earlier versions  of RExL  and has  been
  2699.      superceded by the `@' and `@$' operators.
  2700.  
  2701.      Returns:  A string
  2702.  
  2703.      See also: DBrnum
  2704.  
  2705.      Example:  a$:=DBrstr$("custname")
  2706.  
  2707.                Returns the  value of  the field  CUSTNAME to  the
  2708.      variable a$.
  2709.  
  2710.      ---------------------------------------------------------------------
  2711.  
  2712.      DBseek(numstr)
  2713.  
  2714.      Finds a  matching key  value in  a numeric  or string  field
  2715.      using the  current index.  A value  will be  found which  is
  2716.      accurate to the fields width. If there is no index file open
  2717.      and selected, then this function call will fail.
  2718.  
  2719.      Returns:  1 if  successful, 2  for partial  match, 0  if  no
  2720.      match
  2721.  
  2722.      See also: DBlocate
  2723.  
  2724.      Example:  DBseek(37.2)
  2725.  
  2726.                Positions the record pointer  at the first  record
  2727.      in the database which contains a key field value of 37.2.
  2728.  
  2729.      Example:  DBseek("String")
  2730.  
  2731.  
  2732.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2733.        - Appendices.                         Page: 46 -
  2734.  
  2735.  
  2736.                Finds the first occurrence of the string  "String"
  2737.      in the index key field.
  2738.  
  2739.      ---------------------------------------------------------------------
  2740.  
  2741.      DBseldbf(filehandle)
  2742.  
  2743.      Selects the database file addressed by filehandle and  makes
  2744.      it the current database.   The file handle is linked to  the
  2745.      file using the  DBusedbf() command.  If there  was an  index
  2746.      file associated  with  the  database, then  the  index  will
  2747.      automatically be selected.
  2748.  
  2749.      Returns:  True if successful, false otherwise
  2750.  
  2751.      See also: DBusedbf
  2752.  
  2753.      Example:  DBseldbf(names)
  2754.  
  2755.                Makes the file linked to the file handle names the
  2756.      currently selected database file.
  2757.  
  2758.      ---------------------------------------------------------------------
  2759.  
  2760.      DBselndx(ihandle)
  2761.  
  2762.      Selects an open index file,  referenced by the index  handle
  2763.      ihandle,  with  which  to   order  the  currently   selected
  2764.      database. The number passed is the index handle generated by
  2765.      DBusendx().
  2766.  
  2767.      Returns:  True if successful, false otherwise
  2768.  
  2769.      See also: DBusendx DBclosendx
  2770.  
  2771.      Example:  DBselndx(names)
  2772.  
  2773.                Selects the  index file  referenced by  the  index
  2774.      file handle  names  and applies  it  to the  currently  open
  2775.      database.
  2776.  
  2777.      ---------------------------------------------------------------------
  2778.  
  2779.      DBskip(numrecs)
  2780.  
  2781.      Skips past  the next  numrecs number  of records,  in  index
  2782.      order if one is open. It will return an error if you attempt
  2783.      to skip beyond the end of the file.
  2784.  
  2785.  
  2786.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2787.        - Appendices.                         Page: 47 -
  2788.  
  2789.  
  2790.      Returns:  True if successful, False otherwise
  2791.  
  2792.      See also: DBgo
  2793.  
  2794.      Example:  DBskip(1)
  2795.  
  2796.                Goes to the next record in index order.
  2797.  
  2798.      ---------------------------------------------------------------------
  2799.  
  2800.      DBstd(field$,start,end)
  2801.  
  2802.      DBstd() returns  the population  standard deviation  of  the
  2803.      field$ field  in the  current database,  over the  range  of
  2804.      start to end  fields. The  specified field  must be  numeric
  2805.      type and not string. The deviation is calculated using the n
  2806.      method (unbiased), as in the ARstd() function.
  2807.  
  2808.      Returns:  A number
  2809.  
  2810.      See also: DBvar DBsum DBavg
  2811.  
  2812.      Example:  stddev:=DBstd("PAYMENT",1,10)
  2813.  
  2814.                Returns, to  the  variable  stddev,  the  standard
  2815.      deviation of  the  PAYMENT  field in  the  current  database
  2816.      between the first and tenth records, inclusive.
  2817.  
  2818.      ---------------------------------------------------------------------
  2819.  
  2820.      DBstruct(n$[#],t$[#],len[#],dec[#])
  2821.  
  2822.      Returns the number of fields in the currently open database.
  2823.      The parameters  return a  list of  the field  names,  types,
  2824.      widths and defined decimal places. The function will  return
  2825.      with an error if the arrays  are not big enough to hold  the
  2826.      information required.
  2827.  
  2828.      Returns:  Number of fields if successful, False otherwise
  2829.  
  2830.      See also: DBcountflds
  2831.  
  2832.      Example:  n:=DBstruct(n$[#],t$[#],len[#],dec[#])
  2833.  
  2834.                Returns the number  of fields in  the database  to
  2835.      the variable n and places the names of the fields in  n$[#],
  2836.      the field types  in t$[#], their lengths  in len[#] and  the
  2837.      decimal field width of numeric fields in dec[#].
  2838.  
  2839.  
  2840.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2841.        - Appendices.                         Page: 48 -
  2842.  
  2843.  
  2844.      ---------------------------------------------------------------------
  2845.  
  2846.      DBsum(field$,start,end)
  2847.  
  2848.      DBsum() returns the  sum of the  field named  field$ in  the
  2849.      current database, over  the range of  start to end  records.
  2850.      The specified field must be of numeric type.
  2851.  
  2852.      Returns:  A number
  2853.  
  2854.      See also: DBcount DBavg
  2855.  
  2856.      Example:  sum:=DBsum("PAYMENT",1,DBreccount())
  2857.  
  2858.                Returns, to the sumiable sum, the sum of "PAYMENT"
  2859.      field in the current database for all records in the file.
  2860.  
  2861.      ---------------------------------------------------------------------
  2862.  
  2863.      DBtop()
  2864.  
  2865.      Positions the  record pointer  at the  first record  in  the
  2866.      currently open database.  If there  is an  index active,  it
  2867.      will go to the first record in this index. An error will  be
  2868.      reported if  no  database  has  been  selected,  or  if  the
  2869.      database is empty when the returned value will be zero.
  2870.  
  2871.      Returns:  True if successfully moved, False otherwise
  2872.  
  2873.      See also: DBbottom
  2874.  
  2875.      Example:  DBtop()
  2876.  
  2877.      ---------------------------------------------------------------------
  2878.  
  2879.      DBusedbf(filename$)
  2880.  
  2881.      DBusedbf() opens  a  database file  for  use and  returns  a
  2882.      database file handle with which the file may be accessed.  A
  2883.      database file may be made current by selecting the  database
  2884.      handle using DBseldbf().
  2885.  
  2886.      Returns:  Database  file   handle   if   successful,   False
  2887.      otherwise
  2888.  
  2889.      See also: DBseldbf DBclosedbf
  2890.  
  2891.      Example:  f:=DBusedbf("test")
  2892.  
  2893.  
  2894.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2895.        - Appendices.                         Page: 49 -
  2896.  
  2897.  
  2898.                Opens  a  database  file  called  "TEST.DBF"   and
  2899.      returns its file handle to the variable f.
  2900.  
  2901.      ---------------------------------------------------------------------
  2902.  
  2903.      DBusendx(indexname$)
  2904.  
  2905.      DBusendx() opens an  index file for  use with the  currently
  2906.      selected database file and returns an index file handle. The
  2907.      default and necessary index file extension is ".NDX",  which
  2908.      is aupplied automatically  if omitted.   When the index  has
  2909.      been opened using this function,  it may be activated  using
  2910.      the DBselndx() command.
  2911.  
  2912.      Returns:  Index file handle, False if error
  2913.  
  2914.      See also: DBclosendx DBselndx
  2915.  
  2916.      Example:  idx:=DBusendx("test")
  2917.  
  2918.                Returns  an  index  handle  to  the  variable  idx
  2919.      through which the index file "TEST.NDX" may be accessed.
  2920.  
  2921.      ---------------------------------------------------------------------
  2922.      DBvar(field$,start,end)
  2923.  
  2924.      DBvar() returns the population variance of the field$  field
  2925.      in the  current database,  over the  range of  start to  end
  2926.      fields. The specified  field must  be numeric  type and  not
  2927.      string. The  variance  is  calculated  using  the  n  method
  2928.      (unbiased), as in he ARvar() function.
  2929.  
  2930.      Returns:  A number
  2931.  
  2932.      See also: DBstd DBsum DBavg
  2933.  
  2934.      Example:  var:=DBvar("PAYMENT",1,10)
  2935.  
  2936.                Returns,  to  the   variable  var,  the   standard
  2937.      deviation of  the  field  named  "PAYMENT"  in  the  current
  2938.      database between the first and tenth records, inclusive.
  2939.  
  2940.      ---------------------------------------------------------------------
  2941.  
  2942.      DBzap()
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  2949.        - Appendices.                         Page: 50 -
  2950.  
  2951.  
  2952.      DBzap()  removes  all  records  from  the  currently  active
  2953.      database, irrespective of the  status of the deletion  flag.
  2954.      Use this command with care!
  2955.  
  2956.      Returns:  True if successful, False otherwise
  2957.  
  2958.      See also: DBpack DBdelete
  2959.  
  2960.      Example:  DBzap()
  2961.  
  2962.                Erases the contents of the current database.
  2963.  
  2964.      ---------------------------------------------------------------------
  2965.  
  2966.      DEG(radianangle)
  2967.  
  2968.      Converts from radian angle measure to degrees. Note that all
  2969.      trigonometric functions in RExL use radian measure for input
  2970.      and output.
  2971.  
  2972.      Returns:  A number
  2973.  
  2974.      See also: RAD
  2975.  
  2976.      Example:  degangle:=DEG(0.5)
  2977.  
  2978.                Returns 28.64788 degrees to the variable degangle.
  2979.  
  2980.      ---------------------------------------------------------------------
  2981.  
  2982.      DISPLAY(text$)
  2983.  
  2984.      Displays text$ at  the current cursor  position. The  cursor
  2985.      position may be set using the GOTOXY() function.   DISPLAY()
  2986.      also uses a number of `escape sequences' which are identical
  2987.      those found in the C language.  An escape sequence  consists
  2988.      of a backslash followed by  some character.  In the  current
  2989.      version four escape sequences are defined:
  2990.  
  2991.                 Table 3.4: DISPLAY() escape sequences
  2992.  
  2993.      \t   Move one tab stop to the right
  2994.      \n   Move to beginning of next line
  2995.           scrolling the screen if needed
  2996.      \a   Ring the terminal bell
  2997.      \\   Output the backslash character
  2998.  
  2999.      Returns:  True
  3000.  
  3001.  
  3002.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3003.        - Appendices.                         Page: 51 -
  3004.  
  3005.  
  3006.      Example:  DISPLAY("Hello, world\n\t")
  3007.  
  3008.                Displays the  string  "Hello, world",  moving  the
  3009.      cursor down one line and one tab stop to the right.
  3010.  
  3011.      ---------------------------------------------------------------------
  3012.  
  3013.      DIV(number, divisor)
  3014.  
  3015.      Returns the  result of  the integer  division of  the  first
  3016.      number by  the second.  Both parameters  must be  less  than
  3017.      2,147,483,647 for this function to produce a correct  value,
  3018.      otherwise an overflow will occur.
  3019.  
  3020.      Returns:  A number
  3021.  
  3022.      See also: MOD
  3023.  
  3024.      Example:  x:=DIV(25,3)
  3025.  
  3026.                Returns 8 to the variable x.
  3027.  
  3028.      ---------------------------------------------------------------------
  3029.  
  3030.      DTdate(year,month,day)
  3031.  
  3032.      DTdate() takes  three parameters,  year, month  and  day-of-
  3033.      month and returns the julian  day number of that date, or  0
  3034.      if the date is invalid. See the section on date functions in
  3035.      appendix A for information on Julian day numbers.
  3036.  
  3037.      Returns:  A number
  3038.  
  3039.      See also: DTdate$ DTdatevalue
  3040.  
  3041.      Example:  days:=DTdatevalue(1991,11,2)
  3042.  
  3043.                Returns the internal date number for the second of
  3044.      November, 1991.
  3045.  
  3046.      ---------------------------------------------------------------------
  3047.  
  3048.      DTdate$(daynumber)
  3049.  
  3050.      DTdate$() will return a date string representing the date of
  3051.      the Julian day number daynumber. Ensure that the date format
  3052.      is set  up  correctly  by  using  the  DTformat()  function,
  3053.  
  3054.  
  3055.  
  3056.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3057.        - Appendices.                         Page: 52 -
  3058.  
  3059.  
  3060.      otherwise your application may misinterpret the date  string
  3061.      returned.
  3062.  
  3063.      Returns:  True if successful, False otherwise
  3064.  
  3065.      See also: DTformat DTdatevalue
  3066.  
  3067.      Example:  a$:=DTdate$(DTnow())
  3068.  
  3069.                If the date  is the  5th of  December, 1991,  then
  3070.      this call  returns  "5/12/1991"  with European  date  format
  3071.      current,  "12/05/1991"   with   American  date   format   or
  3072.      "1991/12/05" with Japanese format current.
  3073.  
  3074.      ---------------------------------------------------------------------
  3075.  
  3076.      DTdatevalue(date$)
  3077.  
  3078.      DTdatevalue() takes a single string parameter, interprets it
  3079.      as a date string according  to the current date format,  and
  3080.      returns the Julian day number of that date.  Take care  that
  3081.      the date format is set  correctly for your country by  using
  3082.      DTformat().
  3083.  
  3084.      Returns:  A number
  3085.  
  3086.      See also: DTdate$
  3087.  
  3088.      Example:  days:=DTdatevalue("2.1.1900")
  3089.  
  3090.                Returns 2  to the  variable days  if the  European
  3091.      date is the default (2nd of January), otherwise returns 33 (
  3092.      1st of February in American format).
  3093.  
  3094.      ---------------------------------------------------------------------
  3095.  
  3096.      DTday$(date)
  3097.  
  3098.      DTday$() will return the name of the day specified by  date,
  3099.      interpreted as a Julian day number.
  3100.  
  3101.      Returns:  A string
  3102.  
  3103.      Example:  day$:=DTday$(DTnow())
  3104.  
  3105.                Returns  the  name   of  today  (ie   "Wednesday",
  3106.      "Thursday" and so on) to the variable day$.
  3107.  
  3108.  
  3109.  
  3110.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3111.        - Appendices.                         Page: 53 -
  3112.  
  3113.  
  3114.      ---------------------------------------------------------------------
  3115.  
  3116.      DTdayno(date)
  3117.  
  3118.      DTdayno() will  return the  day-of-month for  the  specified
  3119.      internal date number.
  3120.  
  3121.      Returns:  A number between 1 and 31
  3122.  
  3123.      Example:  d:=DTdayno(DTnow())
  3124.  
  3125.                Returns the number of the current day of the month
  3126.      to the variable d.
  3127.  
  3128.      ---------------------------------------------------------------------
  3129.  
  3130.      DTdayofyear(date)
  3131.  
  3132.      DTdayofyear() takes a Julian Day Number, `date', and returns
  3133.      the day number of the year in which that date fell.
  3134.  
  3135.      Returns:  A number from 1 to 366
  3136.  
  3137.      See also: DTdayno
  3138.  
  3139.      Example:  d:=DTdayofyear(DTdatevalue("01-01-1992"))
  3140.  
  3141.                Returns 1 to d
  3142.  
  3143.      Example:  d:=DTdayofyear(DTdatevalue("29-02-1992"))
  3144.  
  3145.                Returns 60 to d
  3146.  
  3147.      ---------------------------------------------------------------------
  3148.  
  3149.      DTformat(formatnumber,time$,date$)
  3150.  
  3151.      Sets the  format  and separator  for  date strings  and  the
  3152.      separator only for time strings.  Failure to set the  format
  3153.      correctly  could  lead  to  unpredictable  results  if  your
  3154.      application depends on a specific date format. Valid  values
  3155.      for formatnumber are as follows:
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3165.        - Appendices.                         Page: 54 -
  3166.  
  3167.  
  3168.           Table 3.5: Valid Format Specifiers for DTformat()
  3169.  
  3170.      0    Return format in use
  3171.      1    mm/dd/yyyy (American standard)
  3172.      2    dd/mm/yyyy (European standard)
  3173.      3    yyyy/mm/dd (Japanese standard)
  3174.  
  3175.      time$ and date$ define the number separators for use in time
  3176.      strings and date strings respectively. By default, these are
  3177.      set up from  values specified in  the country  line of  your
  3178.      "CONFIG.SYS" file.   If  you want  to  leave either  of  the
  3179.      separators unchanged, pass the empty string, "".
  3180.  
  3181.      Returns:  True if  valid parameters  passed and  set,  False
  3182.      otherwise
  3183.  
  3184.      Example:  DTformat(1,":","/")
  3185.  
  3186.                This line  sets the  current  date format  to  the
  3187.      American standard  of mm/dd/yyyy,  the time  separator to  a
  3188.      colon (to give  time strings like  "13:00:00") and the  date
  3189.      separator to a forward slash.
  3190.  
  3191.      ---------------------------------------------------------------------
  3192.  
  3193.      DThourno(time)
  3194.  
  3195.      DThourno() will return the hour of the time specified by the
  3196.      parameter, expressed in RExL's internal time format.
  3197.  
  3198.      Returns:  A number between 0 and 23
  3199.  
  3200.      See also: DTminuteno DTsecondno
  3201.  
  3202.      Example:  d:=DThourno(DTnow())
  3203.  
  3204.                Returns the current hour to the variable d.
  3205.  
  3206.      ---------------------------------------------------------------------
  3207.  
  3208.      DTminuteno(time)
  3209.  
  3210.      DTminuteno()  will  return  the  minute  specified  by   the
  3211.      parameter, expressed in RExL's internal time format.
  3212.  
  3213.      Returns:  A number between 0 and 59
  3214.  
  3215.      See also: DThourno DTsecondno
  3216.  
  3217.  
  3218.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3219.        - Appendices.                         Page: 55 -
  3220.  
  3221.  
  3222.      Example:  d:=DTminuteno(DTnow())
  3223.  
  3224.                Returns the number  of the current  minute to  the
  3225.      variable d.
  3226.  
  3227.      ---------------------------------------------------------------------
  3228.  
  3229.      DTmonth$(datenum)
  3230.  
  3231.      DTmonth$() returns  the name  of the  month upon  which  the
  3232.      specified Julian day number datenum, fell.
  3233.  
  3234.      Returns:  A string
  3235.  
  3236.      See also: Date functions
  3237.  
  3238.      Example:  mth$:=DTmonth$(DTnow())
  3239.  
  3240.                This will set mth$ to  be the name of the  current
  3241.      month.
  3242.  
  3243.      ---------------------------------------------------------------------
  3244.  
  3245.      DTmonthno(date)
  3246.  
  3247.      DTmonthno() will return the month-of-year for the  specified
  3248.      Julian day number.
  3249.  
  3250.      Returns:  A number between 1 and 12
  3251.  
  3252.      Example:  d:=DTmonthno(DTnow())
  3253.  
  3254.                Returns the  number of  the current  month of  the
  3255.      year to the variable d.
  3256.  
  3257.      ---------------------------------------------------------------------
  3258.  
  3259.      DTnow()
  3260.  
  3261.      Returns the RExL's internal date  and time in the form of  a
  3262.      real number. The  integer part of the  number is the  Julian
  3263.      day number and the decimal fraction part is the current time
  3264.      of day,  expressed in  direct  fractional form.  Appendix  A
  3265.      gives more information on the Julian day numbering system.
  3266.  
  3267.      Returns:  A number
  3268.  
  3269.  
  3270.  
  3271.  
  3272.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3273.        - Appendices.                         Page: 56 -
  3274.  
  3275.  
  3276.      Example:  a$:=DTdate$(DTnow()) Will set a$ to be the current
  3277.      date in the current date format as set by DTformat().
  3278.  
  3279.      ---------------------------------------------------------------------
  3280.  
  3281.      DTsecondno(time)
  3282.  
  3283.      DTsecondno()  will  return  the  second  specified  by   the
  3284.      parameter, expressed in RExL's internal time format.
  3285.  
  3286.      Returns:  A number between 0 and 59
  3287.  
  3288.      See also: DThourno DTminuteno
  3289.  
  3290.      Example:  d:=DTsecondno(DTnow())
  3291.  
  3292.                Returns the number  of the current  second to  the
  3293.      variable d.
  3294.  
  3295.      ---------------------------------------------------------------------
  3296.  
  3297.      DTsetdate(newdate)
  3298.  
  3299.      Initializes the system  date to  the date  specified in  the
  3300.      numeric parameter interpreted as a Julian day number.
  3301.  
  3302.      Returns:  True if successful, False otherwise
  3303.  
  3304.      See also: DTdate$
  3305.  
  3306.      Example:  DTsetdate(DTnow()+7)
  3307.  
  3308.                Set the date to be one week in the future.
  3309.  
  3310.      ---------------------------------------------------------------------
  3311.  
  3312.      DTsettime(newtime)
  3313.  
  3314.      DTsettime() sets the system time.   The time is measured  in
  3315.      decimal  fractions  of  a  day.    See  appendix  A  for   a
  3316.      description of RExL's time format.
  3317.  
  3318.      Returns:  True
  3319.  
  3320.      See also: DTtime$ DTtime
  3321.  
  3322.      Example:  DTsettime(0.5) Sets the time to be midday.
  3323.  
  3324.  
  3325.  
  3326.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3327.        - Appendices.                         Page: 57 -
  3328.  
  3329.  
  3330.      ---------------------------------------------------------------------
  3331.  
  3332.      DTtime(hour,minute,second)
  3333.  
  3334.      DTtime() takes the specified hour, minute and second  values
  3335.      and returns the internal time fraction representing the time
  3336.      specified. If the  time is invalid,  then the function  will
  3337.      return zero.
  3338.  
  3339.      Returns:  A time fraction
  3340.  
  3341.      See also: DTtimevalue DTtime$
  3342.  
  3343.      Example:  DTsettime(DTtime(13,0,0))
  3344.  
  3345.                This will set the current  time to one o'clock  in
  3346.      the afternoon.
  3347.  
  3348.      ---------------------------------------------------------------------
  3349.  
  3350.      DTtime$(dayfrac)
  3351.  
  3352.      DTtime() converts the dayfrac numeric parameter from  RExL's
  3353.      internal format to a time string using the currently  active
  3354.      time separators.
  3355.  
  3356.      Returns:  A string
  3357.  
  3358.      See also: DTtimevalue DTtime
  3359.  
  3360.      Example:  newtime$:=DTtime$(0.5)
  3361.  
  3362.                This will set newtime$ to be "12:00:00".
  3363.  
  3364.      ---------------------------------------------------------------------
  3365.  
  3366.      DTtimevalue(t$)
  3367.  
  3368.      Converts the specified time  string to RExL's internal  time
  3369.      format. If the time is invalid the function returns a  value
  3370.      of 0.
  3371.  
  3372.      Returns:  A number
  3373.  
  3374.      See also: DTtime$ DTtime
  3375.  
  3376.      Example:  frac:=DTtimevalue("13:00:00")
  3377.  
  3378.  
  3379.  
  3380.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3381.        - Appendices.                         Page: 58 -
  3382.  
  3383.  
  3384.                This   will   set   frac   to   RExL's    internal
  3385.      representation of one o'clock in the afternoon, 0.5416667.
  3386.  
  3387.      ---------------------------------------------------------------------
  3388.  
  3389.      DTyearno(date)
  3390.  
  3391.      DTyearno() will return the year for the specified Julian day
  3392.      number.
  3393.  
  3394.      Returns:  A number
  3395.  
  3396.      Example:  d:=DTyearno(DTnow())
  3397.  
  3398.                Returns the  number of  the  current year  to  the
  3399.      variable d.
  3400.  
  3401.      ---------------------------------------------------------------------
  3402.  
  3403.      EQV(log1,log2)
  3404.  
  3405.      EQV() performs  a  logical  equivalence test  upon  the  two
  3406.      logical parameters  passed  to  the function.  The  function
  3407.      returns True if both logical parameters are True or if  both
  3408.      are False, otherwise it returns False.  Note that EQV(l1,l2)
  3409.      is equivalent to NOT(XOR(l1,l2)).
  3410.  
  3411.      Returns:  A number
  3412.  
  3413.      See also: NOT AND XOR OR IMP
  3414.  
  3415.      Example:  val:=EQV(TRUE(),FALSE())
  3416.  
  3417.                Returns False to to the variable val
  3418.  
  3419.      ---------------------------------------------------------------------
  3420.  
  3421.      ERclear()
  3422.  
  3423.      ERclear() clears  all  error  flags so  that  ERmsg$()  will
  3424.      return a empty string and ERok() will return True, until the
  3425.      next error occurs.
  3426.  
  3427.      Returns:  True
  3428.  
  3429.      See also: ERwatch ERok ERmsg$
  3430.  
  3431.      Example:  ERclear()
  3432.  
  3433.  
  3434.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3435.        - Appendices.                         Page: 59 -
  3436.  
  3437.  
  3438.      ---------------------------------------------------------------------
  3439.  
  3440.      ERmsg$()
  3441.  
  3442.      Return the last error message  generated, or a empty  string
  3443.      if there has been no errors since starting or since the last
  3444.      use of the ERclear() function.
  3445.  
  3446.      Returns:  A string
  3447.  
  3448.      See also: ERwatch ERok
  3449.  
  3450.      Example:  a$:=ERmsg$()
  3451.  
  3452.                Returns an  empty string  if  there have  been  no
  3453.      errors since the  start of execution,  or the  last call  to
  3454.      ERclear().
  3455.  
  3456.      ---------------------------------------------------------------------
  3457.  
  3458.      ERnum()
  3459.  
  3460.      ERnum()  returns  the  error   number  of  the  last   error
  3461.      generated, or zero  if there  has been  no errors  generated
  3462.      since the last  call to ERclear()  or since the  application
  3463.      began.  This  function should be  used with  care since  the
  3464.      error numbers may change in future versions of RExL.
  3465.  
  3466.      Returns:  A number
  3467.  
  3468.      See also: ERwatch ERok ERmsg$
  3469.  
  3470.      Example:  ERnum()
  3471.  
  3472.      ---------------------------------------------------------------------
  3473.  
  3474.      ERok()
  3475.  
  3476.      ERok() will return true if no error has been reported  since
  3477.      starting or  the last  ERclear(). It  is used  to check  for
  3478.      `hidden' failures such as divide-by-0's (and so on) which do
  3479.      not fail statements, and hence are more difficult to detect.
  3480.  
  3481.      Returns:  True if error has occurred, False otherwise
  3482.  
  3483.      See also: ERmsg$ ERwatch
  3484.  
  3485.      Example:  ERok()
  3486.  
  3487.  
  3488.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3489.        - Appendices.                         Page: 60 -
  3490.  
  3491.  
  3492.      ---------------------------------------------------------------------
  3493.  
  3494.      ERwatch(number)
  3495.  
  3496.      ERwatch() turns the error reporting  feature on and off.  If
  3497.      the numeric  parameter  is  non-zero, then  errors  will  be
  3498.      displayed on the bottom line of the screen as is the default
  3499.      condition of RExL. If the parameter is zero, error reporting
  3500.      will be  disabled, although  the error  messages and  number
  3501.      will be set up regardless.
  3502.  
  3503.      Returns:  True
  3504.  
  3505.      See also: ERok ERmsg$
  3506.  
  3507.      Example:  ERwatch(TRUE())
  3508.  
  3509.                Enable error reporting.
  3510.  
  3511.      ---------------------------------------------------------------------
  3512.  
  3513.      ESCWATCH(number)
  3514.  
  3515.      ESCWATCH() is used to enable and disable the trapping of the
  3516.      <Esc> and <Alt-D> keys  during execution of an  application.
  3517.      In the default condition of on (a value for number of 1), an
  3518.      `error' is flagged, prompting the user to see if he wants to
  3519.      terminate the application.  If the parameter  is zero,  then
  3520.      RExL will  not scan  for the  key.  During debugging  of  an
  3521.      application, it's best to leave watching on.
  3522.  
  3523.      Returns:  True
  3524.  
  3525.      Example:  ESCWATCH(TRUE())
  3526.  
  3527.                Monitor the  <Esc> and  <Alt-D> keys  for  presses
  3528.      during execution of an application.
  3529.  
  3530.      ---------------------------------------------------------------------
  3531.  
  3532.      EXACT(num)
  3533.  
  3534.      EXACT() defines whether the string comparisons and tests are
  3535.      carried  out  respecting  the  case  of  the  letters  being
  3536.      compared (when num = 1)  or irrespective of case (num =  0).
  3537.      In its default condition, RExL is not sensitive to the  case
  3538.      of letters.
  3539.  
  3540.  
  3541.  
  3542.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3543.        - Appendices.                         Page: 61 -
  3544.  
  3545.  
  3546.      Returns:  True
  3547.  
  3548.      Example:  EXACT(TRUE())
  3549.  
  3550.                Turns on case sensitivity.
  3551.  
  3552.      ---------------------------------------------------------------------
  3553.  
  3554.      EXP(number)
  3555.  
  3556.      Returns the  exponential e  (2.71828) to  the power  of  the
  3557.      single numeric parameter.
  3558.  
  3559.      Returns:  A number
  3560.  
  3561.      See also: LOG
  3562.  
  3563.      Example:  x:=EXP(1)
  3564.  
  3565.                Returns 2.718281828 to the variable x.
  3566.  
  3567.      ---------------------------------------------------------------------
  3568.  
  3569.      FALSE()
  3570.  
  3571.      Returns the value zero. It is used to fail a rule or part of
  3572.      a rule.
  3573.  
  3574.      Returns:  False
  3575.  
  3576.      See also: TRUE NOT
  3577.  
  3578.      Example:  value:=NOT(FALSE())
  3579.  
  3580.                Returns 1 to the variable value.
  3581.  
  3582.      ---------------------------------------------------------------------
  3583.  
  3584.      FILL(x, y, w, h, char$)
  3585.  
  3586.      Fills an area  of the screen  with the specified  character.
  3587.      The  first  four  parameters  specify  the  horizontal   and
  3588.      vertical coordinates of  the top left  hand corner (x,y)  of
  3589.      the bounding box and its width w and height h  respectively.
  3590.      The fifth parameter  specifies the ASCII  character to  fill
  3591.      the area with. The attributes of the box remain unchanged by
  3592.      this command.
  3593.  
  3594.  
  3595.  
  3596.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3597.        - Appendices.                         Page: 62 -
  3598.  
  3599.  
  3600.      Returns:  True
  3601.  
  3602.      See also: PAINT BOX
  3603.  
  3604.      Example:  FILL(0,0,79,24,"A")
  3605.  
  3606.                Fills the screen with the letter A.
  3607.  
  3608.      ---------------------------------------------------------------------
  3609.  
  3610.      FIND(substr$, superstr$)
  3611.  
  3612.      Locates the first occurrence of substr$ within superstr$. If
  3613.      the substring is  not in superstr$,  then the function  will
  3614.      return False. The value returned is zero based, meaning that
  3615.      if the substring  starts at  the first  character, then  the
  3616.      return value will be zero. This behaviour is comatible  with
  3617.      C language, where all string positions are zero-based.
  3618.  
  3619.      Returns:  String index if located, -1 otherwise
  3620.  
  3621.      Example:  pos:=FIND("lo","Hello")
  3622.  
  3623.                Returns a value of 3 to the variable pos.
  3624.  
  3625.      ---------------------------------------------------------------------
  3626.  
  3627.      FLOOR(number)
  3628.  
  3629.      FLOOR() returns  the largest  number less  than the  numeric
  3630.      parameter.
  3631.  
  3632.      Returns:  A number
  3633.  
  3634.      See also: CEIL
  3635.  
  3636.      Example:  a:=FLOOR(5.5)
  3637.  
  3638.                Returns the value 5.0 to the variable a.
  3639.  
  3640.      ---------------------------------------------------------------------
  3641.  
  3642.      FV(pmt,rate,periods)
  3643.  
  3644.      Calculates the future value of equal payments of amount  pmt
  3645.      of a simple ordinary annuity, earning at a periodic interest
  3646.      rate for the  number of payment  periods. The interest  rate
  3647.      should be expressed as a decimal rather than a percentage.
  3648.  
  3649.  
  3650.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3651.        - Appendices.                         Page: 63 -
  3652.  
  3653.  
  3654.      Returns:  A number
  3655.  
  3656.      Example:  x:=FV(1000,0.1,10)
  3657.  
  3658.                Returns $15937.43 to the variable x.
  3659.  
  3660.      ---------------------------------------------------------------------
  3661.  
  3662.      GOTOXY(xpos, ypos)
  3663.  
  3664.      Positions  the  text  cursor  on  the  text  screen  at  the
  3665.      specified  horizontal  co-ordinate  xpos  and  vertical  co-
  3666.      ordinate ypos, taking (0,0) to be the top right hand  corner
  3667.      of the screen.   If the  coordinates are  out of range,  the
  3668.      GOTOXY() will return False.
  3669.  
  3670.      Returns:  True if successful, False otherwise
  3671.  
  3672.      See also: DISPLAY
  3673.  
  3674.      Example:  GOTOXY(0,0)
  3675.  
  3676.                Sets the cursor to the top left hand corner of the
  3677.      screen.
  3678.  
  3679.      --------------------------------------------------------------------
  3680.  
  3681.      HELP(log)
  3682.  
  3683.      HELP() is used to turn  the online help feature on and  off.
  3684.      When `log' is true, <F1>  will display the currently  active
  3685.      help screen when pressed from within a dialog screen.   When
  3686.      `log' is  false, <F1>  keystrokes will  be returned  to  the
  3687.      application.
  3688.  
  3689.      Returns:  True
  3690.  
  3691.      Example:  HELP(1)
  3692.  
  3693.                Turns on <F1> monitoring.
  3694.      ---------------------------------------------------------------------
  3695.  
  3696.      IIF(boolexp, anstrue, ansfalse)
  3697.  
  3698.      Returns one of the parameters anstrue or ansfalse  depending
  3699.      on the value of the  boolean expression passed as the  first
  3700.      parameter, boolexp. If the boolexp is true (non-zero),  then
  3701.  
  3702.  
  3703.  
  3704.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3705.        - Appendices.                         Page: 64 -
  3706.  
  3707.  
  3708.      anstrue is returned,  otherwise ansfalse  is returned.  This
  3709.      behaviour is compatible with the Clipper IF command.
  3710.  
  3711.      Returns:  Either of the second two parameters
  3712.  
  3713.      See also: IIF$
  3714.  
  3715.      Example:  a:=IIF(x,1,2)
  3716.  
  3717.                If the value of x is non-zero, then A is  assigned
  3718.      the value 1, otherwise the value 2.
  3719.  
  3720.      ---------------------------------------------------------------------
  3721.  
  3722.      IIF$(boolexp, anstrue$, ansfalse$)
  3723.  
  3724.      IIF$()  will  return  anstrue$  if  the  boolean  expression
  3725.      boolexp is true,  or ansfalse$, if boolexp  is false.   This
  3726.      behaviour is compatible with the Clipper IF command.
  3727.  
  3728.      Returns:  A string
  3729.  
  3730.      See also: IIF
  3731.  
  3732.      Example:  a$:=IIF$(x,"Y","N")
  3733.  
  3734.                If the value of x is non-zero, then A$ is assigned
  3735.      the value "Y", otherwise the value "N".
  3736.  
  3737.      ---------------------------------------------------------------------
  3738.  
  3739.      IMP(log1,log2)
  3740.  
  3741.      IMP() performs  a  logical  implication test  upon  the  two
  3742.      logical parameters  passed  to  the function.  The  function
  3743.      returns True if the first  parameter is True and the  second
  3744.      is False, otherwise it returns False.
  3745.  
  3746.      Returns:  A number
  3747.  
  3748.      See also: NOT AND XOR OR EQV
  3749.  
  3750.      Example:  val:=IMP(TRUE(),FALSE())
  3751.  
  3752.                Returns True to to the variable val.
  3753.  
  3754.      ---------------------------------------------------------------------
  3755.  
  3756.  
  3757.  
  3758.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3759.        - Appendices.                         Page: 65 -
  3760.  
  3761.  
  3762.      INIT()
  3763.  
  3764.      Clears out all variables currently defined, setting  numeric
  3765.      variables to 0.0 and setting strings to zero length.
  3766.  
  3767.      Returns:  True
  3768.  
  3769.      Example:  INIT()
  3770.  
  3771.      ---------------------------------------------------------------------
  3772.  
  3773.      INPUT(x,y,w,p,value)
  3774.  
  3775.      Generates an input field of width w and decimal precision  p
  3776.      at  the  horizontal  and  vertical  coordinates  (x,y).  The
  3777.      initial value of the input is value  The attribute at  (x,y)
  3778.      will be extended to the width of the input. If value is  too
  3779.      large to display in the  assigned area, then overwriting  of
  3780.      the surrounding screen may occur.   The input area will  not
  3781.      be affected by this. The maximum width of input is 19 digits
  3782.      and the maximum precision is 17 digits.
  3783.  
  3784.      Returns:  The number input
  3785.  
  3786.      See also: INPUT$
  3787.  
  3788.      Example:  n:=INPUT(5,10,10,2,1.2)
  3789.  
  3790.                Accepts the input of a number a column 5, row  10,
  3791.      with a width of 10  places and including room for 2  decimal
  3792.      places, with an  initial value of  1.2. The  number will  be
  3793.      stored in the variable n.
  3794.  
  3795.      ---------------------------------------------------------------------
  3796.  
  3797.      INPUT$(x,y,width,value$)
  3798.  
  3799.      Generates a string input field of width w at the  horizontal
  3800.      and  vertical  coordinates  (x,y)  specified,  setting   the
  3801.      initial value of the input to value$.
  3802.  
  3803.      Returns:  The string input
  3804.  
  3805.      See also: INPUT
  3806.  
  3807.      Example:  t$:=INPUT$(5,10,10,"Test")
  3808.  
  3809.  
  3810.  
  3811.  
  3812.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3813.        - Appendices.                         Page: 66 -
  3814.  
  3815.  
  3816.                Accepts input of a string at column 5 row 10, with
  3817.      a width of 10 places and an initial value of "Test".
  3818.  
  3819.      ---------------------------------------------------------------------
  3820.  
  3821.      INVERSE(x1, y1, x2, y2)
  3822.  
  3823.      Inverts the attributes of an  area of screen. The first  two
  3824.      parameters define the top left  corner. The last two  define
  3825.      the bottom right corner. If you invert the same area  twice,
  3826.      you will be  left with the  same area. This  can be used  to
  3827.      flash an  area.    The inverse  attribute  is  generated  by
  3828.      xor'ing the current attribute with 7Fh.
  3829.  
  3830.      Returns:  True
  3831.  
  3832.      Example:  INVERSE(0,0,79,24)
  3833.  
  3834.                Inverts the attributes for the whole screen.
  3835.  
  3836.      ---------------------------------------------------------------------
  3837.  
  3838.      KBclear()
  3839.  
  3840.      Clears all keystrokes from the keyboard buffer.
  3841.  
  3842.      Returns:  True
  3843.  
  3844.      Example:  KBclear()
  3845.  
  3846.      ---------------------------------------------------------------------
  3847.  
  3848.      KBlast()
  3849.  
  3850.      KBlast() returns the last keystroke typed by the user.   The
  3851.      function can be used to determine the keystroke which caused
  3852.      the termination of a dialog screen (for example, if the user
  3853.      pressed <PgUp>, <PgDn>, <Enter> and so on).  If no keys have
  3854.      been pressed since the application started running, or since
  3855.      the last  call of  KBclear(), then  KBlast() returns  False.
  3856.      See appendix D for a list of return values.
  3857.  
  3858.      Returns:  Key code  for  last  key pressed,  False  if  none
  3859.      present
  3860.  
  3861.      See also: KBwait
  3862.  
  3863.      Example:  key:=KBlast()
  3864.  
  3865.  
  3866.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3867.        - Appendices.                         Page: 67 -
  3868.  
  3869.  
  3870.      ---------------------------------------------------------------------
  3871.  
  3872.      KBread()
  3873.  
  3874.      Waits until  a key  is pressed  and  then returns  the  code
  3875.      associated with it. If the key is a character key, the ASCII
  3876.      code will be returned, otherwise, the internal code for  the
  3877.      key will be returned.  See  appendix D for a list of  return
  3878.      values.
  3879.  
  3880.      Returns:  Key code for key pressed
  3881.  
  3882.      See also: KBwait
  3883.  
  3884.      Example:  key:=KBread()
  3885.  
  3886.                Waits for a key to be pressed and returns keyboard
  3887.      code in the variable key.
  3888.  
  3889.      ---------------------------------------------------------------------
  3890.  
  3891.      KBready()
  3892.  
  3893.      KBready() returns the value of a keystroke, if one is  ready
  3894.      and waiting in the keyboard  buffer. If there is no  pending
  3895.      keystroke, the function returns immediately with a value  of
  3896.      zero, otherwise it returns the keystroke code, as listed  in
  3897.      appendix D.
  3898.  
  3899.      Returns:  Key code for key waiting, zero otherwise
  3900.  
  3901.      Example:  KeyWaiting:=KBready()
  3902.  
  3903.      ---------------------------------------------------------------------
  3904.  
  3905.      KBwait(time)
  3906.  
  3907.      Waits for the specified number of seconds time for a key  to
  3908.      be pressed. The  function then returns  the coded value  for
  3909.      that key or zero if no key was pressed.  See appendix D  for
  3910.      a list of keystroke codes.
  3911.  
  3912.      Returns:  Key code if key pressed, False if no key pressed
  3913.  
  3914.      Example:  key:=KBwait()
  3915.  
  3916.      ---------------------------------------------------------------------
  3917.  
  3918.  
  3919.  
  3920.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3921.        - Appendices.                         Page: 68 -
  3922.  
  3923.  
  3924.      LEFT$(str$,num)
  3925.  
  3926.      Returns a  string  comprising  the leftmost  num  number  of
  3927.      characters from the string str$. If the number specified  is
  3928.      greater than the length of the string then the entire string
  3929.      will be copied.
  3930.  
  3931.      Returns:  A string
  3932.  
  3933.      See also: RIGHT$ MID$
  3934.  
  3935.      Example:  a$:=LEFT$("Hello",2)
  3936.  
  3937.                This sets a$ to be "He"
  3938.  
  3939.      ---------------------------------------------------------------------
  3940.  
  3941.      LENGTH(string$)
  3942.  
  3943.      Returns the length  of a  character string  string$. If  the
  3944.      string is empty, then the value 0 will be returned
  3945.  
  3946.      Returns:  A number
  3947.  
  3948.      Example:  lgth:=LENGTH("System")
  3949.  
  3950.                This will set lgth to be 6.
  3951.  
  3952.      ---------------------------------------------------------------------
  3953.  
  3954.      LOAD(filename$)
  3955.  
  3956.      Loads in and  passes control to  another listing. LOAD()  is
  3957.      not nested so that when the second listing finishes, control
  3958.      is not  passed  back to  the  original listing.  LOAD()  may
  3959.      return False if the second  listing is too big, or does  not
  3960.      exist.  If the specified application image does not exist in
  3961.      the current directory, then the  list of paths specified  in
  3962.      the RExL environment variable will be searched in  sequence.
  3963.      If the  application  is  located,  then  all  databases  are
  3964.      closed, the internal error variables are reset and execution
  3965.      begins at the master rule of the new application.  The stack
  3966.      of screens stored by PUSHSCR() and POPSCR() are not cleared,
  3967.      so screenfuls  of  information  may be  passed  between  two
  3968.      applications.
  3969.  
  3970.      Applications  compiled  with   the  postfix  compiler   must
  3971.      exercise caution  when using  the  LOAD function,  which  is
  3972.  
  3973.  
  3974.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  3975.        - Appendices.                         Page: 69 -
  3976.  
  3977.  
  3978.      implemented slightly  differently  in  the  executable  file
  3979.      library.  The section on  the postfix compiler RExLPC  gives
  3980.      more details on this.
  3981.  
  3982.      Returns:  False if listing could not load
  3983.  
  3984.      Example:  LOAD("2ndpart")
  3985.  
  3986.                Loads and passes control to the application  image
  3987.      with the DOS file name "2ndpart.rxl".
  3988.  
  3989.      ---------------------------------------------------------------------
  3990.  
  3991.      LOADSCR(filename$, x, y)
  3992.  
  3993.      Loads in  a small  area of  the  screen from  the  specified
  3994.      filename. The  x  and y  coordinates  specify the  top  left
  3995.      corner of where the screen is to appear. Any fields that are
  3996.      contained with the  screen will  then be  activated. If  you
  3997.      wish to load the screen to its original x or y position then
  3998.      set the relevant parameter to  -1.  Any parts of the  screen
  3999.      being loaded  which  do not  fit  will  be ignored  and  not
  4000.      displayed.
  4001.  
  4002.      Returns:  True if loaded ok, False otherwise
  4003.  
  4004.      See also: SAVESCR
  4005.  
  4006.      Example:  LOADSCR(n$,10,-1)
  4007.  
  4008.                Get the screen named n$ and place it at column  10
  4009.      with the row being the same as that from where it was saved.
  4010.  
  4011.      ---------------------------------------------------------------------
  4012.  
  4013.      LOG(number)
  4014.  
  4015.      Returns the natural logarithm (log  to base e (2.71828))  of
  4016.      the parameter.
  4017.  
  4018.      Returns:  A number
  4019.  
  4020.      See also: EXP
  4021.  
  4022.      Example:  nl:=LOG(0.51)
  4023.  
  4024.                This will set nl to be -0.673344553
  4025.  
  4026.  
  4027.  
  4028.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4029.        - Appendices.                         Page: 70 -
  4030.  
  4031.  
  4032.      ---------------------------------------------------------------------
  4033.  
  4034.      LOG10(number)
  4035.  
  4036.      Returns the base-10 logarithm of the parameter.
  4037.  
  4038.      Returns:  A number
  4039.  
  4040.      Example:  lg:=LOG10(0.51)
  4041.  
  4042.                This will set lg to be -0.292429824
  4043.  
  4044.      ---------------------------------------------------------------------
  4045.  
  4046.      LOWER$(string$)
  4047.  
  4048.      LOWER$() returns the  parameter string  translated in  lower
  4049.      case.  The  European ASCII characters are  left as they  are
  4050.      and are not translated to lower case.
  4051.  
  4052.      Returns:  A string
  4053.  
  4054.      See also: UPPER$
  4055.  
  4056.      Example:  a$:=LOWER$("hELlO")
  4057.  
  4058.                Returns the string "hello" to a$.
  4059.  
  4060.      ---------------------------------------------------------------------
  4061.  
  4062.      MAX(num1, num2)
  4063.  
  4064.      Returns the larger of the two numeric parameters.
  4065.  
  4066.      Returns:  A number
  4067.  
  4068.      See also: MIN
  4069.  
  4070.      Example:  bigger:=MAX(5,4)
  4071.  
  4072.                This will set bigger to be 5
  4073.  
  4074.      ---------------------------------------------------------------------
  4075.  
  4076.      MID$(source$, start, count)
  4077.  
  4078.      Returns count characters,  starting at  position start  from
  4079.      the string source$. If start  is past the end of the  string
  4080.  
  4081.  
  4082.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4083.        - Appendices.                         Page: 71 -
  4084.  
  4085.  
  4086.      or count is less than or equal to zero, then an empty string
  4087.      is returned.
  4088.  
  4089.      Returns:  A string
  4090.  
  4091.      See also: LEFT$ RIGHT$
  4092.  
  4093.      Example:  a$:=MID$("ABCDEF",2,2)
  4094.  
  4095.                This will set a$ to be "CD"
  4096.  
  4097.      ---------------------------------------------------------------------
  4098.  
  4099.      MIN(number1, number2)
  4100.  
  4101.      Returns the smaller of the two parameters.
  4102.  
  4103.      Returns:  A number
  4104.  
  4105.      See also: MAX
  4106.  
  4107.      Example:  small:=MIN(5,4)
  4108.  
  4109.                This will set small to be 4.
  4110.  
  4111.      ---------------------------------------------------------------------
  4112.  
  4113.      MOD(number1, number2)
  4114.  
  4115.      Returns the remainder of the division of number2 by number1.
  4116.      Mathematically, this operation is known as modulo division.
  4117.  
  4118.      Returns:  A number
  4119.  
  4120.      See also: DIV
  4121.  
  4122.      Example:  remainder:=MOD(10,3)
  4123.  
  4124.                This will set remainder to be 1.
  4125.  
  4126.      ---------------------------------------------------------------------
  4127.  
  4128.      NOT(boolean)
  4129.  
  4130.      Returns  the  logical  inverse  of  the  parameter:  If  the
  4131.      parameter evaluates to false, the function will return True,
  4132.      otherwise it will return False.
  4133.  
  4134.  
  4135.  
  4136.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4137.        - Appendices.                         Page: 72 -
  4138.  
  4139.  
  4140.      Returns:  True or False
  4141.  
  4142.      See also: BTnot
  4143.  
  4144.      Example:  NOT(TRUE()) Returns False.
  4145.  
  4146.      ---------------------------------------------------------------------
  4147.  
  4148.      OR(log1,log2)
  4149.  
  4150.      OR() performs a logical OR  upon the two logical  parameters
  4151.      passed to the function. The function returns True if  either
  4152.      of the two logical parameters are True otherwise it  returns
  4153.      False.
  4154.  
  4155.      Returns:  A number
  4156.  
  4157.      See also: NOT EQV XOR AND IMP
  4158.  
  4159.      Example:  val:=OR(TRUE(),FALSE())
  4160.  
  4161.                Returns False to to the variable val.
  4162.  
  4163.      ---------------------------------------------------------------------
  4164.  
  4165.      OScd(path$)
  4166.  
  4167.      Changes directory to  the path  specified by  path$. If  the
  4168.      directory cannot  be  accessed  then  the  function  returns
  4169.      false, otherwise  true.  To  change the  current  drive  use
  4170.      OSdrive().
  4171.  
  4172.      Returns:  True if successful, False otherwise
  4173.  
  4174.      See also: OSdrive OSrd OSmd
  4175.  
  4176.      Example:  OScd("\rexl\demo")
  4177.  
  4178.                Sets the directory to be \rexl\demo on the default
  4179.      drive.
  4180.  
  4181.      ---------------------------------------------------------------------
  4182.  
  4183.      OScmd(command$)
  4184.  
  4185.      Allows external programs to be loaded and run. The parameter
  4186.      contains the program name and  any parameters which must  be
  4187.      passed to it.  OScmd() returns True if the command  executed
  4188.  
  4189.  
  4190.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4191.        - Appendices.                         Page: 73 -
  4192.  
  4193.  
  4194.      and False if  it failed to do  so.  Note  that RExL must  be
  4195.      able to access the command  interpreter to run the  command.
  4196.      The command interpreter is  usually the file  "COMMAND.COM",
  4197.      located in  the root  directory of  the  boot drive  and  is
  4198.      referenced by the COMSPEC environment variable.
  4199.  
  4200.      Returns:  True if successful, False otherwise
  4201.  
  4202.      Example:  OScmd("edit c:\autoexec.bat")
  4203.  
  4204.                Executes the program  or batch  file named  "edit"
  4205.      and  passes  the  string   "c:\autoexec.bat"  to  it  as   a
  4206.      parameter.
  4207.  
  4208.      ---------------------------------------------------------------------
  4209.  
  4210.      OScopy(source$,dest$)
  4211.  
  4212.      Copys a  file from  the source$  to dest$.  The  destination
  4213.      parameter, unlike its  MS-DOS equivalent,  must contain  the
  4214.      name of the file to which the file will be copied. The  wild
  4215.      card characters ? and  are not allowed in either  parameter.
  4216.      If you need  to perform a  wild card  copy, use the  OScmd()
  4217.      function.
  4218.  
  4219.      Returns:  True if successful, False otherwise
  4220.  
  4221.      See also: OScmd
  4222.  
  4223.      Example:  OScopy("TEST.DOC","\T.TXT")
  4224.  
  4225.                Copies a file "TEST.DOC" in the current  directory
  4226.      to the root directory, naming it "T.TXT".
  4227.  
  4228.      ---------------------------------------------------------------------
  4229.  
  4230.      OSdel(filename$)
  4231.  
  4232.      Deletes the specified file from  the disk. If the file  does
  4233.      not exist, or could not  be deleted then this function  will
  4234.      return false, otherwise true.  filename$ may specify a  full
  4235.      path including drive specifier.
  4236.  
  4237.      Returns:  True if successful, False otherwise
  4238.  
  4239.      See also: OSexists
  4240.  
  4241.      Example:  OSdel("TEST.RXL")
  4242.  
  4243.  
  4244.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4245.        - Appendices.                         Page: 74 -
  4246.  
  4247.  
  4248.                Deletes the file called "TEST.RXL" in the  current
  4249.      directory.
  4250.  
  4251.      ---------------------------------------------------------------------
  4252.  
  4253.      OSdir(mask$, attr, n$[#], sz[#], dt[#], at[#])
  4254.  
  4255.      OSdir() is used to obtain  DOS diretory listings from  disk.
  4256.      The first parameter specifies the  DOS file mask to use  for
  4257.      the search and  may include  drive and  path designators  as
  4258.      well as wild card characters. The second parameter specifies
  4259.      the file attribute  to search for. To  search for more  than
  4260.      one file  type,  add  the search  attributes  together.  The
  4261.      following table gives the valid search attributes:
  4262.  
  4263.                Table 3.6: OSdir() File Attribute Coding
  4264.  
  4265.      Attribute Code      Meaning
  4266.      1                   Read only attribute
  4267.      2                   Hidden file
  4268.      4                   System file
  4269.      8                   Volume label
  4270.      16                  Directory
  4271.      32                  Archive
  4272.      64                  All files
  4273.  
  4274.      If you  are  unsure  about  the meanings  of  any  of  these
  4275.      attributes, consult your DOS manual.
  4276.  
  4277.      The results of  the search are  placed in  the arrays:  file
  4278.      names in n$[#], file sizes in sz[#], file dates and times in
  4279.      dt[#] and file attributes in  at[#].  The return value  from
  4280.      OSdir() is the number  of files returned in  the array.   If
  4281.      any  of  the  arrays  are  not  large  enough  to  hold  the
  4282.      information required,  then an  array bounds  error eill  be
  4283.      generated and the function  will return without looking  for
  4284.      any more files.
  4285.  
  4286.      Returns:  The number  of files  found or  zero if  no  files
  4287.      located
  4288.  
  4289.      See also: OSexists
  4290.  
  4291.      Example:  OSdir("*.rxl",64,n$[#],sz[#],dt[#],at[#])
  4292.  
  4293.                Returns lists of all of the RExL application image
  4294.      files  in   the  current directory.  The files may have  any
  4295.      attribute.
  4296.  
  4297.  
  4298.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4299.        - Appendices.                         Page: 75 -
  4300.  
  4301.  
  4302.      Example:  OSdir("T?.RXL",64,n$[#],sz[#],dt[#],at[#])
  4303.  
  4304.                Returns a list  of all of  the RExL  files in  the
  4305.      current directory, whose names  have two letters, the  first
  4306.      of which is "T"
  4307.  
  4308.      ---------------------------------------------------------------------
  4309.  
  4310.      OSdrive(drive$)
  4311.  
  4312.      Selects a new current disk drive. The parameter should be  a
  4313.      two character  string, the  first character  of which  is  a
  4314.      drive letter and the second a colon. The return value of the
  4315.      function is the ASCII character code of the drive  selected.
  4316.      If the drive was not  successfully selected, then the  value
  4317.      returned will be the ASCII code of the current drive letter.
  4318.      Passing an empty string in  place of drive$ will return  the
  4319.      current drive with no change made.
  4320.  
  4321.      Returns:  True if successful, False otherwise
  4322.  
  4323.      See also: OScd OSwd$
  4324.  
  4325.      Example:  OSdrive("C:")
  4326.  
  4327.                Sets the current or default drive to be C:
  4328.  
  4329.      ---------------------------------------------------------------------
  4330.  
  4331.      OSdriveok(dstr$)
  4332.  
  4333.      OSdriveok() tests a disk drive, normally a floppy drive,  to
  4334.      determine if it  is ready  to be  written to  or read  from.
  4335.      `dstr$' specifies the DOS disk drive to test.  The  function
  4336.      can return  one  of  a  range  of  values,  giving  explicit
  4337.      information about  why  the disk  drive  is not  ready.  The
  4338.      following table  gives the  exact  return values  and  their
  4339.      meanings:
  4340.  
  4341.                  Table 3.7: OSdriveok() return values
  4342.  
  4343.           -1        Wrong parameters
  4344.           0         Drive loaded and ready to read or write
  4345.           1         Drive door open or diskette inserted upside down
  4346.           2         Diskette is unformatted
  4347.           3         Write protected
  4348.           4         Undetermined
  4349.  
  4350.  
  4351.  
  4352.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4353.        - Appendices.                         Page: 76 -
  4354.  
  4355.  
  4356.      Note that  unlike  almost  all other  rexl  functions,  this
  4357.      function returns zero if the test performed was successful.
  4358.  
  4359.      Returns:  A number
  4360.  
  4361.      See also: OSdrive
  4362.  
  4363.      Example:  !OSdriveok("A:")
  4364.  
  4365.                Returns true if  drive A: is  not write  protected
  4366.      and is ready for access.
  4367.  
  4368.      ---------------------------------------------------------------------
  4369.  
  4370.      OSexists(filename$)
  4371.  
  4372.      Checks to see  if the specified  file exists. filename$  can
  4373.      contain a full pathname and drive specification.
  4374.  
  4375.      Returns:  True if file exists, False otherwise
  4376.  
  4377.      See also: OSdir
  4378.  
  4379.      Example:  OSexists("c:\command.com")
  4380.  
  4381.                Tests to see if  the file "COMMAND.COM" exists  in
  4382.      the root diretory of the C: drive.
  4383.  
  4384.      ---------------------------------------------------------------------
  4385.  
  4386.      OSmd(dirname$)
  4387.  
  4388.      OSmd()  will  make  a  DOS  directory.  The  single   string
  4389.      parameter specifies  the  directory  name to  make  and  may
  4390.      contain a drive letter.  As in the DOS  md command, you  may
  4391.      only make one directory level at a time.
  4392.  
  4393.      Returns:  True if successful, False otherwise
  4394.  
  4395.      See also: OSrd
  4396.  
  4397.      Example:  OSmd("\test")
  4398.  
  4399.                Makes  a  directory  called  "test"  in  the  root
  4400.      directory of the current drive.
  4401.  
  4402.      ---------------------------------------------------------------------
  4403.  
  4404.  
  4405.  
  4406.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4407.        - Appendices.                         Page: 77 -
  4408.  
  4409.  
  4410.      OSnumber()
  4411.  
  4412.      This function  returns a  value indicating  which  operating
  4413.      system RExL is currently running under. Currently, the  only
  4414.      value returned is 1, for MS-DOS, but future versions of RExL
  4415.      running  under  different  operating  systems  will   return
  4416.      different values.  Use  OSstat() to determine the  operating
  4417.      system version number.
  4418.  
  4419.      Returns:  1 for MS-DOS
  4420.  
  4421.      See also: OSstat
  4422.  
  4423.      Example:  sys:=OSnumber()
  4424.  
  4425.                Sets sys equal  to 1  if the  operating system  is
  4426.      MS-DOS.
  4427.  
  4428.      ---------------------------------------------------------------------
  4429.  
  4430.      OSrd(dirname$)
  4431.  
  4432.      OSrd() will  remove  a  DOS  directory.  The  single  string
  4433.      parameter specifies the  directory name to  be deleted.  The
  4434.      string  can  contain  a  drive   letter  and  a  full   path
  4435.      specification.
  4436.  
  4437.      Returns:  True if successful, False otherwise
  4438.  
  4439.      See also: OSmd
  4440.  
  4441.      Example:  OSrd("c:\test")
  4442.  
  4443.                Removes a directory called  "\test" from the  root
  4444.      directory of the C: drive.
  4445.  
  4446.      ---------------------------------------------------------------------
  4447.  
  4448.      OSren(source$,dest$)
  4449.  
  4450.      This function will rename the  file named source$ to  dest$.
  4451.      The parameters may specify a directory paths, so that  files
  4452.      may be moved  from one directory  to another using  OSren().
  4453.      Note that, as in DOS,  the destination file must not  exist,
  4454.      or the function will fail.
  4455.  
  4456.      Returns:  True if successful, otherwise False.
  4457.  
  4458.  
  4459.  
  4460.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4461.        - Appendices.                         Page: 78 -
  4462.  
  4463.  
  4464.      See also: OScopy OSdel
  4465.  
  4466.      Example:  OSren("TEST.TXT","TEST.BAK")
  4467.  
  4468.                Changes  the  name  of  the  file  "TEST.TXT"   to
  4469.      "TEST.BAK".
  4470.  
  4471.      ---------------------------------------------------------------------
  4472.  
  4473.      OSstat(ar[#])
  4474.  
  4475.      OSstat() returns  seven  items  of  information,  about  the
  4476.      current  status  of  the  machine,  to  the  specified   one
  4477.      dimensional numeric array.
  4478.  
  4479.      The information returned is as follows:
  4480.  
  4481.                  Table 3.8: OSstat() Return Indexing
  4482.  
  4483.      Array Index    Meaning
  4484.      0              Disk space free on current drive
  4485.      1              Total disk space on current drive
  4486.      2              Total number of disk drives available
  4487.      3              Largest block of free memory available
  4488.      4              Current DOS version
  4489.      5              CPU type
  4490.      6              Coprocessor type
  4491.      7              Video adapter type
  4492.  
  4493.      If the  current disk  is  large, then  DOS  may take  a  few
  4494.      seconds to determine the its free space and total size.   If
  4495.      the current disk is not  valid, for example, a floppy  drive
  4496.      with an open door, then  a critical error will be  generated
  4497.      and a value  of zero will  be returned for  the size of  the
  4498.      disk.
  4499.  
  4500.      The DOS version  is returned as  a real  number of the  form
  4501.      x.yy where x is the major version number and yy is the minor
  4502.      version number.
  4503.  
  4504.  
  4505.  
  4506.  
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4515.        - Appendices.                         Page: 79 -
  4516.  
  4517.  
  4518.                   Table 3.9: CPU Type Return Coding
  4519.  
  4520.      Return Value   Processor Type
  4521.      0              Intel 8088
  4522.      1              Intel 8086
  4523.      2              NEC V20
  4524.      3              NEC V30
  4525.      4              Intel 80188
  4526.      5              Intel 80186
  4527.      6              Intel 80286
  4528.      7              Intel 80386
  4529.      8              Intel 80486
  4530.  
  4531.               Table 3.10: Coprocessor Type Return Coding
  4532.  
  4533.      Return Value Coprocessor Type
  4534.      0              None installed
  4535.      1              Intel 8087
  4536.      2              Intel 80287
  4537.      3              Intel 80387
  4538.  
  4539.              Table 3.11: Video Adapter Type Return Coding
  4540.  
  4541.      Return Value   Video Adapter type
  4542.      0              Monochrome
  4543.      1              CGA adapter
  4544.      2              EGA adapter
  4545.      3              VGA adapter
  4546.  
  4547.      Returns:  True if array large enough, False otherwise
  4548.  
  4549.      See also: OSdir OSnumber
  4550.  
  4551.      Example:  OSstat(Stat[#])
  4552.  
  4553.                Returns  the  above  information  to  the  stat[#]
  4554.      array.
  4555.  
  4556.      ---------------------------------------------------------------------
  4557.  
  4558.      OSwd$()
  4559.  
  4560.      Returns a string containing the current directory path.  The
  4561.      string will also contain the current drive letter.
  4562.  
  4563.      Returns:  A string
  4564.  
  4565.      See also: OSdir OScd
  4566.  
  4567.  
  4568.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4569.        - Appendices.                         Page: 80 -
  4570.  
  4571.  
  4572.      Example:  d$:=OSwd$()
  4573.  
  4574.      ---------------------------------------------------------------------
  4575.  
  4576.      OUTPUT(device$)
  4577.  
  4578.      Sets the default output device for print requests. Since the
  4579.      string is passed directly to DOS  it can be a file on  disk.
  4580.      By default the  printer output device  is the device  driver
  4581.      "PRN". If you are  using a parallel/centronics type  printer
  4582.      then you may wish to use the command:
  4583.  
  4584.                         [Expr] OUTPUT("LPT1")
  4585.  
  4586.      or if you are using a serially connected printer:
  4587.  
  4588.                         [Expr] OUTPUT("COM1")
  4589.  
  4590.      These two functions explicitly  state which type of  printer
  4591.      you will be using. Using  the generic PRN device you  should
  4592.      have less problems  when people connect  different types  of
  4593.      printers. Making it a variable would allow you to modify  to
  4594.      set up a option for the user to select the output device.
  4595.  
  4596.      Returns:  True
  4597.  
  4598.      Example:  OUTPUT("DUMP.DOC") Assigns all  printer output  to
  4599.      the file "DUMP.DOC"
  4600.  
  4601.      ---------------------------------------------------------------------
  4602.  
  4603.      PAINT(x, y, w, h, att, mask)
  4604.  
  4605.      PAINT() changes the attributes of a box whose top left  hand
  4606.      corner is  (x,y) and  whose width  and  height are  w and  h
  4607.      respectively.  When  changing  the  attribute  byte  on  the
  4608.      screen, PAINT() performs a boolean AND on the byte with  the
  4609.      mask and then adds the  attribute which has been ANDed  with
  4610.      the  inverted   mask.  The   result  of   this   complicated
  4611.      manoeuvering is that  any color can  be filtered  in or  out
  4612.      from either background or foreground. If you wish to  change
  4613.      foreground only  set  the mask  to  be  240, to  change  the
  4614.      background only,  set  it  to  15. If  you  want  to  change
  4615.      everything in the area set the mask to be 0.
  4616.  
  4617.      The following table  lists the colors which  can be used  on
  4618.      color monitors:
  4619.  
  4620.  
  4621.  
  4622.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4623.        - Appendices.                         Page: 81 -
  4624.  
  4625.  
  4626.                   Table 3.12: Color Attribute Codes
  4627.  
  4628.           Color     Foreground          Background
  4629.           Black          0              0
  4630.           Blue           1              16
  4631.           Green          2              32
  4632.           Cyan           3              48
  4633.           Red            4              64
  4634.           Magenta        5              80
  4635.           Brown          6              96
  4636.           Light Gray     7              112
  4637.           Dark Gray      8              (128)
  4638.           Light Blue     9              (144)
  4639.           Light Green    10             (160)
  4640.           Light Cyan     11             (176)
  4641.           Light Red      12             (192)
  4642.           Light Mgnta    13             (208)
  4643.           Yellow         14             (224)
  4644.           White          15             (240)
  4645.           Blink          128            -
  4646.  
  4647.      If the  last  screen  displayed  during  execution  had  the
  4648.      flash-intensity bit set to `intensity', then a further eight
  4649.      background colors, indicated above by the bracketed numbers,
  4650.      are available, at  the expense  of blinking.  Note that  the
  4651.      background colors are derived from the foreground colors  by
  4652.      multiplying by sixteen.
  4653.  
  4654.      Some early CGA  systems do not  support the  flash-intensity
  4655.      toggle, so distribution packages which may be used on  these
  4656.      adapters should not use this feature.
  4657.  
  4658.      Returns:  True
  4659.  
  4660.      See also: INVERSE FILL
  4661.  
  4662.      Example:  PAINT(0,0,79,24,31,0)
  4663.  
  4664.                This will set the entire screen to bright white on
  4665.      a blue background.
  4666.  
  4667.      Example:  PAINT(0,0,79,24,15,240)
  4668.  
  4669.                This  changes  all  foreground  colors  to  white,
  4670.      leaving background colors unchanged.
  4671.  
  4672.      ---------------------------------------------------------------------
  4673.  
  4674.  
  4675.  
  4676.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4677.        - Appendices.                         Page: 82 -
  4678.  
  4679.  
  4680.      PAUSE(time)
  4681.  
  4682.      Halts execution  of the  application  for a  specified  time
  4683.      before  execution  continues.  The   time  is  measured   in
  4684.      milliseconds (thousandths of a second).
  4685.  
  4686.      Returns:  True
  4687.  
  4688.      Example:  PAUSE(1500)
  4689.  
  4690.                Halts the system for a second and a half.
  4691.  
  4692.      ---------------------------------------------------------------------
  4693.  
  4694.      PEEK(seg,ofs)
  4695.  
  4696.      PEEK() returns the value of the byte at the memory  location
  4697.      referenced by a segment value of seg and an offset value  of
  4698.      ofs.  Consult a DOS  reference if you are not familiar  with
  4699.      the concept of offsets and segmentation.
  4700.  
  4701.      Returns:  A number from 0 to 255
  4702.  
  4703.      See also: PEEKW POKE POKEW
  4704.  
  4705.      Example:  DisplayType:=PEEK(0,1097)
  4706.  
  4707.                This   expression   returns,   to   the   variable
  4708.      DisplayType, the type of display attached to your  computer.
  4709.      The value  will  be  3 for  a  color  display and  7  for  a
  4710.      monochrome display.
  4711.  
  4712.      ---------------------------------------------------------------------
  4713.  
  4714.      PEEKW(seg,ofs)
  4715.  
  4716.      PEEKW() returns the  value of the  sixteen bit  word at  the
  4717.      memory location referenced by a segment value of seg and  an
  4718.      offset value of ofs.  Consult a DOS reference if you are not
  4719.      familiar with the concept of offsets and segmentation.
  4720.  
  4721.      Returns:  A number from 0 to 65535
  4722.  
  4723.      See also: PEEK POKE POKEW
  4724.  
  4725.      Example:  CharAttr:=PEEKW(47104,0)
  4726.  
  4727.  
  4728.  
  4729.  
  4730.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4731.        - Appendices.                         Page: 83 -
  4732.  
  4733.  
  4734.                This expression returns, to the variable CharAttr,
  4735.      the first character and attribute  pair of a color  display.
  4736.      The attribute will  be in the upper  byte and the  character
  4737.      will be in the lower byte.
  4738.  
  4739.      ---------------------------------------------------------------------
  4740.  
  4741.      PI()
  4742.  
  4743.      Returns the value of pi, 3.14159265358979.
  4744.  
  4745.      Returns:  True
  4746.  
  4747.      Example:  degs:=rads*180/PI()
  4748.  
  4749.                Returns the value  of rads  radians, expressed  in
  4750.      degrees to the variable  degs. This expression performs  the
  4751.      same action as the DEG() function.
  4752.  
  4753.      ---------------------------------------------------------------------
  4754.  
  4755.      PMT(prin,rate,periods)
  4756.  
  4757.      Calculates  the  equal  periodic  payment  for  an  ordinary
  4758.      annuity with an initial principal of prin, at the  specified
  4759.      rate, for  periods  payments.  The  interest  rate  must  be
  4760.      expressed  as  a   decimal  fraction,  rather   than  as   a
  4761.      percentage.
  4762.  
  4763.      Returns:  A number
  4764.  
  4765.      Example:  amt:=PMT(1000,0.1,10) Stores the value $162.75  to
  4766.      the variable amt.
  4767.  
  4768.      ---------------------------------------------------------------------
  4769.  
  4770.      POKE(seg,ofs,value)
  4771.  
  4772.      POKE() will  place the  byte value  at the  memory  location
  4773.      referenced by a segment value of seg and an offset value  of
  4774.      ofs.  This function should  be used with care, since  poking
  4775.      to random areas of the computer's memory may corrupt DOS and
  4776.      cause unpredictable behaviour.   Consult your DOS  reference
  4777.      if you  are not  familiar with  the concept  of offsets  and
  4778.      segmentation.
  4779.  
  4780.      Returns:  True
  4781.  
  4782.  
  4783.  
  4784.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4785.        - Appendices.                         Page: 84 -
  4786.  
  4787.  
  4788.      See also: PEEKW PEEK POKEW
  4789.  
  4790.      Example:  POKE(0,1047,0)
  4791.  
  4792.                This expression  pokes  a  value of  zero  to  the
  4793.      keyboard flags byte at 0417h in the BIOS data segment.  This
  4794.      will turn off insert status, caps lock and num lock.
  4795.  
  4796.      ---------------------------------------------------------------------
  4797.  
  4798.      POKEW(seg,ofs,value)
  4799.  
  4800.      POKEW() will place the sixteen bit word value at the  memory
  4801.      location referenced by a segment value of seg and an  offset
  4802.      value of ofs. Use this  function with care, since poking  to
  4803.      random areas of  the computer's memory  may corrupt DOS  and
  4804.      cause unpredictable behaviour.   Consult your DOS  reference
  4805.      if you  are not  familiar with  the concept  of offsets  and
  4806.      segmentation.
  4807.  
  4808.      Returns:  True
  4809.  
  4810.      See also: PEEKW PEEK POKE
  4811.  
  4812.      Example:  POKEW(47104,0,0)
  4813.  
  4814.                This expression pokes a value of zero to the first
  4815.      character and  attribute  pair at  the  start of  the  color
  4816.      display memory area. This is displayed as a black space.
  4817.  
  4818.      ---------------------------------------------------------------------
  4819.  
  4820.      POPSCR()
  4821.  
  4822.      POPSCR() restores the screen from  a temporary work area  in
  4823.      memory. The PUSHSCR() function is used to save the screen in
  4824.      memory. Up to ten  screens may be saved  and restored, on  a
  4825.      first-in, last-out or stack based basis.
  4826.  
  4827.      Returns:  True if successful, false otherwise.
  4828.  
  4829.      See also: PUSHSCR
  4830.  
  4831.      Example:  POPSCR()
  4832.  
  4833.                Restores contents of screen.
  4834.  
  4835.      ---------------------------------------------------------------------
  4836.  
  4837.  
  4838.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4839.        - Appendices.                         Page: 85 -
  4840.  
  4841.  
  4842.      POW(number, exponent)
  4843.  
  4844.      Returns the value of number raised to the power of exponent.
  4845.      This function is included for reasons of compatibility  with
  4846.      the C language.
  4847.  
  4848.      Returns:  True
  4849.  
  4850.      Example:  v:=POW(10,2)
  4851.  
  4852.                Returns 100 to  the variable  v.   Note that  this
  4853.      operation can also be carried out using the `raise to power'
  4854.      operator, the caret, ^, so  that the above expression  could
  4855.      be rewritten as follows:
  4856.  
  4857.      Example:  v:=10^2
  4858.  
  4859.      ---------------------------------------------------------------------
  4860.  
  4861.      PUSHSCR()
  4862.  
  4863.      PUSHSCR() saves the current screen in a temporary work  area
  4864.      in memory. The information saved consists only of a  picture
  4865.      of the screen and  does not save any  fields.  The  POPSCR()
  4866.      function is used to restore a screen from memory.  Up to ten
  4867.      screens may be saved and  restored, on a first-in,  last-out
  4868.      or stack based basis.
  4869.  
  4870.      Returns:  True if successful, false otherwise.
  4871.  
  4872.      See also: POPSCR
  4873.  
  4874.      Example:  PUSHSCR()
  4875.  
  4876.                Saves contents of screen.
  4877.  
  4878.      ---------------------------------------------------------------------
  4879.  
  4880.      PV(pmt, rate, periods)
  4881.  
  4882.      Calculates the  present  value  of equal  pmt  in  a  simple
  4883.      ordinary annuity at the specified interest rate for a number
  4884.      of periods. As  with all financial  functions, the  interest
  4885.      rate must be expressed as a decimal fraction, rather than as
  4886.      a percentage.
  4887.  
  4888.      Returns:  A number
  4889.  
  4890.  
  4891.  
  4892.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4893.        - Appendices.                         Page: 86 -
  4894.  
  4895.  
  4896.      Example:  amt:=PV(1000,0.1,10)
  4897.  
  4898.                Stores $6144.57 to the variable amt.
  4899.  
  4900.      ---------------------------------------------------------------------
  4901.  
  4902.      QUIT()
  4903.  
  4904.      Halts the  execution  of  the current  application.  If  the
  4905.      runtime debugger was called from within the editor, then the
  4906.      editor wil be restarted,  otherwise, the module will  return
  4907.      to DOS.
  4908.  
  4909.      Returns:  N/A
  4910.  
  4911.      Example:  QUIT()
  4912.  
  4913.                Halts the  application  and  then returns  to  the
  4914.      operating system or editor.
  4915.  
  4916.      ---------------------------------------------------------------------
  4917.  
  4918.      RAD(angle)
  4919.  
  4920.      Converts an angle  expressed in degrees  into an  equivalent
  4921.      angle in radians.  All trigonometric functions  in RExL  use
  4922.      radians as input.
  4923.  
  4924.      Returns:  A number
  4925.  
  4926.      See also: DEG
  4927.  
  4928.      Example:  r:=RAD(180)
  4929.  
  4930.                This  assigns  the   value  of   pi,  the   radian
  4931.      equivalent of 180 degrees, to the variable r.
  4932.  
  4933.      ---------------------------------------------------------------------
  4934.  
  4935.      RAND()
  4936.  
  4937.      Returns a pseudo-random  number between 0  and 1. Each  time
  4938.      the inference  engine  starts a  seed  set to  generate  the
  4939.      sequence. Since  the seed  is always  the same,  the  random
  4940.      number generator follows the same sequence. You can set your
  4941.      own seed value by using the SEED() function.
  4942.  
  4943.      Returns:  A number
  4944.  
  4945.  
  4946.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  4947.        - Appendices.                         Page: 87 -
  4948.  
  4949.  
  4950.      See also: SEED
  4951.  
  4952.      Example:  num:=FLOOR(RAND()*80)+10
  4953.  
  4954.                Assigns an random whole  number between 10 and  90
  4955.      to the variable num.
  4956.  
  4957.      ---------------------------------------------------------------------
  4958.  
  4959.      RATE(fv, pv, periods)
  4960.  
  4961.      Calculates the periodic  interest rate necessary  for pv  to
  4962.      grow to fv over a fixed number of compounding periods.
  4963.  
  4964.      Returns:  A number
  4965.  
  4966.      Example:  val:=RATE(1000,100,10)
  4967.  
  4968.                Assigns  the  value  0.2589  (or  25.89%)  to  the
  4969.      variable val.
  4970.  
  4971.      ---------------------------------------------------------------------
  4972.  
  4973.      REPEAT$(str$,times)
  4974.  
  4975.      REPEAT$() returns a  string consisting of  a source  string,
  4976.      str$, repeated times times. If the string would need to grow
  4977.      beyond the maximum string length  of 80 characters, it  will
  4978.      be truncated.
  4979.  
  4980.      Returns:  A string
  4981.  
  4982.      Example:  a$:=REPEAT$("-",5) Assigns the  string "-----"  to
  4983.      a$.
  4984.  
  4985.      ---------------------------------------------------------------------
  4986.  
  4987.      REPLACE$(str$,start,chars,repl$)
  4988.  
  4989.      REPLACE$() takes a source string, str$, removes chars number
  4990.      of characters  from  it,  starting at  position  start  from
  4991.      within the string and inserts the replacement string,  repl$
  4992.      into the  source in  that position.  If  repl$ is  an  empty
  4993.      string, then the  nett effect of REPLACE$()  is to remove  a
  4994.      substring from a  parent string.   If repl$  is empty,  then
  4995.      str$ will be terminated at position start.
  4996.  
  4997.  
  4998.  
  4999.  
  5000.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5001.        - Appendices.                         Page: 88 -
  5002.  
  5003.  
  5004.      Note that all  string indexing  numbers (such  as the  start
  5005.      parameter above)  are zero  based,  meaning that  the  first
  5006.      character is as position zero, not at position one as is the
  5007.      default in some other computer languages.
  5008.  
  5009.      Returns:  A string
  5010.  
  5011.      Example:  a$:=REPLACE$("Hello",0,2,"Ha") Assigns the  string
  5012.      "Hallo" to the variable a$.  It removes two characters  from
  5013.      the string "Hello", starting at position 0, giving "llo" and
  5014.      inserts the  string "Ha"  at position  0 to  give the  final
  5015.      string "Hallo".
  5016.  
  5017.      ---------------------------------------------------------------------
  5018.  
  5019.      RIGHT$(str$, number)
  5020.  
  5021.      Returns the rightmost number  of characters from the  string
  5022.      str$.
  5023.  
  5024.      Returns:  A string
  5025.  
  5026.      See also: LEFT$ MID$
  5027.  
  5028.      Example:  a$:=RIGHT$("Hello",2)
  5029.  
  5030.                Assigns the string "lo" to the variable a$.
  5031.  
  5032.      ---------------------------------------------------------------------
  5033.      ROUND(number, places)
  5034.  
  5035.      Truncates the  first parameter  to the  number of  specified
  5036.      places of decimals,  or if  places is  negative, the  output
  5037.      will be to that number of significant digits.
  5038.  
  5039.      Returns:  A number
  5040.  
  5041.      See also: FLOOR CEIL
  5042.  
  5043.      Example:  num:=ROUND(1.546,2)
  5044.  
  5045.                Assigns num to be 1.55
  5046.  
  5047.      Example:  num:=ROUND(213.2,-1)
  5048.  
  5049.                Assigns num to be 210.0
  5050.  
  5051.      ---------------------------------------------------------------------
  5052.  
  5053.  
  5054.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5055.        - Appendices.                         Page: 89 -
  5056.  
  5057.  
  5058.      SEED(Value)
  5059.  
  5060.      Sets the  seed for  the  pseudo-random number  generator  in
  5061.      RExL.  This  is  set,  by  default,  at  the  start  of   an
  5062.      application to a constant  value (resulting in a  repeatable
  5063.      array of random  numbers), but you can  make your seed  more
  5064.      random by using some function of date and time.  Value  must
  5065.      be in the range of 0 to 65535.
  5066.  
  5067.      Returns:  True
  5068.  
  5069.      See also: RAND
  5070.  
  5071.      Example:  SEED((DTminuteno()+DTsecondno())*65535/120)
  5072.  
  5073.                This expression randomly assign the seed value  to
  5074.      one of 120 different values.
  5075.  
  5076.      ---------------------------------------------------------------------
  5077.  
  5078.      SIN(angle)
  5079.  
  5080.      Calculates the sine of the angle angle, measured in radians.
  5081.  
  5082.      Returns:  A number
  5083.  
  5084.      See also: COS TAN RAD DEG
  5085.  
  5086.      Example:  value:=SIN(0.5)
  5087.  
  5088.                Assigns the  value  0.4794255386 to  the  variable
  5089.      value.
  5090.  
  5091.      ---------------------------------------------------------------------
  5092.  
  5093.      SLN(cost, salvage, life)
  5094.  
  5095.      Calculates the  straight  line,  or  constant,  depreciation
  5096.      allowance of  an  asset  per  period.  The  first  parameter
  5097.      specifies the initial cost, the second, the salvage value at
  5098.      the end of the item's life and the third parameter gives the
  5099.      expected life of the item.
  5100.  
  5101.      Returns:  A number
  5102.  
  5103.      Example:  depr:=SLN(5000,1500,5)
  5104.  
  5105.                Assigns 700 to the variable depr.
  5106.  
  5107.  
  5108.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5109.        - Appendices.                         Page: 90 -
  5110.  
  5111.  
  5112.      ---------------------------------------------------------------------
  5113.  
  5114.      SOUNDEX$(string)
  5115.  
  5116.      SOUNDEX$()  calculates  the  soundex  code  of  the   string
  5117.      parameter. The soundex code of a string is a four  character
  5118.      string, having  an  initial letter  (equal  to that  of  the
  5119.      source string) followed by a  three digit code, which  codes
  5120.      for the phonetic value of that string.
  5121.  
  5122.      SOUNDEX$() is most usually used in conjunction with database
  5123.      applications, where the precise  spelling of search keys  is
  5124.      not known,  or  where  there is  an  significant  chance  of
  5125.      misspelling of a search key.
  5126.  
  5127.      Returns:  A four letter string
  5128.  
  5129.      Example:  search1$:=SOUNDEX$("smith")
  5130.  
  5131.      Example:  search2$:=SOUNDEX$("smythe")
  5132.  
  5133.                Both search1$ and search2$ are assigned the  value
  5134.      of "S530", the soundex code of both strings.
  5135.  
  5136.      ---------------------------------------------------------------------
  5137.  
  5138.      SQRT(number)
  5139.  
  5140.      Calculates the square root of  a number. The number must  be
  5141.      zero or greater as the  square root of a negative number  is
  5142.      undefined.
  5143.  
  5144.      Returns:  A positive number
  5145.  
  5146.      Example:  num:=SQRT(9)
  5147.  
  5148.                Assigns the value 3 to the variable num.
  5149.  
  5150.      ---------------------------------------------------------------------
  5151.  
  5152.      STRING$(number, width, places)
  5153.  
  5154.      Returns number converted to a string of the specified  width
  5155.      and number of  decimal places. The  width must also  include
  5156.      space for a decimal  point and minus sign.  If the width  is
  5157.      larger than  the  resulting number  then  it will  be  right
  5158.      justified. If width is less than it then the string will  be
  5159.      truncated.  If  the  width  is  zero,  the  number  will  be
  5160.  
  5161.  
  5162.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5163.        - Appendices.                         Page: 91 -
  5164.  
  5165.  
  5166.      converted to the format most suitable, that is omitting  the
  5167.      decimal point and  fraction if none  exists or inserting  an
  5168.      exponent if the number is too large for normal display.
  5169.  
  5170.      Returns:  A string
  5171.  
  5172.      Example:  num$:=STRING$(-5.2,4,1)  This   will  assign   the
  5173.      string "-5.2" to the variable num$.
  5174.  
  5175.      ---------------------------------------------------------------------
  5176.  
  5177.      SUFFIX$(num)
  5178.  
  5179.      SUFFIX$() returns  the  parameter  as  a  string,  with  the
  5180.      appropriate
  5181.  
  5182.      numeric suffix added.   This  function is  most useful  when
  5183.      applied to dates.
  5184.  
  5185.      Returns:  A string
  5186.  
  5187.      Example:  a$:=SUFFIX$(12)
  5188.  
  5189.                Returns the string "12th" to the variable a$
  5190.  
  5191.      ---------------------------------------------------------------------
  5192.  
  5193.      SYD(cost, salvage, life, period)
  5194.  
  5195.      Calculates the sum of  the year's depreciation allowance  of
  5196.      an asset for a specified of period, given the original cost,
  5197.      the salvage value at  the end of its  life of life  periods.
  5198.      The life is  measured in the  same units  as periods and  it
  5199.      typically the number of years of expected life.
  5200.  
  5201.      Returns:  A number
  5202.  
  5203.      Example:  x:=SYD(1000,100,9,3)
  5204.  
  5205.                Returns the value 140 to the variable x.
  5206.  
  5207.      ---------------------------------------------------------------------
  5208.  
  5209.      TAN(angle)
  5210.  
  5211.      Calculates the trigonometrical  tangent of  an angle,  where
  5212.      the angle is measured in radians.
  5213.  
  5214.  
  5215.  
  5216.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5217.        - Appendices.                         Page: 92 -
  5218.  
  5219.  
  5220.      Returns:  A number
  5221.  
  5222.      Example:  value:=TAN(0.5)
  5223.  
  5224.                This will  assign the  value 0.5463024898  to  the
  5225.      variable value.
  5226.  
  5227.      ---------------------------------------------------------------------
  5228.  
  5229.      TERM(pmt, rate, fv)
  5230.  
  5231.      TERM() calculates  and  returns  the number  of  periods  of
  5232.      payment, each payment of amount pmt needed to reach fv at  a
  5233.      periodic interest rate, rate.  The rate parameter should  be
  5234.      expressed as a decimal  fraction, the percentage divided  by
  5235.      100.
  5236.  
  5237.      Returns:  A number
  5238.  
  5239.      Example:  num:=TERM(50,0.15,5000)
  5240.  
  5241.                Assigns the value 19.837 to the variable num.
  5242.  
  5243.      ---------------------------------------------------------------------
  5244.  
  5245.      TRIM$(str$,trimtype)
  5246.  
  5247.      TRIM$()  returns  the  string  parameter  str$  with  spaces
  5248.      removed from it, according  to the numeric parameter.  Legal
  5249.      values for trimtype are as follows:
  5250.  
  5251.      trimtype       Meaning
  5252.      0              Remove spaces from both ends of the string
  5253.      1              Remove spaces from the right end only
  5254.      2              Remove spaces from the left end only
  5255.  
  5256.      Returns:  A string
  5257.  
  5258.      Example:  a$:=TRIM$(" <-> ",0)
  5259.  
  5260.                Returns the string "<->" to a$.
  5261.  
  5262.      Example:  a$:=TRIM$(" <-> ",1)
  5263.  
  5264.                Returns the string " <->" to a$.
  5265.  
  5266.      Example:  a$:=TRIM$(" <-> ",2)
  5267.  
  5268.  
  5269.  
  5270.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5271.        - Appendices.                         Page: 93 -
  5272.  
  5273.  
  5274.                Returns the string "<-> " to a$.
  5275.  
  5276.      ---------------------------------------------------------------------
  5277.  
  5278.      TRUE()
  5279.  
  5280.      Returns the value True. If  you place this as the first  and
  5281.      only line of a OR condition  in a rule, then that rule  will
  5282.      always evaluate to True.
  5283.  
  5284.      Returns:  True
  5285.  
  5286.      See also: FALSE
  5287.  
  5288.      Example:  TRUE()
  5289.  
  5290.      ---------------------------------------------------------------------
  5291.  
  5292.      UPPER$(string$)
  5293.  
  5294.      UPPER$()  returns  the  parameter  string  in  upper   case.
  5295.      European accented  characters  are  not translated  by  this
  5296.      function.
  5297.  
  5298.      Returns:  A string
  5299.  
  5300.      See also: LOWER$
  5301.  
  5302.      Example:  a$:=UPPER$("hello")
  5303.  
  5304.                Returns the string "HELLO" to a$.
  5305.  
  5306.      ---------------------------------------------------------------------
  5307.  
  5308.      VALUE(number$)
  5309.  
  5310.      VALUE() converts a string, number$, to a number. It  returns
  5311.      the converted  number if  successful or  0 if  there was  an
  5312.      error.  number$ may contain exponents using the e+99 format.
  5313.  
  5314.      Returns:  True if successful, False otherwise
  5315.  
  5316.      Example:  num:=VALUE("5.23")
  5317.  
  5318.                Assigns a value of 5.23 to the variable num
  5319.  
  5320.      ---------------------------------------------------------------------
  5321.  
  5322.  
  5323.  
  5324.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5325.        - Appendices.                         Page: 94 -
  5326.  
  5327.  
  5328.      VERSION()
  5329.  
  5330.      Returns  the  version  number   of  RExL  under  which   the
  5331.      application is running.
  5332.  
  5333.      Returns:  A number
  5334.  
  5335.      Example:  ver:=VERSION()
  5336.  
  5337.                Sets the variable  ver to be x.yy  where x is  the
  5338.      major version number and yy is the minor version number.
  5339.  
  5340.      ---------------------------------------------------------------------
  5341.  
  5342.      XOR(log1,log2)
  5343.  
  5344.      XOR() performs a logical  exclusive-or upon the two  logical
  5345.      parameters passed to the function. The function returns True
  5346.      if the two parameters are  of different logical values,  and
  5347.      False otherwise.
  5348.  
  5349.      Returns:  A number
  5350.  
  5351.      See also: AND NOT EQV OR IMP
  5352.  
  5353.      Example:  val:=XOR(TRUE(),FALSE())
  5354.  
  5355.                Returns False to to the variable val.
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5379.        - Appendices.                         Page: 95 -
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.                               Chapter 4
  5389.  
  5390.                          Keystroke reference
  5391.  
  5392.  
  5393.      4.1  Editor keystrokes
  5394.  
  5395.  
  5396.                    Table 4.1: Cursor movement keys
  5397.  
  5398.      <F1>                Context sensitive help
  5399.      <Left>              Move one character left
  5400.      <Right>             Move one character right
  5401.      <Home>              Move to start of input
  5402.      <End>               Move to end of input
  5403.      <Ctrl-Left>         Move to previous word
  5404.      <Ctrl-Right>        Move to next word
  5405.      <Backspace>         Delete character to left
  5406.      <Del>               Delete character to right
  5407.      <Shift-Enter>       Place string in scrap
  5408.      <Shift-Ins>         Paste string from scrap
  5409.      <Ctrl-U>            Undo changes to string
  5410.      <Scroll-Lock>       Move window (if applicable)
  5411.      <Alt-Equals>        Toggle macro recording
  5412.      <Alt-Minus>         Select playback macro
  5413.  
  5414.                  Table 4.2: Hilite bar movement keys
  5415.  
  5416.      <Up>, <Down>        Move one line up and down
  5417.      <PgUp>              Move up 20 lines
  5418.      <PgDn>              Move down 20 lines
  5419.      <Ctrl-Home>         Move to top of screen
  5420.      <Ctrl-End>          Move to end of screen
  5421.      <Ctrl-PgUp>         Move to to of rule
  5422.      <Tab>               Expand rule definition
  5423.      <Shift-Tab>         Contract rule definition
  5424.      <Alt-D>, <Ctrl-Y>   Delete line
  5425.      <Alt-B>             Insert blank line
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5433.        - Appendices.                         Page: 96 -
  5434.  
  5435.  
  5436.                        Table 4.3: Modifier keys
  5437.  
  5438.      <Ctrl-E>,<F4>  Start expression
  5439.      <F10>          Select screen type
  5440.      <Ctrl-O>       Make rule one-pass
  5441.      <Ctrl-M>       Toggle [Multi]
  5442.      <Ctrl-S>       Toggle [Single]
  5443.      <Ctrl-N>       Toggle [Not]
  5444.      <Ctrl-W>       Toggle [While]
  5445.      <Ctrl-B>       Toggle [BackTo]
  5446.      <Ctrl-Z>       Toggle [Zap]
  5447.  
  5448.                      Table 4.4: Editor list keys
  5449.  
  5450.      <Alt-Z>,<Shift-F2>  Rule list
  5451.           <Ctrl-R>            Rule reference list
  5452.           <Tab>               Expand and enter rule
  5453.      <Alt-S>, <Shift-F3> Screen list
  5454.           <Ctrl-S>            Screen reference list
  5455.           <Tab>               Locate and position at 1st occurrence
  5456.      <Alt-U>, <Shift-F4> Unused rule list
  5457.           <Tab>               Enter rule definition
  5458.           <Ctrl-Y>, <Del>, <Alt-D> Delete rule
  5459.      <Shift-F5>          Unused screen list
  5460.           <Ctrl-Y>, <Del>,<Alt-D>  Delete screen from file
  5461.      <Alt-V>, <Shift-F6>      Variable list
  5462.           <Ctrl-R>            Variable rule-ref list
  5463.           <Tab>               Alter array dimensions
  5464.      <Ctrl-F,<Shift-F7>       Function list
  5465.  
  5466.                  Table 4.5: Editor miscellaneous keys
  5467.  
  5468.      <Alt-X>        Quit editor
  5469.      <Alt-G>        Graphic rule display
  5470.      <Alt-F5>       Show user screen
  5471.      <Ctrl-F8>      Toggle breakpoint
  5472.      <Ctrl-R>       Rule reference
  5473.      <F2>           Save application
  5474.      <F3>           Load new application
  5475.      <F9>           Debug application
  5476.      <Ctrl-F9>      Run application (no debugger)
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5487.        - Appendices.                         Page: 97 -
  5488.  
  5489.  
  5490.      4.2  Screen designer keystrokes
  5491.  
  5492.  
  5493.                Table 4.6: Screen designer movement keys
  5494.  
  5495.      <Tab>          ten characters right
  5496.      <Shift-Tab>    ten characters left
  5497.      <Left>         one characters left
  5498.      <Right>        one characters right
  5499.      <Up>           one characters up
  5500.      <Down>         one characters down
  5501.      <PgUp>         to top of screen
  5502.      <Ctrl-Home>    to top of screen
  5503.      <PgDn>         to bottom of screen
  5504.      <Ctrl-End>     to end of screen
  5505.      <Ctrl-PgUp>    to top left hand corner of screen
  5506.      <Ctrl-PgDn>    to top left hand corner of screen
  5507.      <Home>         to left of screen
  5508.      <End>          to right of screen
  5509.      <Ctrl-Right>   one word right
  5510.      <Ctrl-Left>    one word left
  5511.      <Enter>        next line, to right of nearest box if possible
  5512.      <Del>          Delete character to right
  5513.      <Backspace>    Delete character to left
  5514.  
  5515.            Table 4.7: Screen designer field definition keys
  5516.  
  5517.      <Alt-F>        Display expression attached to hilited field
  5518.      <Ctrl-M>       Define menu field
  5519.      <Ctrl-T>       Define toggle list field
  5520.      <Ctrl-R>       Define radio button field
  5521.      <Ctrl-O>       Define output field
  5522.      <Ctrl-I>       Define input field
  5523.      <Ctrl-F>       Define new field $ Field control menu
  5524.      <Ctrl-C>       Define check box field
  5525.      <F10>          Edit field expression
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5541.        - Appendices.                         Page: 98 -
  5542.  
  5543.  
  5544.               Table 4.8: Screen designer line draw keys
  5545.  
  5546.      <Space>, <Right>    One character right
  5547.      <Left>              One character left
  5548.      <Down>              One line down
  5549.      <Up>                One line up
  5550.      <Enter>, <Esc>      End line draw
  5551.      <Del>               Toggle delete mode
  5552.      <Alt-1>             Force horizontal emphasis to one line
  5553.      <Alt-2>             Force horizontal emphasis to two lines
  5554.      <Alt-3>             Force vertical emphasis to one line
  5555.      <Alt-4>             Force vertical emphasis to two lines
  5556.  
  5557.             Table 4.9: Screen designer miscellaneous keys
  5558.  
  5559.      <Alt-M>        Begin block mark
  5560.      <F7>           Begin block mark
  5561.      <Ctrl-S>       Show screen designer status
  5562.      <Ctrl-Y>       Delete characters & fields on line
  5563.                     Second time, delete entire line
  5564.      <F2>           Save screen
  5565.      <F3>           Load new screen
  5566.      <Alt-X>        Exit from screen designer
  5567.      <Esc>          Exit from screen designer
  5568.      <Alt-V>, <Shift-F6>      Variable list
  5569.      <Alt-Z>, <Shift-F2>      Rule list
  5570.      <Alt-S>, <Shift-F3>      Screen list
  5571.      <Alt-L>        Enter line draw mode
  5572.      <Alt-D>        Delete hilited field
  5573.      <Alt-T>        Toggle flash-intensity
  5574.      <Alt-R>        Remark last block
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5595.        - Appendices.                         Page: 99 -
  5596.  
  5597.  
  5598.              Table 4.10: Screen designer block mark keys
  5599.  
  5600.      <End>          Extend block mark to right of screen
  5601.      <Home>         Extend block mark to left of screen
  5602.      <PgDn>, <Ctrl-End>  Extend block mark to bottom of screen
  5603.      <PgUp>, <Ctrl-Home> Extend block mark to top of screen
  5604.      <Ctrl-PgDn>    Extend block mark to bottom-right of screen
  5605.      <Ctrl-PgUp>    Extend block mark to top-left of screen
  5606.      <Up>           Extend block mark one line up
  5607.      <Down>         Extend block mark one line down
  5608.      <Right>        Extend block mark one line right
  5609.      <Left>         Extend block mark one line left
  5610.      <Tab>          Extend block mark ten characters right
  5611.      <Shift-Tab>    Extend block mark ten characters left
  5612.      <F8>, <Enter>, <Alt-M>   Select marked block
  5613.      <Esc>          Terminate block mark
  5614.      <Alt-D>, <Ctrl-Y>, <Del> Delete marked block
  5615.      <Alt-B>        Draw box in marked block
  5616.  
  5617.  
  5618.      4.3  Debugger keystrokes
  5619.  
  5620.  
  5621.             Table 4.11: Debugger hilite bar movement keys
  5622.  
  5623.      <Tab>          Expand rule definition
  5624.      <Shift-Tab>    Contract rule definition
  5625.      <Left>         Move cursor left one character
  5626.      <Right>        Move cursor right one character
  5627.      <PgUp>         Move up 20 lines
  5628.      <PgDn>         Move down 20 lines
  5629.      <Up>           Move up one line
  5630.      <Enter>        Move down one line
  5631.      <Down>         Move down one line
  5632.      <Ctrl-Home>    Move to top of screen
  5633.      <Ctrl-End>     Move to end of screen
  5634.      <Ctrl-PgUp>    Move to top of rule
  5635.  
  5636.                     Table 4.12: Debugger list keys
  5637.  
  5638.      <Alt-Z>, <Shift-F2>      Rule list
  5639.      <Tab>                    Expand rule definition
  5640.      <Alt-S>, <Shift-F3>      Screen list
  5641.      <Alt-U, <Shift-F4>       Unused rule list
  5642.      <Shift-F5>               Unused screen list
  5643.      <Alt-V>, <Shift-F6>      Variable list
  5644.      <Ctrl-F>, <Shift-F7>     Function list
  5645.  
  5646.  
  5647.  
  5648.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5649.        - Appendices.                         Page: 100 -
  5650.  
  5651.  
  5652.                Table 4.13: Debugger miscellaneous keys
  5653.  
  5654.      <Alt-X>                  Quit debugger
  5655.      <Alt-F5>                 Show user screen
  5656.      <Ctrl-E>, <Ctrl-F4>      Evaluate expression
  5657.      <Ctrl-W>, <Ctrl-F7>      Add watch
  5658.      <Alt-F7>                 Animate debugger
  5659.      <F4>                     Execute to cursor
  5660.      <F5>                     Expand debugger window
  5661.      <F6>                     Toggle windows
  5662.      <F7>                     Trace execution
  5663.      <F8>                     Step execution
  5664.      <F9>                     Run program
  5665.      <Ctrl-F9>                Remove all breakpoints and run program
  5666.      <Ctrl-F8>                Toggle breakpoint
  5667.      <Space>                  Trace execution
  5668.      <Ctrl-O>                 Return cursor to origin
  5669.      <Alt-Equals>             Toggle macro recording
  5670.      <Alt-Minus>              Select playback macro
  5671.      <Alt-D>, <Ctrl-Break>    Pass control to debugger
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5703.        - Appendices.                         Page: 102 -
  5704.  
  5705.  
  5706.                 Table 4.14: KB function return values
  5707.  
  5708.      <Backspace>    8        <Left>          331     <Alt-4>          379
  5709.      <Tab>          9        <Right>         333     <Alt-5>          380
  5710.      <Enter>        13       <End>           335     <Alt-6>          381
  5711.      <Esc>          27       <Down>          336     <Alt-7>          382
  5712.      <Shift-Tab>    271      <PgDn>          337     <Alt-8>          383
  5713.      <Alt-Q>        272      <Del>           339     <Alt-9>          384
  5714.      <Alt-W>        273      <Shift-F1>      340     <Alt-0>          385
  5715.      <Alt-E>        274      <Shift-F2>      341     <Alt-Minus>      386
  5716.      <Alt-R>        275      <Shift-F3>      342     <Alt-Equals>     387
  5717.      <Alt-T>        276      <Shift-F4>      343     <Ctrl-PgUp>      388
  5718.      <Alt-Y>        277      <Shift-F5>      344     <Shift-Insert>   500
  5719.      <Alt-U>        278      <Shift-F6>      345     <Shift-End>      501
  5720.      <Alt-I>        279      <Shift-F7>      346     <Shift-Down>     502
  5721.      <Alt-O>        280      <Shift-F8>      347     <Shift-PgDn>     503
  5722.      <Alt-P>        281      <Shift-F9>      348     <Shift-Left>     504
  5723.      <Alt-A>        286      <Shift-F10>     349     <Shift-Right>    506
  5724.      <Alt-S>        287      <Ctrl-F1>       350     <Shift-Home>     507
  5725.      <Alt-D>        288      <Ctrl-F2>       351     <Shift-Up>       508
  5726.      <Alt-F>        289      <Ctrl-F3>       352     <Shift-PgUp>     509
  5727.      <Alt-G>        290      <Ctrl-F4>       353     <Shift-Enter>    510
  5728.      <Alt-H>        291      <Ctrl-F5>       354     <Ctrl-A>         601
  5729.      <Alt-J>        292      <Ctrl-F6>       355     <Ctrl-B>         602
  5730.      <Alt-K>        293      <Ctrl-F7>       356     <Ctrl-C>         603
  5731.      <Alt-L>        294      <Ctrl-F8>       357     <Ctrl-D>         604
  5732.      <Alt-Z>        300      <Ctrl-F9>       358     <Ctrl-E>         605
  5733.      <Alt-X>        301      <Ctrl-F10>      359     <Ctrl-F>         606
  5734.      <Alt-C>        302      <Alt-F1>        360     <Ctrl-G>         607
  5735.      <Alt-V>        303      <Alt-F2>        361     <Ctrl-J>         610
  5736.      <Alt-B>        304      <Alt-F3>        362     <Ctrl-K>         611
  5737.      <Alt-N>        305      <Alt-F4>        363     <Ctrl-L>         612
  5738.      <Alt-M>        306      <Alt-F5>        364     <Ctrl-N>         614
  5739.      <F1>           315      <Alt-F6>        365     <Ctrl-O>         615
  5740.      <F2>           316      <Alt-F7>        366     <Ctrl-P>         616
  5741.      <F3>           317      <Alt-F8>        367     <Ctrl-Q>         617
  5742.      <F4>           318      <Alt-F9>        368     <Ctrl-R>         618
  5743.      <F5>           319      <Alt-F10>       369     <Ctrl-S>         619
  5744.      <F6>           320      <Ctrl-Left>     371     <Ctrl-T>         620
  5745.      <F7>           321      <Ctrl-Right>    372     <Ctrl-U>         621
  5746.      <F8>           322      <Ctrl-End>      373     <Ctrl-V>         622
  5747.      <F9>           323      <Ctrl-PgDn>     374     <Ctrl-W>         623
  5748.      <F10>          324      <Ctrl-Home>     375     <Ctrl-X>         624
  5749.      <Home>         327      <Alt-1>         376     <Ctrl-Y>         625
  5750.      <Up>           328      <Alt-2>         377     <Ctrl-Z>         626
  5751.      <PgUp>         329      <Alt-3>         378     <Ctrl-Enter>     700
  5752.  
  5753.  
  5754.  
  5755.  
  5756.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5757.        - Appendices.                         Page: 103 -
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.                               Chapter 5
  5767.  
  5768.                             Error Messages
  5769.  
  5770.  
  5771.      5.1  Error messages common to runtime and editor
  5772.  
  5773.  
  5774.      5.1.1  Bad help file format
  5775.  
  5776.      The help file has become corrupted somehow.  The only way to
  5777.      remove this error is to restore a copy of the help file from
  5778.      the distribution disks, or  archive file which you  received
  5779.      your copy of RExL in.
  5780.  
  5781.      5.1.2  Cannot locate system
  5782.  
  5783.      RExL cannot shell to DOS because it cannot locate the system
  5784.      files which are required.  This is most likely to be  caused
  5785.      by the  COMSPEC environment  variable set  incorrectly.   It
  5786.      should contain the  name, directory and  drive of your  main
  5787.      command processor.   Try issuing the  following DOS  command
  5788.      from the  normal DOS  prompt, if  none  of the  above  makes
  5789.      sense.
  5790.  
  5791.      set comspec=c:\command.com
  5792.  
  5793.      5.1.3  Cannot open print file
  5794.  
  5795.      RExL is unable to open the file which was specified  instead
  5796.      of the printer. Generally, this is caused by running out  of
  5797.      file handles.   This condition can  be rectified by  placing
  5798.      the following line in your CONFIG.SYS file:
  5799.  
  5800.      files=20
  5801.  
  5802.      5.1.4  Couldn't open file
  5803.  
  5804.      RExL is unable to open some file. Generally, this is  caused
  5805.      by running  out of  file handles.    This condition  can  be
  5806.      rectified by placing the  following line in your  CONFIG.SYS
  5807.      file:
  5808.  
  5809.  
  5810.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5811.        - Appendices.                         Page: 104 -
  5812.  
  5813.  
  5814.      files=20
  5815.  
  5816.      5.1.5  Macros nested too deep (20=max)
  5817.  
  5818.      You're most unlikely to encounter this error.  It  indicates
  5819.      that you are trying to  execute a macro from within a  macro
  5820.      from within a  macro etc,  to a  level of  twenty deep,  the
  5821.      maximum allowable.
  5822.  
  5823.      5.1.6  Help file index is not loaded
  5824.  
  5825.      If RExL  was unable  to locate  the  help file,  this  error
  5826.      message will  be  displayed if  any  of  the help  keys  are
  5827.      pressed.
  5828.  
  5829.      5.1.7  Unable to locate help file
  5830.  
  5831.      When the editor starts up, it preloads a portion of the help
  5832.      file to allow  more rapid access to  the information in  it.
  5833.      If the editor is not able to locate the help file in the  in
  5834.      the  current  directory  or  the  or  list  of   directories
  5835.      specified in  the REXL  environment variable,  then it  will
  5836.      isue this error message.
  5837.  
  5838.      Automatic  preloading  can  be   disabled  by  setting   the
  5839.      Options|Help menu option to slow.
  5840.  
  5841.      5.1.8  Macro recursion not allowed
  5842.  
  5843.      RExL will not allow  a macro being defined  to call a  macro
  5844.      which in turn executes the keystroke which is being defined.
  5845.      This is to prevent infinite recursion of the macro facility.
  5846.  
  5847.      5.1.9  Error loading configuration file
  5848.  
  5849.      The  RExL  configuration  file   REXL.CFG  in  the   current
  5850.      directory is invalid or could not be loaded for some reason.
  5851.      The  configuration  file  format  changes  from  version  to
  5852.      version, so this error may  appear if you run a new  version
  5853.      of RExL without  deleting the  old configuration  file.   If
  5854.      this occursm, just ignore the error and it won't re-appear.
  5855.  
  5856.      5.1.10  Zero memory allocation request!
  5857.  
  5858.      For some reason, a zero length request has been made to  the
  5859.      memory allocator.  This should never occur, thus  indicating
  5860.      a bug if  it does.   Note  down the  exact circumstances  in
  5861.      which the error occurred and report it to us.
  5862.  
  5863.  
  5864.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5865.        - Appendices.                         Page: 105 -
  5866.  
  5867.  
  5868.      5.1.11  Not enough memory to perform selected operation
  5869.  
  5870.      There is not enough memory available for RExL to do whatever
  5871.      you just asked it to.   If you have any TSR programs  loaded
  5872.      in memory, then unload them, re-enter RExL and try again.
  5873.  
  5874.      5.1.12  This window is not movable
  5875.  
  5876.      You have just tried to  move a window which is not  movable.
  5877.      Generally, the only unmovable windows are the system menus.
  5878.  
  5879.      5.1.13  No directories available
  5880.  
  5881.      RExL is  unable to  locate any  directories in  the  current
  5882.      directory for the File|Change directory menu.  This  warning
  5883.      only occurs if  you are  in the  root directory  of a  drive
  5884.      which has no subdirectories.
  5885.  
  5886.      5.1.14  No files in directory
  5887.  
  5888.      This error in a file  selection menu if the specified  drive
  5889.      and directory  do  not  contain any  directories  nor  files
  5890.      matching the stipulated file specification.
  5891.  
  5892.      5.1.15  No macros defined
  5893.  
  5894.      The Options|Save macro file menu option has been chosen  but
  5895.      there are no macros currently defined in memory to be saved.
  5896.  
  5897.      5.1.16  --- Out of memory ---
  5898.  
  5899.      RExL has run out of memory in some critical operation  where
  5900.      memory must be  present.  The  best course  of action it  to
  5901.      quit RExL  as  soon as  possible,  remove any  TSR  programs
  5902.      resident and to retry.
  5903.  
  5904.      5.1.17  No screens defined
  5905.  
  5906.      You have requested the screen list, but there are no screens
  5907.      present to make the list from.
  5908.  
  5909.      5.1.18  Not enough memory to load system
  5910.  
  5911.      The DOS  command processor  COMMAND.COM requires  a  certain
  5912.      amount of memory  to run, depending on  the version of  DOS.
  5913.      If there is not enough memory present then this warning will
  5914.      appear.
  5915.  
  5916.  
  5917.  
  5918.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5919.        - Appendices.                         Page: 106 -
  5920.  
  5921.  
  5922.      5.1.19  No unused rules available
  5923.  
  5924.      You have  selected  the  unused  rule  list,  but  RExL  has
  5925.      determined that all rules are used in the listing.  Remember
  5926.      that recursive rules are taken  to be used, irrespective  of
  5927.      whether they are called by  any other rules.  When  scanning
  5928.      for unused rules, RExL also checks the line buffer to locate
  5929.      rules, marking them as used if any are present.
  5930.  
  5931.      5.1.20  No unused screens available
  5932.  
  5933.      You have  selected  the unused  screen  list, but  RExL  has
  5934.      determined that all  screens defined in  the current  screen
  5935.      file are  used in  the listing.   When  scanning for  unused
  5936.      screens, RExL also checks the line buffer to locate screens,
  5937.      marking them as used if any are present.
  5938.  
  5939.      5.1.21  No variables defined
  5940.  
  5941.      You have  selected  the variable  list,  but RExL  has  been
  5942.      unable to find any variables in its internal list.
  5943.  
  5944.      5.1.22  Rule is not used in current listing
  5945.  
  5946.      RExL has tried and failed to find any references to the rule
  5947.      for which you  have just  requested a  reference list.  This
  5948.      error can  occur from  the editor  window when  <Ctrl-R>  is
  5949.      pressed, or in the rule list, with the same keystroke.
  5950.  
  5951.      5.1.23  Error saving configuration file
  5952.  
  5953.      RExL was unable  to save the  configuration file,  REXL.CFG,
  5954.      correctly.  If a partial  file was saved, then it should  be
  5955.      deleted since  it  will generate  an  error when  RExL  next
  5956.      starts from that directory.
  5957.  
  5958.      5.1.24  Screen is not used in current listing
  5959.  
  5960.      RExL has  tried and  failed to  find any  references to  the
  5961.      screen for which you have  just requested a reference  list.
  5962.      This error can  occur in the screen  list, when <Ctrl-R>  is
  5963.      pressed.
  5964.  
  5965.      5.1.25  Screen file is corrupt
  5966.  
  5967.      The screen file has somehow  become corrupted and no  longer
  5968.      can be read by REXL. The  only action which can be taken  is
  5969.      to restore the screen file from your last backup.
  5970.  
  5971.  
  5972.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  5973.        - Appendices.                         Page: 107 -
  5974.  
  5975.  
  5976.      5.1.26  Too many files open
  5977.  
  5978.      RExL has failed when attempting  to enter a DOS shell  since
  5979.      it was unable to open the command processor file because  of
  5980.      lack of available file handles.  Close some files and retry.
  5981.  
  5982.      5.1.27  Too many keys in macro (500=max)
  5983.  
  5984.      RExL can store up to 500 keystrokes in a single macro.  This
  5985.      error appears if you have  attempted to go past this  limit.
  5986.      If you  require that  more than  500  keystrokes are  to  be
  5987.      played back, then you should define one macro which does the
  5988.      first section  and  then  calls a  macro  which  does  those
  5989.      remaining.
  5990.  
  5991.      5.1.28  Variable is not used in current listing
  5992.  
  5993.      You have tried to get RExL to generate a variable  reference
  5994.      list for a  variable which does not  have any references  in
  5995.      the listing.   Note that RExL  does not  look in the  screen
  5996.      file for variables, so that  a variable which is  apparently
  5997.      unused may be present in some screen.
  5998.  
  5999.      5.1.29  Wrong source file format
  6000.  
  6001.      RExL  application  listing  files  change  format  from  one
  6002.      version to another.  This error is generated if you  attempt
  6003.      to load an application file  saved from one version of  RExL
  6004.      into  another  version.     To  transfer  listings   between
  6005.      versions, use the Import|ASCII load and save options.
  6006.  
  6007.      5.1.30  Wrong screen file format
  6008.  
  6009.      The editor has  attempted to load  an incorrectly  formatted
  6010.      screen from a screen file.  This is usually caused by  using
  6011.      different versions of RExL.   Use the Import|ASCII load  and
  6012.      save menu  options to  move applications  between  different
  6013.      versions of RExL.
  6014.  
  6015.      5.1.31  Error opening screen file
  6016.  
  6017.      RExL was unable to open the screen file associated with  the
  6018.      current application.   This is  probably due  to having  too
  6019.      many files open.  Close some files and try again.
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.  
  6026.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6027.        - Appendices.                         Page: 108 -
  6028.  
  6029.  
  6030.      5.2  Error messages unique to editor
  6031.  
  6032.  
  6033.      5.2.1  Incorrect format in listing file
  6034.  
  6035.      RExL has found some incorrectly formatted item in the  ASCII
  6036.      listing file, which  it is unable to  process.  ASCII  files
  6037.      are not intended for editing with text editors and  attempts
  6038.      to do so may produce errors such as this one.
  6039.  
  6040.      5.2.2  Cannot nest fields
  6041.  
  6042.      All field types, except menu fields, cannot nest or  overlay
  6043.      each other.
  6044.  
  6045.      5.2.3  Can only delete recursed rule from first level of
  6046.      recursion
  6047.  
  6048.      A rule which is in the rule stack cannot have lines  deleted
  6049.      from it,  since  they  might  corrupt  the  rule  stack  and
  6050.      possibly crash  RExL.    This error  is  generated  when  an
  6051.      attempt is made to delete  a block from a recursive rule  or
  6052.      to delete a line from a recursive rule.
  6053.  
  6054.      If the line or lines must be deleted, then you should return
  6055.      to the root  (by pressing <Shift-Tab>  repeatedly) and  then
  6056.      entering the  rule by  selecting it  in  the rule  list  and
  6057.      pressing <Tab>.
  6058.  
  6059.      5.2.4  Unable to locate runtime module
  6060.  
  6061.      RExL has tried  to run the runtime  and debugger module  but
  6062.      was unable to find it.  When searching, RExL first  searches
  6063.      the current  directory, then  the directory  or  directories
  6064.      specified by the REXL environment variable, and finally  the
  6065.      entire DOS path.  Only when all of these have been  searched
  6066.      unsuccessfully, will this error message be displayed.
  6067.  
  6068.      5.2.5  Area crosses fields
  6069.  
  6070.      An attempt has been made to move or copy a block of text and
  6071.      fields from one place  on the screen to  another and in  the
  6072.      process overlaying  some previously  defined fields.    RExL
  6073.      does not allow this and issues this message when it occurs.
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6081.        - Appendices.                         Page: 109 -
  6082.  
  6083.  
  6084.      5.2.6  Can't have a field of this type in this screen
  6085.  
  6086.      You have tried to define a field of a type not permitted  in
  6087.      the current screen.   Consult the  table in  the chapter  on
  6088.      using the screen designer to find out the valid combinations
  6089.      of field type and screen type.
  6090.  
  6091.      5.2.7  Illegal array dimension
  6092.  
  6093.      When entering the  size of  an array  dimension, an  invalid
  6094.      number was entered.  Re-enter the number and try again.
  6095.  
  6096.      5.2.8  Maximum number of fields reached
  6097.  
  6098.      Screens can contain  a maximum of  127 fields.   Any  screen
  6099.      which contains more than that amount should be  re-designed,
  6100.      since the screen updating  process may become noticeable  on
  6101.      slow PC's.
  6102.  
  6103.      5.2.9  Memory low, should save now!
  6104.  
  6105.      The amount of  memory available  in RExL's  memory pool  has
  6106.      gone below  2,000  bytes.    In  order  to  save  a  listing
  6107.      successfully, RExL needs  about 1,000 bytes,  so saving  and
  6108.      quitting now would be a good idea.
  6109.  
  6110.      5.2.10  Not used in listing
  6111.  
  6112.      You have tried  to enter a  rule which  is defined, but  not
  6113.      used, in the current listing.
  6114.  
  6115.      5.2.11  This is the main rule and is called to start the kbs
  6116.  
  6117.      You have  attempted to  find rule  references for  the  main
  6118.      program rule. This is only a diagnostic message.
  6119.  
  6120.      5.2.12  Cannot change rule name to one already existing
  6121.  
  6122.      Normally, RExL allows for and automatically compensates  for
  6123.      the changing of the name of any rule in an application.   It
  6124.      does not, however, allow  a rule name to  be changed to  one
  6125.      which exists already, since a name conflict would arise. Any
  6126.      changes made to the rule name are undone.
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6135.        - Appendices.                         Page: 110 -
  6136.  
  6137.  
  6138.      5.2.13  This screen already exists
  6139.  
  6140.      As with rule names previously, it is not possible to  change
  6141.      the name  of a  screen to  one  which already  exists.   Any
  6142.      changes made to the screen name are undone.
  6143.  
  6144.      5.2.14  Toggle fields must be more than 5 and less than 75
  6145.      characters wide
  6146.  
  6147.      The width  of  toggle  fields  must  be  between  6  and  74
  6148.      characters inclusive.
  6149.  
  6150.      5.2.15  Unable to create screen file
  6151.  
  6152.      RExL was  unable to  create a  screen  file to  go with  the
  6153.      current application.   This  is  probably caused  either  by
  6154.      having no  disk space  left, or  by having  no file  handles
  6155.      available.
  6156.  
  6157.  
  6158.      5.2.16  Error saving file
  6159.  
  6160.      RExL was,  for  some  reason, unable  to  save  the  current
  6161.      application to disk successfully.   This is probably  caused
  6162.      either by having no  disk space left, or  by having no  file
  6163.      handles available.
  6164.  
  6165.      5.2.17  Error loading file
  6166.  
  6167.      RExL was, for  some reason,  unable to  load an  application
  6168.      from disk successfully.  This  is probably caused by  having
  6169.      no file handles available.
  6170.  
  6171.      5.2.18  Error loading screen file
  6172.  
  6173.      RExL was unable to load the screen file associated with  the
  6174.      current application.  
  6175.  
  6176.      5.2.19  Cannot change name of Main Program
  6177.  
  6178.      It is  not possible,  in the  current  version of  RExL,  to
  6179.      change the name of the root rule.
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6189.        - Appendices.                         Page: 111 -
  6190.  
  6191.  
  6192.      5.3  Error messages unique to runtime-debugger
  6193.  
  6194.  
  6195.      5.3.1  Array bounds overflow
  6196.  
  6197.      The runtime  module has  detected an  attempt to  access  an
  6198.      array element beyond the defined bounds of the array.  Array
  6199.      bounds can be set  in the editor from  the variable list  by
  6200.      selecting the array, pressing <Tab> and entering the size of
  6201.      the array.
  6202.  
  6203.      5.3.2  Can't set a breakpoint here
  6204.  
  6205.      A breakpoint can only be  set on a line which will  actually
  6206.      be  executed.    These  lines  include  rules,  screens  and
  6207.      expressions but do not include blank lines.
  6208.  
  6209.      5.3.3  Cannot open printer for output
  6210.  
  6211.      Cannot write to print device
  6212.      Cannot close print device ,
  6213.  
  6214.      The printer device cannot be  opened for output, written  to
  6215.      or closed.  If output is directed to the printer, then  make
  6216.      sure that it is connected and online.  Alternatively, if the
  6217.      printer destination has been set using the OUTPUT() command,
  6218.      then make sure that the filename is valid.
  6219.  
  6220.      5.3.4  Cannot find editor
  6221.  
  6222.      You have run the debugger from the editor or you have passed
  6223.      the -e  option on  the command  line,  but the  debugger  is
  6224.      unable to locate  the editor.   The debugger will  terminate
  6225.      when this  message  is  cleared.   When  searching  for  the
  6226.      editor, RExL searches the current directory, the directories
  6227.      specified in  the REXL  environment directory  and then  the
  6228.      entire DOS path.
  6229.  
  6230.      5.3.5  Divide by zero
  6231.  
  6232.      Your  application  has  attempted  a  to  divide  a  numeric
  6233.      expression by  zero,  which  is  a  computationally  invalid
  6234.      operation.
  6235.  
  6236.      5.3.6  String-numeric collision
  6237.  
  6238.      This error should never occur  in normal operation of  RExL.
  6239.      It indicated  that an  internal parsing  error has  occurred
  6240.  
  6241.  
  6242.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6243.        - Appendices.                         Page: 112 -
  6244.  
  6245.  
  6246.      during the assignment  of some quantity of  to another.   If
  6247.      you receive this error, then contact us.
  6248.  
  6249.      5.3.7  Can't have string for radio button parameter
  6250.  
  6251.      Only numeric variables are valid radio button LValues.  This
  6252.      error is  kept for  reasons  of compatibility  with  earlier
  6253.      versions of RExL.
  6254.  
  6255.      5.3.8  Stack underflow
  6256.  
  6257.      This error  should not  occur.   It  indicated that  one  of
  6258.      RExL's  internal  stacks  (numeric,  string  or  array)  has
  6259.      underflowed.  If you receive this error, then contact us.
  6260.  
  6261.      5.3.9  Stack overflow
  6262.  
  6263.      This error  should not  occur.   It  indicated that  one  of
  6264.      RExL's  internal  stacks  (numeric,  string  or  array)  has
  6265.      overflowed.  If you receive this error, then contact us.
  6266.  
  6267.      5.3.10  Numeric value out of range
  6268.  
  6269.      Certain mathematical functions require that their parameters
  6270.      be within certain ranges.   For example, the LOG()  function
  6271.      is only defined for values  greater than zero, and  attempts
  6272.      to find logiarithms  of numbers  less thanor  equal to  zero
  6273.      will generate this error.
  6274.  
  6275.      5.3.11  Rule stack overflow
  6276.  
  6277.      You have  tried  to  recurse beyond  the  maximum  limit  of
  6278.      recursion.   By default,  the limit  is 100  entries on  the
  6279.      stack, but it can be increased from within the editor  using
  6280.      the Options|Rule stack menu option  or by specifying the  -s
  6281.      option on the command line to the debugger.
  6282.  
  6283.      5.3.12  Invalid database file handle
  6284.  
  6285.      An operation  involving  database  file handles  has  failed
  6286.      because an  invalid file  handle was  passed.    This  error
  6287.      generally occurs in expressions using RExL's @variable.field
  6288.      construction, when  <variable>  does  not  contain  a  valid
  6289.      database file handle.
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6297.        - Appendices.                         Page: 113 -
  6298.  
  6299.  
  6300.      5.3.13  Unable to allocate rule stack
  6301.  
  6302.      The runtime and debugger module has been unable to  allocate
  6303.      enough memory to the runtime stack and consequently will not
  6304.      attempt to run the application.   Make sure that you're  not
  6305.      passing some over-large  value to the  module either on  the
  6306.      command line, with the -s option, or from within the  editor
  6307.      using the Options|Rule stack option.
  6308.  
  6309.      5.3.14  Math error : Parameter out of range in function XXX
  6310.  
  6311.      The function XXX has been passed a value which is out of the
  6312.      range for  which the  function is  defined.   The  functions
  6313.      which can  generate this  error  are SIN(),  COS(),  ACOS(),
  6314.      ASIN(), TAN(), ATAN(), LOG() and LOG10().
  6315.  
  6316.      5.3.15  Math error : Parameter singularity in function XXX
  6317.  
  6318.      Certain functions, while defined across certain ranges  have
  6319.      values within the range for which the return value generates
  6320.      a singularity.    For example,  the  TAN() function  is  not
  6321.      defined for PI/2  radians and an  attempt to calculate  this
  6322.      value would cause this error to be generated.
  6323.  
  6324.      5.3.16  Math error : numeric overflow
  6325.  
  6326.      You have tried to generate a result greater than the maximum
  6327.      value which RExL can cope with, about 2.7E308, absolute.
  6328.  
  6329.      5.3.17  Math error : numeric underflow
  6330.  
  6331.      This error indicates  that the result  of a calculation  has
  6332.      underflown and cannot  be represented accurately.  Generally
  6333.      speaking, a numeric underflow will return a zero value.
  6334.  
  6335.      5.3.18  Math error : precision loss
  6336.  
  6337.      This error indicates that a calculation has not been carried
  6338.      out to  a sufficient  degree of  accuracy.   This  generally
  6339.      occurs  when   evaluating  functions   close  to   parameter
  6340.      singularities.
  6341.  
  6342.  
  6343.      5.4  Critical Errors
  6344.  
  6345.  
  6346.      These errors occur  when some item  of hardware attached  to
  6347.      your PC does not appear to be functioning correctly.   These
  6348.  
  6349.  
  6350.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6351.        - Appendices.                         Page: 114 -
  6352.  
  6353.  
  6354.      errors are entirely  DOS generated  and RExL  itself can  do
  6355.      little to  rectify  them.   Like  the other  error  messages
  6356.      above, these are trappable using the ERok() function.  These
  6357.      errors are  listed in  increasing order  of obscurity,  with
  6358.      errors at the bottom of the list being the most unlikely  to
  6359.      occur.
  6360.  
  6361.      5.4.1  Write protect error
  6362.  
  6363.      An attempt has  been made to  write information  to a  write
  6364.      protected disk.   Remove  the   write  protect tab  and  try
  6365.      again.
  6366.  
  6367.      5.4.2  Drive not ready
  6368.  
  6369.      The disk drive accessed in the last operation was not ready.
  6370.      Make sure that the disk  is inserted correctly, is  properly
  6371.      formatted and can be read from the drive.
  6372.  
  6373.      5.4.3  Printer out of paper
  6374.  
  6375.      The printer  device  has  returned  an  error  code  to  DOS
  6376.      indicating  that  something  was  wrong  with  the  printer.
  6377.      Possible causes include no paper in the printer, the printer
  6378.      being turned off or off line or a paper jam.
  6379.  
  6380.      5.4.4  Write fault
  6381.  
  6382.      DOS has tried  to write to  some block  or character  device
  6383.      driver but  the driver  returned an  error code,  indicating
  6384.      that it was unable to  perform the operation.  When  applied
  6385.      to printers, it generally means that the printer has run out
  6386.      of paper or has been turned off during a print run.
  6387.  
  6388.      5.4.5  Read fault
  6389.  
  6390.      DOS has tried  to read from some  block or character  device
  6391.      driver but  the driver  returned an  error code,  indicating
  6392.      that it was unable to perform the operation.
  6393.  
  6394.      5.4.6  General Failure
  6395.  
  6396.      This is a  general purpose catch-all  error message,  saying
  6397.      that something went wrong, but DOS was unable to figure  out
  6398.      exactly what.   When applied  to disks,  it generally  means
  6399.      that the disk is not formatted or is not of the correct size
  6400.      for the disk drive.
  6401.  
  6402.  
  6403.  
  6404.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6405.        - Appendices.                         Page: 115 -
  6406.  
  6407.  
  6408.      5.4.7  Sector not found
  6409.  
  6410.      This error indicates that a sector on a  disk has been found
  6411.      to be invalid, probably caused by a corruption of some  type
  6412.      on the disk in question.
  6413.  
  6414.      5.4.8  Unknown unit
  6415.  
  6416.      A request has been made by DOS to some device which does not
  6417.      exist or has not responded.
  6418.  
  6419.      5.4.9  Unknown command
  6420.  
  6421.      An IOCTL request  has been made to  some block or  character
  6422.      device driver  but the  command was  not recognised  by  the
  6423.      driver.
  6424.  
  6425.      5.4.10  CRC error
  6426.  
  6427.      The cyclic redundancy  check on  disk reads  and writes  has
  6428.      failed, indicating a  faulty drive  or improperly  formatted
  6429.      disk.
  6430.  
  6431.      5.4.11  Bad request structure length
  6432.  
  6433.      An IOCTL request  has been made to  some block or  character
  6434.      device driver but  the format  of the  request structure  is
  6435.      incorrect.
  6436.  
  6437.      5.4.12  Seek error
  6438.  
  6439.      BIOS was unable to locate the disk sector requested in a DOS
  6440.      call.
  6441.  
  6442.      5.4.13  Unknown media type
  6443.  
  6444.      The disk which has just been accessed does not have a  valid
  6445.      media identifier.  This is usually caused by using Unix (and
  6446.      other system) formatted floppy disks.
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6459.        - Appendices.                         Page: 116 -
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6513.        - Appendices.                         Page: 117 -
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.                               Chapter 6
  6523.  
  6524.                            Extra Utilities
  6525.  
  6526.  
  6527.      This appendix documents  the extra  utilities supplied  with
  6528.      RExL which  are  only  available  in  the  fully  registered
  6529.      version.
  6530.  
  6531.  
  6532.      6.1  RExLPC
  6533.  
  6534.  
  6535.      RExLPC is a  utility which will  combine a RExL  application
  6536.      image file, its  associated screen file  and a special  stub
  6537.      file into a single standalone executable file, suitable  for
  6538.      distribution.  It  is provided  as a  neater alternative  to
  6539.      RExLRT, described  further on  in this  chapter.  Typically,
  6540.      RExLRT is  used  to  distribute applications  which  can  be
  6541.      modified  by   the   end-user,   or  may   require   on-site
  6542.      modification by the  developer.  On  the other hand,  RExLPC
  6543.      can be  used  to provide  a  single, faster  DOS  executable
  6544.      application which  cannot  be  decompiled.  Backups  of  the
  6545.      original versions of  the application must  be kept if  they
  6546.      may need to be modified at a later date
  6547.  
  6548.      As a  rough guide  to performance  gains, RExL  applications
  6549.      converted with  RExLPC will  run code  approximately two  to
  6550.      four times as fast as REXLRD and REXLRT will.  Corresponding
  6551.      C programs will  run about  half as  fast to  twice as  fast
  6552.      again.   For database  operations, the  speed gain  will  be
  6553.      small because most time is  spent within the database  code,
  6554.      which is common both the stub and the other executables.
  6555.  
  6556.      RExLPC takes two parameters on  the command line, the  first
  6557.      specifies the RExL application  file to be converted,  while
  6558.      the second parameter specifies the DOS executable file to be
  6559.      created.  The base stub file REXLSTUB.COD must be accessible
  6560.      either through the REXL environment  variable or on the  DOS
  6561.      PATH.   While  the postfix  compiler  is running,  it  posts
  6562.      progress reports on the screen, to keep you informed of  how
  6563.      far it  has  got.    When the  compiler  finishes,  it  will
  6564.  
  6565.  
  6566.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6567.        - Appendices.                         Page: 118 -
  6568.  
  6569.  
  6570.      generate an  executable  file  as specified  by  the  second
  6571.      command line parameter.  If an executable file of this  name
  6572.      exists already, then  it will  be overwritten.  Applications
  6573.      should be fully working and debugged when passed through the
  6574.      compiler.
  6575.  
  6576.      The resulting executable file can be copied, distributed and
  6577.      run like any other DOS executable.
  6578.  
  6579.      The process involved in conversion is as follows.   Firstly,
  6580.      the screen file and application images are loaded as  normal
  6581.      and  the  stub  file  is  copied  to  the  specified  output
  6582.      executable file.  Then the postfix compiler module  postfix-
  6583.      compiles the application and  appends the generated code  to
  6584.      the stub file.  Finally, the screen file is postfix compiled
  6585.      and then appended  to the  stub.   The resulting  executable
  6586.      file can be copied, distributed  and run like any other  DOS
  6587.      executable and does not require any of the files (which were
  6588.      required to build it) to be present when the program is run.
  6589.      As with  all other  RExL executable  files, you  should  not
  6590.      attempt to  compress  the  file  with  compressors  such  as
  6591.      PKLite, DIET, LZexe and such  like because of the nature  of
  6592.      the files.
  6593.  
  6594.      Finally, a minor point of incompatibility with RExL:  RExLPC
  6595.      does not supports the LOAD() function as it exists in  RExL,
  6596.      because of the different .RXL and .EXE internal formats.  In
  6597.      the compiled version, the LOAD()  function will look for  an
  6598.      executable file of  the same name  as the application  image
  6599.      and load and  execute that instead.   This  seems to be  the
  6600.      most acceptable  solution  and  will work  transparently  if
  6601.      multiple  applications   are   converted   and   distributed
  6602.      together.  If  this is  not satisfactory,  then the  OScmd()
  6603.      function can be  used to run  the runtime  (or the  runtime-
  6604.      debugger module), passing it the name of the application  to
  6605.      run.
  6606.  
  6607.      For example,  the  command  LOAD("TEST")  which,  in  normal
  6608.      circumstances  would   load   an  application   image   file
  6609.      "TEST.RXL", would be interpreted by RExLPC as a call to load
  6610.      and  run  the   file  "TEST.EXE",   overlaying  the   caller
  6611.      application (unlike a call to OScmd(), where the application
  6612.      regains  control  when   the  called  program   terminates).
  6613.      Alternatively, the command OScmd() could be used to run  the
  6614.      application using a call such as: OScmd("rexlrt test").
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6621.        - Appendices.                         Page: 119 -
  6622.  
  6623.  
  6624.      6.2  RDU
  6625.  
  6626.  
  6627.      6.2.1  Introduction
  6628.  
  6629.      RDU, the  RExL Database  Utility, is  a standalone  database
  6630.      manager which can  be used to  manage dBase III+  compatible
  6631.      files.  It can create  and modify database structures,  edit
  6632.      and browse database files and create and maintain dBase III+
  6633.      index files.
  6634.  
  6635.      RDU is quite simple  to operate and is  based upon the  same
  6636.      interface as other RExL programming tools.
  6637.  
  6638.      6.2.2  Loading and Running
  6639.  
  6640.      RDU is loaded  by typing  RDU at  the DOS  prompt and  needs
  6641.      about 180k  of  DOS memory  to  run.   To  start work  on  a
  6642.      database file  immediately, rather  than having  to use  the
  6643.      menu system to load one, you can simply pass the name of the
  6644.      database on  the command  line.   For example,  to load  and
  6645.      start work on a database named "CUSTOMER.DBF", issue the DOS
  6646.      command `RDU customer'.  The default and necessary extension
  6647.      of ".DBF" will  be automatically  appended for  you, so  you
  6648.      don't need to specify it.
  6649.  
  6650.      When RDU  has  loaded, you'll  be  presented with  the  main
  6651.      screen which is similar to RExL's editor.
  6652.  
  6653.      There are five  pull down  menus in  RDU which  are used  to
  6654.      control the program.   The next  five sections will  explain
  6655.      each menu.
  6656.  
  6657.      6.2.3  RDU menu system
  6658.  
  6659.      6.2.3.1  File Menu
  6660.  
  6661.      There are seven  options in this menu,  based upon those  in
  6662.      the File Menu of RExL's editor.  The options are as follows:
  6663.  
  6664.          o  Use File: When selected, this option pops up a dialog
  6665.             box prompting for a database  file to open.  You  can
  6666.             either  enter  a  database  name  directly  or  press
  6667.             <Enter> and select from a list.  When a database file
  6668.             has been selected,  it can be  edited using the  Edit
  6669.             menu.
  6670.  
  6671.  
  6672.  
  6673.  
  6674.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6675.        - Appendices.                         Page: 120 -
  6676.  
  6677.  
  6678.          o  Use Index:  When  a  database  has  been  opened  and
  6679.             selected, an index file can  be opened, to order  the
  6680.             contents of the  database. When this  menu option  is
  6681.             selected, a file name  dialog box appears,  prompting
  6682.             for an index  file to  open.   As with  the Use  File
  6683.             option, an  index name  can be  entered directly  or,
  6684.             upon pressing <Enter>, an  index file can be  selcted
  6685.             from a list. If there is no database open, then  this
  6686.             option cannot be used.
  6687.  
  6688.          o  Remove: This choice allows you to delete a file  from
  6689.             disk. You may need to do  this is you want to save  a
  6690.             file on disk, but are unable to do so through a  lack
  6691.             of disk space.
  6692.  
  6693.          o  Change Dir: This option will allow you to change  the
  6694.             active directory.  The format  used here is much  the
  6695.             same as that used in the file name input routine, the
  6696.             only  differences  being  that  no  file  names   are
  6697.             displayed in  the list  and that  the current  active
  6698.             path  (drive  name  with  full  directory)  will   be
  6699.             displayed on the  status line  at the  bottom of  the
  6700.             screen.
  6701.  
  6702.          o  Default Drive:  When this  option is  chosen, a  menu
  6703.             will pop up displaying the list of available DOS disk
  6704.             drives. As with  the directory  selection above,  the
  6705.             current  active  path  is  displayed  on  the  status
  6706.             display line at the bottom of the screen.
  6707.  
  6708.          o  OS Shell: If you  want to run a  DOS command, but  do
  6709.             not wish to  exit from RDU  permanently, choose  this
  6710.             option to go into a  DOS shell. While you are in  the
  6711.             shell, you should not,  under any circumstances,  run
  6712.             any T$SR programs (such  as Sidekick, ScrGrab and  so
  6713.             forth), since these programs change critical area  of
  6714.             the computer's  memory which  may cause  it to  crash
  6715.             unpredictably when you  return to RDU.  When you  are
  6716.             finished in the shell, type `exit' at the DOS  prompt
  6717.             to return.
  6718.  
  6719.          o  Quit: This option terminates  RDU and returns you  to
  6720.             DOS permanently.  Since any  work done is written  to
  6721.             the database immediately, there is no `File has  been
  6722.             changed' type prompt  generated when  this option  is
  6723.             selected.
  6724.  
  6725.  
  6726.  
  6727.  
  6728.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6729.        - Appendices.                         Page: 121 -
  6730.  
  6731.  
  6732.      6.2.4  Edit Menu
  6733.  
  6734.      This six  option menu  is used  to control  the editing  and
  6735.      deletion of  information  in  the  database  file  currently
  6736.      selceted.   If there  is no  database  file open,  then  the
  6737.      options in this menu may not be used.
  6738.  
  6739.      The first  two  options,  edit  and  browse,  are  used  for
  6740.      changing and viewing information in the current database and
  6741.      are both `variations on a theme'.  In either of these modes,
  6742.      the fields in  the database are displayed  on the left  hand
  6743.      side of  the  screen and  the  contents  of the  fields  are
  6744.      displayed to the right of the field names.
  6745.  
  6746.      The <PgUp> and <PgDn> keys are used to move to the next  and
  6747.      previous records respectively,  while <Ctrl-PgUp> moves  the
  6748.      record pointer to  the top of  the database and  <Ctrl-PgDn>
  6749.      moves it to the last record.
  6750.  
  6751.      If there are more fields in the database than can be  fitted
  6752.      on the screen, then <Ctrl-Home> moves the first field in the
  6753.      database to the  top of the  screen, while <Ctrl-End>  moves
  6754.      the last field to the bottom line of the screen.
  6755.  
  6756.      In browse mode, it is  not possible to edit the contents  of
  6757.      the database  and  there  is therefore  no  cursor  visible.
  6758.      Pressing <Up> and <Down>  will move increment and  decrement
  6759.      the top field on the  screen, if there are more fields  than
  6760.      can be fitted, otherwise the  keys have no effect in  browse
  6761.      mode.
  6762.  
  6763.      In edit mode, <Up> and <Down> move to the previous and  next
  6764.      fields in the database, scrolling the field list, if needed.
  6765.      <Tab> and <Shift-Tab>  perform the same  action as <Up>  and
  6766.      <Down>.  If <Down> or <Enter> is pressed on the final  field
  6767.      in the  record, when  the record  pointer  is at  the  final
  6768.      record in the database, then the prompt Append records? will
  6769.      appear.  If the Yes  option is selected, then a record  will
  6770.      be appended to  the database and  editing will proceed  from
  6771.      the new record. If the no option is selected, then no record
  6772.      will be added.
  6773.  
  6774.      When editing date fields, the date entered will be displayed
  6775.      and must be entered in the format appropriate to the country
  6776.      set up on your machine.  If a valid date is entered, then it
  6777.      will be silently  converted to a dBase  date and written  to
  6778.      the database  file.   RDU will  not  allow you  to enter  an
  6779.      invalid date.
  6780.  
  6781.  
  6782.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6783.        - Appendices.                         Page: 122 -
  6784.  
  6785.  
  6786.      Logical fields are one character wide and treat values of Y,
  6787.      y, T and t as true and all other characters as false.   True
  6788.      values are  stored  as  Y  and false  values  as  N  in  the
  6789.      database.
  6790.  
  6791.      Character fields may be from  1 to 255 characters wide.   If
  6792.      the field width of the field being edited is greater than 67
  6793.      characters, then a small arrow will be displayed before  the
  6794.      start of  the edit  area.   The arrow  can be  one of  three
  6795.      characters, depending on  whether the edit  area extends  to
  6796.      the  left  of  the  currently  displayed  area  (uses  ASCII
  6797.      character 27), whether it extends on both sides (uses  ASCII
  6798.      character 29), or whether it extends to the left (uses ascii
  6799.      character 26).
  6800.  
  6801.      Any changes made  to the database  file are  written to  the
  6802.      file immediately.
  6803.  
  6804.      The six options in the Edit menu are as follows:
  6805.  
  6806.          o  Edit record:  Enters  RDU's record editing  facility,
  6807.             as described above.
  6808.  
  6809.          o  Browse record: Enters RDU's record display  facility,
  6810.             as described  above.  The  contents of  the  database
  6811.             cannot be changed when using this mode.
  6812.  
  6813.          o  Delete record:  This option will set the delete  flag
  6814.             of the  current  record.    Because  this  option  is
  6815.             relatively common, the <Alt-D> keystroke can be  used
  6816.             to toggle  this flag.   Note  that when  a record  is
  6817.             marked for  deletion, it  is not  physically  removed
  6818.             from the database.
  6819.  
  6820.          o  Recall deleted record:  This option clears the delete
  6821.             flag for the current record in the current  database.
  6822.             <Alt-D> can be  used to clear  the delete  flag on  a
  6823.             record, if it has been set.
  6824.  
  6825.          o  Pack database:  All records marked for deletion in  a
  6826.             database will be  removed when it  is packed.   After
  6827.             this operation, the records  cannot be recalled  from
  6828.             deletion using the Recall menu option.
  6829.  
  6830.          o  Zap database:  This  menu option permanently  removes
  6831.             all records  in  a  database. As  with  packing,  the
  6832.             records cannot be retrieved afterward.
  6833.  
  6834.  
  6835.  
  6836.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6837.        - Appendices.                         Page: 123 -
  6838.  
  6839.  
  6840.      6.2.5  Search Menu
  6841.  
  6842.      The search  menu  is used  for  searching for  and  locating
  6843.      information in database files.   There are three options  in
  6844.      this menu:
  6845.  
  6846.          o  Locate string: This option is  used to search for  an
  6847.             occurrence of a string within a field in the  current
  6848.             database.
  6849.  
  6850.             When the  option  is  chosen,  a  menu  will  pop  up
  6851.             containing the names of all the fields in the current
  6852.             database.  The  field selected here  will be the  one
  6853.             searched in during the  searching operation.  Once  a
  6854.             field has  been selected,  a dialog  box will  appear
  6855.             prompting for a string to  locate.  The dialog  input
  6856.             area will be as wide as the field being searched in.
  6857.  
  6858.             When a  search string  has been  entered, the  record
  6859.             pointer will  be reset  to the  top of  the file  and
  6860.             searching will  begin  from there.    If a  match  is
  6861.             found, then the matching record will be displayed and
  6862.             a prompt box will  appear, asking whether the  search
  6863.             should continue  from that  location to  try to  find
  6864.             another occurrence of the string.
  6865.  
  6866.             The record counter in the bottom right of the  screen
  6867.             is constantly updated during  the search to keep  you
  6868.             informed of its progress.
  6869.  
  6870.          o  Seek string: This  option is used to  seek for a  key
  6871.             string in an index file.  When selected, a dialog box
  6872.             appears, prompting for a string to seek for.
  6873.  
  6874.             If the seek  is successful, then  the record  pointer
  6875.             wil be  placed at  the  record whose  key  expression
  6876.             matches that entered.  If it is unsuccessful, then an
  6877.             error message will be displayed.
  6878.  
  6879.             Since records are in index  order when an index  file
  6880.             is open, you  will not  be prompted  to continue  the
  6881.             seek when it has successfully found something.
  6882.  
  6883.          o  Go to record:  This  option will prompt for a  record
  6884.             number to jump to.  If the record number specified is
  6885.             less than 1 or greater than the number of records  in
  6886.             the  database,  then   no  action   will  be   taken.
  6887.             Otherwise, the  record pointer  will  be set  to  the
  6888.  
  6889.  
  6890.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6891.        - Appendices.                         Page: 124 -
  6892.  
  6893.  
  6894.             specified record number.   The record  number is  not
  6895.             dependant on any index files open.
  6896.  
  6897.      6.2.6  Utilities Menu
  6898.  
  6899.      This menu has six options as follows:
  6900.  
  6901.          o  Create  database:  This  option  is  used  to  create
  6902.             database structures.  When  it  is  first  chosen,  a
  6903.             dialog box appears prompting for a file name to  call
  6904.             the structure which is about to be created.  When one
  6905.             has  been  entered  the  creation  of  the  structure
  6906.             begins.
  6907.  
  6908.          o  The structure creation  box has four  columns in  it.
  6909.             The first is  for field names,  the second for  field
  6910.             types, the  third  for  field widths  and  the  final
  6911.             column for field decimal places.
  6912.  
  6913.          o  For logical and date fields, the field width is fixed
  6914.             at one  and eight  characters respectively,  with  no
  6915.             decimal places.  The dialog will not allow figures to
  6916.             be entered in  the final  two columns  for these  two
  6917.             field types.  Similarly, it is not possible to  enter
  6918.             decimal field widths for character fields.   RDU will
  6919.             not allow duplicate field names  to exist in a  file,
  6920.             displaying an error if this is attempted.
  6921.  
  6922.          o  The keystrokes used are as follows:
  6923.  
  6924.                   Table 6.1: Keystrokes in structure create
  6925.  
  6926.             <Shift-Tab>    Go to previous input area in field
  6927.              <Tab>         Go to next input area in field
  6928.              <Enter>       Go to next input area, creating field
  6929.                            if already on last input area
  6930.              <Up>          Go to same input area in field above
  6931.              <Down>        Go to same input area in field below
  6932.              <Alt-D>       Delete field definition
  6933.  
  6934.          o  The field type  can be toggled  by pressing  <Space>.
  6935.             Alternatively, pressing  the field  type letter  will
  6936.             set the type:  `C' for character fields, `D' for date
  6937.             fields, `N' for  numeric fields and  `L' for  logical
  6938.             fields.
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6945.        - Appendices.                         Page: 125 -
  6946.  
  6947.  
  6948.          o  When the field definitions have been created, move to
  6949.             the final field in the structure and press <Enter> to
  6950.             create the strucure on disk.
  6951.  
  6952.          o  Once the  structure has  been created,  the  File/Use
  6953.             database menu options can be used to open and  select
  6954.             the file just created.
  6955.  
  6956.          o  Modify structure  This choice operates in exactly the
  6957.             same way as the previous option for creating database
  6958.             files.  The structure of the current database will be
  6959.             placed in the database creation  box where it can  be
  6960.             modified using the same keystrokes as before.
  6961.  
  6962.          o  If the type of a  field is changed, then RDU will  do
  6963.             its best to preserve the  contents of the field.   In
  6964.             particular, date fields  converted to numeric  fields
  6965.             will  have  their  contents  changed  to  Julian  day
  6966.             numbers, used elsewhere in RExL, while numeric fields
  6967.             (changed to  date fields)  will  be assumed  to  hold
  6968.             Julian day numbers and processed accordingly.
  6969.  
  6970.          o  If the  width  of  any field  is  reduced,  then  the
  6971.             contents will be  truncated to  fit.   If numbers  in
  6972.             numeric fields  no  longer  fit, then  they  will  be
  6973.             replaced with asterisks.
  6974.  
  6975.          o  When the desired changes have been made to the  file,
  6976.             press <Enter> on  the empty field at  the end of  the
  6977.             list to make the changes permanent.
  6978.  
  6979.          o  Create index: This choice is used to create an  index
  6980.             file for the database which is currently open.   When
  6981.             this menu option is selected, you will be prompted to
  6982.             enter an index key expression, which may contain  any
  6983.             of the dBase III functions supported in RExL and  the
  6984.             fields in  the  current  database.    As  an  aid-de-
  6985.             memoire, <F10> lists the fields in the database while
  6986.             <Ctrl-F> can be used to list the functions  available
  6987.             to you.  If the expression entered is not valid, then
  6988.             an error will be generated.
  6989.  
  6990.          o  When a syntactically valid  index key expression  has
  6991.             been entered, you  will be  prompted for  a DOS  file
  6992.             name to save the index file under. If one is entered,
  6993.             then index generation will proceed.
  6994.  
  6995.  
  6996.  
  6997.  
  6998.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  6999.        - Appendices.                         Page: 126 -
  7000.  
  7001.  
  7002.          o  While the index file is being generated, its progress
  7003.             will be displayed in a progress box in the center  of
  7004.             the  screen.    Because   of  the  method  used   for
  7005.             generation of index files, sorting may be slow if the
  7006.             file is already in order, however, if the file is not
  7007.             sorted,  then  the  index  will  be  generated   very
  7008.             rapidly.
  7009.  
  7010.          o  Reindex:   This option  will reindex  an index  file.
  7011.             This operation  may  need  to be  carried  out  if  a
  7012.             database file has been modified while its  associated
  7013.             index file was closed.  If there is no database  file
  7014.             or index  file open,  then  this option  performs  no
  7015.             action.
  7016.  
  7017.          o  Statistics:   This option  displays statistics  about
  7018.             the database  and index  files currently  open.   The
  7019.             first line displays the name of the current database,
  7020.             the second  displays the  name of  the current  index
  7021.             file, if one is open.
  7022.  
  7023.          o  The third and fourth lines show the number of  fields
  7024.             and records, respectively, in the database. The fifth
  7025.             line displays  the date  of the  last update  to  the
  7026.             database file, while the final line shows the size of
  7027.             the database header record.
  7028.  
  7029.          o  Field list:  This  option  lists the  fields  in  the
  7030.             current database. The display  format is exactly  the
  7031.             same as  in the  database create  option above,  with
  7032.             field names in the first column, types in the second,
  7033.             widths in the third and decimal places in the fourth.
  7034.  
  7035.      6.2.7  Options Menu
  7036.  
  7037.      This menu is fundamentally the  same as that in the  editor.
  7038.      It has five options as follows:
  7039.  
  7040.          o  Load macros:  Any macro definitions you define may be
  7041.             saved to  disk for  later retrieval  using this  menu
  7042.             option. The macro file format is constant across  the
  7043.             RExL product  range, so  that macros  defined in  the
  7044.             editor may be used in the debugger or in the database
  7045.             manager and  so on.   Macros  are explained  in  more
  7046.             detail at the start of the chapter on the editor.
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7053.        - Appendices.                         Page: 127 -
  7054.  
  7055.  
  7056.          o  Save macros:  This option  allows you to save  macros
  7057.             which can then be reloaded at some future time  using
  7058.             the load option above.
  7059.  
  7060.          o  Beep  off:    By  default,  RExL  beeps  whenever  it
  7061.             encounters an error. This  beeping can be toggled  on
  7062.             and off by selecting this option.
  7063.  
  7064.          o  Exploding windows In its normal state, all windows in
  7065.             RExL open  instantaneously  upon  activation.    This
  7066.             option can be  used to  make windows  `grow' to  full
  7067.             size on the screen.  This is only a visual effect and
  7068.             has no effect upon the application.
  7069.  
  7070.          o  Case sensitivity:  By  default, all database  indexes
  7071.             and searches are  carried out  with case  sensitivity
  7072.             on, to follow the dBase convention.  However, this is
  7073.             contrary to  the case-insensitivity  in the  rest  of
  7074.             RExL.  If dBase  compatibility is not required,  then
  7075.             the case sensitivity  may be turned  off.  Note  that
  7076.             the  case-sensitivity   feature  only   affects   the
  7077.             generation of index files.
  7078.  
  7079.  
  7080.      6.3  RExLRD
  7081.  
  7082.  
  7083.      RExLRD is the combined runtime  and debugger module for  the
  7084.      RExL programming  environment and  is called  by the  editor
  7085.      whenever the application is run.  RExLRD uses the  following
  7086.      command line syntax:
  7087.  
  7088.                  RExLRD [-d] [-k] [-e] <filename.rxl>
  7089.  
  7090.      The options are used as follows:
  7091.  
  7092.          o  -d:
  7093.             The `d' parameter will cause the debugger to start up
  7094.             in debug mode,  as if  the user  had pressed  <Alt-D>
  7095.             during loading of  the application.   This switch  is
  7096.             passed  invisibly  by  the  editor  to  the  debugger
  7097.             whenever  the  debugger  is  called  via  the   Debug
  7098.             application option in the Run menu in the editor.
  7099.  
  7100.          o  -e:
  7101.             The `e' option will return control to the editor when
  7102.             the debugger terminates.   Whenever the editor  calls
  7103.             the debugger, this option  is silently passed to  the
  7104.  
  7105.  
  7106.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7107.        - Appendices.                         Page: 128 -
  7108.  
  7109.  
  7110.             debugger, so  that the  debugger will  return to  the
  7111.             editor when it terminates.
  7112.  
  7113.          o  -k:
  7114.             This `k' option  is used to  tell the runtime  module
  7115.             not to watch  out for the  two keystrokes of  <Alt-D>
  7116.             and <Esc>,  which  are normally  monitored.  (<Alt-D>
  7117.             will interrupt the run module and relinquish  control
  7118.             to the  debugger  while  pressing  <Esc>  twice  will
  7119.             terminate the application.)
  7120.  
  7121.          o  -l:
  7122.             This `l' option  is used to  tell the runtime  module
  7123.             that it is  running on an  LCD display.   If you  are
  7124.             running the  debugger  from  the  editor,  then  this
  7125.             option will be passed  automatically, but if you  are
  7126.             running it from the DOS  command line, then you  need
  7127.             to include it specifically.
  7128.  
  7129.          o  -s:
  7130.             This `s'  option  is used  to  set  the size  of  the
  7131.             runtime  stack  to   be  used   when  executing   the
  7132.             application.   Be  default  the  size  is  100  stack
  7133.             entries, but if your application uses recursion  then
  7134.             this value should be increased.  If you need as  much
  7135.             memory as posible,  then this value  may be  reduced:
  7136.             Each stack entry  requires eight  bytes of  permanent
  7137.             storage.  The required stack size is placed after the
  7138.             `s'.  For example, to set a stack size of 30 entries,
  7139.             the command line option `-s30' should be passed.
  7140.  
  7141.  
  7142.      6.4  RExLRT
  7143.  
  7144.  
  7145.      RExLRT  is  the  runtime  module  of  the  RExL  programming
  7146.      environment.  If it used for running the systems written  in
  7147.      RExL. It  is  about  one-third  smaller  than  the  combined
  7148.      runtime-debugger module and it  runs applications about  10%
  7149.      to 15%  faster.  The  command  line  syntax  for  RExLRT  is
  7150.      identical to that for the debugger, with the only difference
  7151.      being that <Alt-D>  does not pass  control to the  debugger,
  7152.      since there is none.
  7153.  
  7154.      RExLRT  is  used  in  preference  to  the  executable   file
  7155.      generator, RExLPC described earlier, when it is necessary to
  7156.      have  separate  application  image,  screen  and  executable
  7157.      files.   Typically,  this  program  is  used  to  distribute
  7158.  
  7159.  
  7160.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7161.        - Appendices.                         Page: 129 -
  7162.  
  7163.  
  7164.      unfinished   applications   which   may   require    on-site
  7165.      modifications.
  7166.  
  7167.      Note also, that  REXLRT supports the  LOAD() function  call,
  7168.      whereas RExLPC does not,  because of the differing  internal
  7169.      formats.
  7170.  
  7171.  
  7172.      6.5  ScrList
  7173.  
  7174.  
  7175.      ScrList lists the contents of  screen files and outputs  the
  7176.      contents to the standard output device, usually the monitor.
  7177.      The format of the output file listing is as follows:
  7178.  
  7179.      The block  number  of every  block  in  the screen  file  is
  7180.      printed first,  immediately followed  by a  colon.   If  the
  7181.      block is in use  as a screen, then  the screen name will  be
  7182.      printed surrounded by quotes.   If the block is not in  use,
  7183.      then the message (Block is not used) will be displayed.
  7184.  
  7185.      The next line displays the position and size of the block in
  7186.      the screen  file in  the format  [x,y]->[x+w,y+h] where  the
  7187.      screen was originally saved from position (x,y) with a block
  7188.      width and  height of  w and  h respectively.  The number  of
  7189.      fields defined in the block follows next.
  7190.  
  7191.      The rest of the line is concerned with internal information:
  7192.      bsz is the size of the  current block, ofs is the offset  of
  7193.      the block within the  screen file while fsz  is the size  of
  7194.      the block used up by the screen, the difference between  bsz
  7195.      and fsz being unused.  As an integrity check, the sum of the
  7196.      current block's offset and block size should equal the  next
  7197.      blocks offset.
  7198.  
  7199.      The remaining lines  in a screen's  list display the  fields
  7200.      defined in the screen.   Firstly, the type  of the field  is
  7201.      listed, followed by a colon and the position and  dimensions
  7202.      of the  field,  in the  format  of  (x,y) [w,h],  where  the
  7203.      symbols have their usual meanings.
  7204.  
  7205.      If the field is a menu field, then ScrList will move to  the
  7206.      next  field   immediately.     Otherwise,   the   expression
  7207.      associated with the field  is displayed, enclosed in  square
  7208.      brackets.  Note that since  the screen file itself  contains
  7209.      no variable  name information,  the  names of  variables  in
  7210.      expressions cannot  be  determined  and they  are  therefore
  7211.      displayed  as   variable  reference   numbers,   immediately
  7212.  
  7213.  
  7214.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7215.        - Appendices.                         Page: 130 -
  7216.  
  7217.  
  7218.      preceded by a hash  # symbol.  If  you require a listing  of
  7219.      the  expressions  attached  to   all  the  fields  in   your
  7220.      application, then use the `Import/Save ASCII' option in  the
  7221.      editor.  If the field  is a toggle list, then the  different
  7222.      options in  the  list will  be  displayed on  the  following
  7223.      lines, again enclosed in square brackets.
  7224.  
  7225.      The following is  an extract from a  typical example of  the
  7226.      output from ScrList showing all the salient features:
  7227.  
  7228.      6:"Is Data ok?"
  7229.       [28,11]- [51,17] -   3  fields    (fsz:  221,  ofs:   2395,
  7230.      bsz:221)
  7231.           Menu  : (24, 4) [21x 1] : [#1]
  7232.           MArea : (35,14) [ 7x 1]
  7233.           MArea : (35,15) [ 7x 1]
  7234.      7:"Enter Names and Question 1"
  7235.       [ 0, 0]- [79,24] -  7 fields  (fsz:  901, ofs:  2616,  bsz:
  7236.      901)
  7237.           Input : (24, 4) [21x 1] : [#2]
  7238.           Input : (24, 5) [ 9x 1] : [#3]
  7239.           Toggle: (24, 6) [15x 1] : [#4]
  7240.                [Civil Eng]
  7241.                [Science]
  7242.                [Electrical]
  7243.                [Mechanical]
  7244.                [Agriculture]
  7245.           Input : (24, 7) [11x 1] : [#5]
  7246.           Input : (18,13) [ 1x 1] : [#0[1,1]]
  7247.           Check : (18,14) [ 3x 1] : [#6]
  7248.           Radio : (18,15) [ 3x 4] : [#7]
  7249.  
  7250.  
  7251.      6.6  ScrGrab
  7252.  
  7253.  
  7254.      ScrGrab is a  terminate and stay  resident utility which  is
  7255.      used to grab text screens from the monitor and to place  the
  7256.      contents in files compatible with RExL's ".SCR" format.  The
  7257.      ScrAdd utility can be used to combine screen files together.
  7258.      Typical applications of ScrGrab and ScrAdd are demonstration
  7259.      programs like that supplied with RExL, bug reports  supplied
  7260.      with screen dumps and so on.
  7261.  
  7262.      When loaded in  memory, ScrGrab  uses about  2,500 bytes  of
  7263.      memory.   When it  is  no longer  required,  it and  can  be
  7264.      unloaded from memory from the command line.
  7265.  
  7266.  
  7267.  
  7268.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7269.        - Appendices.                         Page: 131 -
  7270.  
  7271.  
  7272.      The  command  line  arguments  which  ScrGrab  uses  are  as
  7273.      follows:
  7274.  
  7275.             -h and -? Show command line help
  7276.  
  7277.             -u        Unload  from  memory.    If  further   T&SR
  7278.             programs have  been  loaded  since ScrGrab,  then  it
  7279.             cannot be unloaded since  doing so would corrupt  DOS
  7280.             and most likely crash the machine.
  7281.  
  7282.             -k....:   This  option  is   used  to   set  up   the
  7283.             keystroke,  by  default  <Alt-G>,  which  will  cause
  7284.             ScrGrab to save a screen to disk.  Unless you have  a
  7285.             keyboard scan  code table,  you'll need  to used  the
  7286.             KbdScan utility to determine the exact four character
  7287.             keyboard scan  code to  supply here.   Refer  to  the
  7288.             section on Scan for more information.
  7289.  
  7290.             -d:       Requests  ScrGrab  to  report  the  current
  7291.             defaults which it is using. The first line gives  the
  7292.             activating scan code, in a format compatible with the
  7293.             output from KbdScan while the next line gives the DOS
  7294.             paragraph  where  the  program   is  loaded.     This
  7295.             information is purely  technical and is  not of  much
  7296.             use.
  7297.  
  7298.      You  should  not  run  any  T&SR  programs  from  within  an
  7299.      operating system shell, such as when the `File/OS shell'  is
  7300.      selected from the editor, since T&SR's perform surgery  upon
  7301.      DOS  which  will  cause  it   to  crash  if  the  shell   is
  7302.      subsequently terminated using the DOS exit command.
  7303.  
  7304.  
  7305.      6.7  ScrXtrct
  7306.  
  7307.  
  7308.      ScrXtrct is a utility which  can extract and place a  screen
  7309.      from one screen file into another screen file.  The  general
  7310.      command line format of this command are:
  7311.  
  7312.                    ScrXtrct OldScr ScreenNo NewScr
  7313.  
  7314.      where OldScr is  the screen  file from  which screen  number
  7315.      ScreenNo will be extracted and placed into the NewScr screen
  7316.      file, erasing NewScr if it already exists.  Unlike the  rest
  7317.      of RExL,  ScreenNo  is  one-based, meaning  that  the  first
  7318.      screen is  number 1,  the second  number 2  and so  on.   If
  7319.      OldScr contains a number of screens and you are not sure  of
  7320.  
  7321.  
  7322.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7323.        - Appendices.                         Page: 132 -
  7324.  
  7325.  
  7326.      the reference number  of the screen you  want, then you  can
  7327.      use the ScrList utility to list them along with their screen
  7328.      numbers.
  7329.  
  7330.  
  7331.      6.8  ScrAdd
  7332.  
  7333.  
  7334.      ScrAdd is a  utility which can  extract and  place a  screen
  7335.      from one screen file into another screen file.  The  general
  7336.      command line format of this command are:
  7337.  
  7338.                     ScrAdd OldScr ScreenNo NewScr
  7339.  
  7340.      where OldScr is  the screen  file from  which screen  number
  7341.      ScreenNo will be extracted and placed into the NewScr screen
  7342.      file.  Note that, as  with ScrXtrct, ScreenNo is  one-based.
  7343.      If OldScr contains a number of screens, then you can use the
  7344.      ScrList  utility  to  list  them  along  with  their  screen
  7345.      numbers.
  7346.  
  7347.      If the name of the screen specified clashes with one in  the
  7348.      new screen file,  then you will  be promted  to enter a  new
  7349.      name for the screen being added.
  7350.  
  7351.      ScrAdd does not perform  any of the optimization  operations
  7352.      carried out in  the editor upon screen  files when they  are
  7353.      being modified.   Instead, it simply  appends the screen  to
  7354.      NewScr.
  7355.  
  7356.      ScrAdd is  generally used  in combination  with ScrGrab  and
  7357.      ScrXtrct to move screens from one screen file to the next.
  7358.  
  7359.  
  7360.      6.9  MI
  7361.  
  7362.  
  7363.      MI,  short  for   memory  information,  displays   pertinent
  7364.      information about the state of DOS and the programs resident
  7365.      in your  PC.   The following  is  a typical  display of  the
  7366.      output from MI:
  7367.  
  7368.  
  7369.      MI  Version 2.1  Copyright (c) 1992, The Software Loft
  7370.      -------- -------- ------------ --------------
  7371.      PSP addr Size     Owner        Hooked vectors
  7372.      -------- -------- ------------ --------------
  7373.      0008     24,048   [  Dos  ]
  7374.  
  7375.  
  7376.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7377.        - Appendices.                         Page: 133 -
  7378.  
  7379.  
  7380.      084E     2,368    [ Shell ]    22 23 24 2E EF
  7381.               64       [ Free  ]
  7382.      084E     752      [ Shell ]
  7383.      0AA6     128      [  Dos  ]
  7384.      0921     6,208    edos.com     2F
  7385.      0AA6     2,592    edos.com
  7386.      0B54     2,320    scrgrab.com  09 16 21 28
  7387.      0BE7     606,768  [ Free  ]
  7388.      ------------  ----------------------  ----------------------
  7389.      Memory        Total bytes             Available bytes
  7390.      ------------  ----------------------  ----------------------
  7391.      Conventional  655,360     (640k)      606,592     (592k)
  7392.      Expanded      EMS not responding
  7393.      Extended      3,145,728   (3,072k)    0           (0k)
  7394.      XMS           2,048,000   (2,000k)    2,048,000   (2,000k)
  7395.      HMA allocated, EBDA not present
  7396.      There are  12,102,400 (out  of  120,946,944) bytes  free  on
  7397.      drive N:
  7398.  
  7399.  
  7400.      The first  section of  the display  gives information  about
  7401.      memory control blocks (MCB's) in  low DOS memory, between  0
  7402.      and 640k.  It lists the hexadecimal address of the owner  of
  7403.      the MCB in `PSP addr' column, the amount of memory owned  by
  7404.      the block  in the  `Size' column,  the name  of the  program
  7405.      which owns the PSP in the `Owner' column.  The final  column
  7406.      lists, in  hexadecimal,  the  interrupt  vectors  which  are
  7407.      hooked into  the memory  controlled by  the MCB.   From  the
  7408.      above display, we  can see that ScrGrab  hooks the high  and
  7409.      low  priority  keyboard  interrupts,  the  main  DOS  server
  7410.      interrupt  and  the  DOSok  interrupt.    A  DOS   technical
  7411.      reference will  tell  you  the  meanings  and  uses  of  the
  7412.      different interrupt numbers.
  7413.  
  7414.      DOS  itself  also  owns  blocks  of  memory  and  these  are
  7415.      signalled by  owners of  `[Dos]',  for blocks  with  invalid
  7416.      environments and  `[Shell]', for  blocks which  do not  have
  7417.      program names attached to them.
  7418.  
  7419.      The second section  of the output from  MI lists the  amount
  7420.      memory available  in each  of the  different memory  schemes
  7421.      used in the  PC. The listing is  divided into five  columns:
  7422.      The first gives the type  of memory about to be listed,  the
  7423.      second gives the total amount of memory allocatable and  the
  7424.      fourth gives the amout of memory remaining unallocated.  The
  7425.      third  and  fifth  columns   convert  the  byte  counts   to
  7426.      measurements in kilobytes (bytes divided by 1024).
  7427.  
  7428.  
  7429.  
  7430.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7431.        - Appendices.                         Page: 134 -
  7432.  
  7433.  
  7434.      Conventional memory  extends  from  0 to  640k,  unless  VGA
  7435.      graphics memory  has  been  used to  backfill  DOS  to  736k
  7436.      (generally, it isn't).   The  available conventional  figure
  7437.      will always be  slightly less than that  noted as [Free]  in
  7438.      the first section of the listing.  This is because the first
  7439.      section lists as free the memory used by the environment  of
  7440.      the currently active program, while the second does not.
  7441.  
  7442.      The next line gives the amount of expanded memory (LIM  EMS)
  7443.      in your system.  It interrogates the status of int 67h which
  7444.      controls the interface  to the memory.   If  this vector  is
  7445.      NULL, then the  message `None' will  be displayed.   If  the
  7446.      vector exists, but  does not respond in  the way it  should,
  7447.      then the message `EMS not responding' will be displayed.
  7448.  
  7449.      The third line in this  section gives the amount of  vanilla
  7450.      extended memory available and free.  The total is read  from
  7451.      the CMOS setup information in  your PC, while the amount  of
  7452.      free memory is taken from int 15h/fn 88h.  The final line in
  7453.      the memory display gives the amount of XMS (Extended  Memory
  7454.      System) in your machine.
  7455.  
  7456.      The second last line  gives the on/off status  of the DOS  5
  7457.      HMA (High Memory Arena) and that of the EBDA (Extended  BIOS
  7458.      Data Area) which is normally  only present on PS/2,  Compaq,
  7459.      Digital and Olivetti PC's.
  7460.  
  7461.      The final line gives the  total disk space and the space  on
  7462.      the currently selected  disk drive.   MI  can optionally  be
  7463.      followed by  a  drive  letter  to  specify  a  drive,  whose
  7464.      statistics are displayed instead of the current drive.   For
  7465.      example the line MI  a: will list the  free space and  total
  7466.      drive space on the A: drive rather than the current drive.
  7467.  
  7468.      MI takes one of two optional command line parameters, -c and
  7469.      -m.
  7470.  
  7471.      The -c parameter instructs MI  to display the CPU type,  the
  7472.      floating point coprocessor type, the video adapter type.  If
  7473.      the  processor is  an Intel 80386 or  above, then a  message
  7474.      will be  displayed saying whether or not the CPU is  running
  7475.      in protected mode.
  7476.  
  7477.      The  -m  parameter  causes  the  normal  `condensed'  memory
  7478.      control block  display  to be  displayed  in its  low  level
  7479.      unprocessed  form.  When  -m  is  specified,  no  memory  or
  7480.      capacities are determined.
  7481.  
  7482.  
  7483.  
  7484.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7485.        - Appendices.                         Page: 135 -
  7486.  
  7487.  
  7488.      6.10  KbdSpeed
  7489.  
  7490.  
  7491.      KbdSpeed is a small utility to set the keyboard repeat  rate
  7492.      on AT class computers with  extended keyboards.  The  format
  7493.      of the command is as follows:
  7494.  
  7495.                        KbdSpeed <letter><digit>
  7496.  
  7497.      where letter  is  a  letter in  the  range  `a' to  `z'  and
  7498.      controls the repeat rate, with `a' at 30 repeats per  second
  7499.      and `z' meaning 5  repeats per second. digit  is a digit  in
  7500.      the range `1' to `4'  specifying the delay before  repeating
  7501.      occurs.   1  specifies  a delay  of  1/4  seconds, up  to  4
  7502.      specifying a delay of 1 second.
  7503.  
  7504.      To set the keyboard to  repeat at 30 characters per  second,
  7505.      with a delay of 1/4  seconds before auto repeat occurs,  the
  7506.      following command would be issued:
  7507.  
  7508.                              KbdSpeed a1
  7509.  
  7510.      If you run KbsSpeed from within MicroSoft Windows, then  the
  7511.      program will have no effect, since Windows resets the  rates
  7512.      of its own accord, ignoring any preset values.
  7513.  
  7514.      KbdSpeed is most useful in RExL when designing screens where
  7515.      the cursor  may  need to  make  large movements  around  the
  7516.      screen.  The normal repeat rate of 10 characters per  second
  7517.      then becomes an irritation.
  7518.  
  7519.  
  7520.      6.11  KbdScan
  7521.  
  7522.  
  7523.      KbdScan is another small utility which reads from keystrokes
  7524.      from the keyboard and displays  the keyboard scan code,  the
  7525.      BIOS keystroke return  value and the TSR  hotkey code.   The
  7526.      information is displayed on three sucessive lines.
  7527.  
  7528.      The format of the command is as follows:
  7529.  
  7530.                              KbdScan [-x]
  7531.  
  7532.      This utility  is provided  so that  the activating  keyboard
  7533.      scan code for  ScrGrab can be  changed.  If  you want to  do
  7534.      this, take the TSR hotkey  code displayed on the final  line
  7535.  
  7536.  
  7537.  
  7538.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7539.        - Appendices.                         Page: 136 -
  7540.  
  7541.  
  7542.      of display and place it  as the parameter to the -k  command
  7543.      line option to ScrGrab.
  7544.  
  7545.      The following is  output from KbdScan,  with <Alt-0> as  the
  7546.      last key pressed:
  7547.  
  7548.      KbdScan  Version 2.1  (C) Copyright 1992, The Software Loft
  7549.      Press any key, ESC (twice) aborts :
  7550.      Shift/scan code   :088b
  7551.      BIOS return value :8100
  7552.      TSR hotkey code   :0881
  7553.  
  7554.      To change the  activating keystroke in  ScrGrab to  <Alt-0>,
  7555.      the following command would be issued.
  7556.  
  7557.                             ScrGrab -k0881
  7558.  
  7559.      Finally, ScrGrab accepts  the command line  option `-x'.  If
  7560.      this option is included,  ScrGrab will read keystrokes  from
  7561.      an extended 101-102 key keyboard.  This is only supplied  as
  7562.      an extra feature, and is not used in RExL.
  7563.  
  7564.  
  7565.  
  7566.  
  7567.  
  7568.  
  7569.  
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7593.        - Appendices.                         Page: 137 -
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.                               Chapter 7
  7603.  
  7604.                               Afterword
  7605.  
  7606.  
  7607.      This appendix  gives a  few pointers  to the  directions  in
  7608.      which the Software Loft hopes  to go when developing  future
  7609.      versions of RExL.   Any suggestions  for features which  you
  7610.      would like  to  see  incorporated  would  be  most  welcome.
  7611.      Please  remember  that  without  your  support,  we   cannot
  7612.      continue to  supply you  with  low cost,  quality  software.
  7613.      Thank you.
  7614.  
  7615.          o  New features  in the  screen  designer.   These  will
  7616.             include pictures for  input and output  (as in  dBase
  7617.             compatible languages) as well as undo.
  7618.  
  7619.          o  Improve the  speed  of the  runtime-debugger  module.
  7620.             Currently, we  have  a  better  expression  evaluator
  7621.             undergoing tests and  we hope  to include  it in  the
  7622.             next major release.
  7623.  
  7624.          o  Mouse handling.
  7625.  
  7626.          o  More features in the debugger:  Break on  expression,
  7627.             pass count  breakpoints,  break on  variable  access.
  7628.             VGA 43 and 50 line mode support.
  7629.  
  7630.          o  More features  in  the  editor: Search  and  replace,
  7631.             lines  longer  than   65  characters,  and   function
  7632.             references (similar to  variable references).   Color
  7633.             installation program  to  set  up  colors  of  menus,
  7634.             windows and various other  system parameters. VGA  43
  7635.             and 50 line mode support.
  7636.  
  7637.          o  Language: rules attached to variables.  Every time  a
  7638.             variable is either accessed  or changed, its rule  is
  7639.             called.  User defined RExL  functions.  Link in  with
  7640.             C, assembly language and Pascal.
  7641.  
  7642.  
  7643.  
  7644.  
  7645.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7646.        - Appendices.                         Page: 138 -
  7647.  
  7648.  
  7649.  
  7650.          o  Add  true  relational  capability  to  the   database
  7651.             module.  Most  of the code required  is in place  for
  7652.             this.
  7653.  
  7654.          o  A portable runtime module to allow the programmer  to
  7655.             write applications in  DOS and to  port the  finished
  7656.             product to  Unix,  and  other  text  based  operating
  7657.             systems.
  7658.  
  7659.          o  A windows version  of RExL.   The current version  of
  7660.             RExL has taken fourteen months  for us to write.   We
  7661.             hope to be able to  port most of the code to  Windows
  7662.             easily enough  and  to  have an  alpha  test  version
  7663.             running sometime around September of 1992.
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.  
  7681.  
  7682.  
  7683.  
  7684.  
  7685.  
  7686.  
  7687.  
  7688.  
  7689.       - RExL  Version 2.10  Copyright 1992, The Software Loft -
  7690.  
  7691.