home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / rexl / rexlref.doc < prev    next >
Text File  |  1992-08-16  |  240KB  |  7,769 lines

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