home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1998 February / PCOnline_02_1998.iso / filesbbs / dos / dbonlin2.exe / DBONLINE.DOC < prev    next >
Encoding:
Text File  |  1995-09-29  |  205.8 KB  |  6,303 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.           dB Online
  7.           Administrator's Manual
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.          Merlin Systems Inc.
  32.          Ottawa, Ontario, Canada
  33.  
  34.          Copyright (c) 1993-1995 Merlin Systems Inc.  All rights reserved. This
  35.          software  product and this manual are copyrighted and all  rights  are
  36.          reserved  by  Merlin  Systems Inc.  No part of the  contents  of  this
  37.          manual  may be reproduced or transmitted in any form or by  any  means
  38.          without the written permission of the publisher.
  39.  
  40.          Merlin  Systems Inc. does not assume any liability arising out of  the
  41.          application  or use of any products described herein.  Merlin  Systems
  42.          Inc.  further  reserves  the right to make  changes  in  any  products
  43.          described  herein without notice.  This document is subject to  change
  44.          without notice.
  45.  
  46.          dBASE   III+  and  dBASE  IV  are  registered  trademarks  of  Borland
  47.          International Inc.
  48.          Clipper is a registered trademark of Computer Associates Inc.
  49.          FoxPro and MS-DOS are registered trademarks of Microsoft Corporation.
  50.          DigiBoard is a registered trademark of DigiBoard Corp.
  51.  
  52.          All  other trademarks and registered trademarks are the properties  of
  53.          their respective owners.
  54.  
  55.          Revision Date: 8/11/94 rev. 5
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                        C    O   N    T    E    N    T    S
  71.  
  72.  
  73. INTRODUCTION                                              1
  74.  
  75.  COMMUNICATIONS MODES                                     1
  76.  SHAREWARE LIMITATIONS                                    1
  77.  PROFESSIONAL VERSION                                     1
  78.  
  79. INSTALLATION                                              1
  80.  
  81.  DISKETTE INSTALLATION                                    1
  82.  ZIP FILE INSTALLATION                                    2
  83.  INSTALLED FILES                                          2
  84.  
  85. DATABASE CONCEPTS                                         3
  86.  
  87.  WHAT IS A DATABASE?                                      3
  88.   FIELDS                                                  3
  89.   RECORDS                                                 4
  90.   TAGS                                                    4
  91.   INDEXES                                                 5
  92.  
  93. COMPILING                                                 6
  94.  
  95.  SOURCE CODE FORMAT (.PRG)                                6
  96.  COMPILE SYNTAX                                           6
  97.  EXAMPLES                                                 7
  98.  
  99. EXECUTION                                                 9
  100.  
  101.  FILE FORMAT COMPATIBILITY                                9
  102.  OPERATION MODES                                          9
  103.   BBS DOORWAY MODE                                        9
  104.   LOCAL/LAN MODE                                          9
  105.   STAND ALONE MODE                                       10
  106.  COMMAND LINE PARAMETERS                                 10
  107.   STAND ALONE BATCH FILE                                 12
  108.  
  109. COMMUNICATIONS                                           13
  110.  
  111.  PORT COMMAND SYNTAX                                     13
  112.   COM                                                    13
  113.   INT14                                                  13
  114.   FOSSIL                                                 13
  115.   SDIGI                                                  14
  116.   SARNET                                                 14
  117.  
  118. LANGUAGE REFERENCE                                       15
  119.  
  120.  SYMBOLS AND CONVENTIONS                                 15
  121.  EXPRESSIONS                                             15
  122.   VARIABLES/FIELDS                                       16
  123.   ALIASES                                                16
  124.   MATHEMATICAL OPERATORS                                 16
  125.   BBS INFORMATION FUNCTIONS                              16
  126.  RELATIONAL OPERATORS                                    17
  127.   LOGICAL OPERATORS                                      17
  128.   OPERATOR PRECEDENCE                                    17
  129.  LANGUAGE MODIFICATIONS                                  18
  130.  LANGUAGE REFERENCE                                      20
  131.  
  132. APPENDICES                                              122
  133.  
  134.  APPENDIX 1:  ERRORLEVELS                               122
  135.   PROGRAM EXECUTION ERRORS                              122
  136.   START UP ERRORS                                       124
  137.  APPENDIX 2:  COMPILER MESSAGES                         126
  138.   ERROR MESSAGES                                        126
  139.   WARNING MESSAGES                                      126
  140.  APPENDIX 3:  RUNTIME ERRORS                            128
  141.  APPENDIX 4: FULL SCREEN ENTRY KEYS                     130
  142.  
  143.  
  144.  
  145.  
  146.                                                                    Introduction
  147.  
  148.  
  149.  
  150.  
  151.          dB  Online is the first database application specifically designed for
  152.          online environments.  It provides a complete programming language that
  153.          enables you to access, display, edit, and append to database files.
  154.  
  155.          dB Online accesses industry standard .DBF files with a superset of the
  156.          dBASE  III+  programming language.  This allows you  to  use  existing
  157.          database applications, or easily create new ones.  There is no need to
  158.          learn new scripting languages.
  159.  
  160. Communications Modes
  161.          dB Online operates in three communication modes:
  162.  
  163.            o    In BBS Doorway Mode, dB Online operates with most popular BBS's
  164.                 as a seamless door.  BBS and user information is passed to
  165.                 dB Online and is available to the developer through xBase
  166.                 type function calls.
  167.  
  168.             o   In Local/LAN Mode, dB Online provides a method for your local
  169.                 users to access the dB Online application.  This mode is also
  170.                 useful for testing and debugging your application.
  171.  
  172.             o   In Stand Alone Mode, dB Online operates without a BBS.  It will
  173.                 wait for callers and make a connection before executing the
  174.                 application.  This provides an alternative method to supply
  175.                 database access in an online environment.
  176.  
  177.          dB  Online is multi-user compatible and provides full file and  record
  178.          locking capabilities.  dB Online employs locking methods compatible to
  179.          your  native  database  management  system.   dB  Online  can  be  run
  180.          concurrently with your existing applications and access the same  data
  181.          files simultaneously.
  182.  
  183.          While  dB Online's strength is it's ability to access database  files,
  184.          it  also  provides a complete language to create any type of door  for
  185.          your BBS.
  186.  
  187.  
  188. Shareware Limitations
  189.          While the shareware version of dB Online allows you to experience  the
  190.          power  of dB Online for free, it does have some limitations.   It  was
  191.          made available to allow you to try the software before you purchase it
  192.          and  should not be used on regular terms.  Whenever dB Online  runs  a
  193.          program  that  was compiled with the shareware version of compile.exe,
  194.          it  produces  an æUnregistered Delay ScreenÆ before and after  running
  195.          the program.
  196.  
  197. Professional Version
  198.          The  Professional version allows for non-BBS operation with the  Stand
  199.          Alone  feature.  This feature will allow dB Online to answer  incoming
  200.          calls.
  201.  
  202.  
  203.  
  204.                                                                    Installation
  205.  
  206.  
  207.  
  208.  
  209.  
  210. Diskette Installation
  211.  
  212.          The dB Online diskette includes an installation program.  The steps to
  213.          follow are:
  214.  
  215.             o    Insert the diskette into the drive you want to install from
  216.  
  217.             o    Run the install program on the diskette by typing:
  218.  
  219.                                  a:install
  220.  
  221.             o    The install program will ask you for the directory to install
  222.                  dB Online.  It will also ask you the file format compatibility
  223.                  you wish to install.  You have a choice of one or more of the
  224.                  following:  dBASE III+, dBASE IV, Clipper or FoxPro.
  225.  
  226.             o    Install will copy all necessary files into the specified
  227.                  directory.
  228.  
  229.             o    Please review the readme.txt file for any product revisions.
  230.  
  231.             o    Once installation is complete proceed to the COMPILING and
  232.                  EXECUTION sections to create your first online database
  233.                  application.
  234.  
  235.  
  236.  
  237. Zip File Installation
  238.  
  239.          If  you  received  dB  Online from a download you  should  install  as
  240.          follows:
  241.  
  242.             o    Create a directory for dB Online:
  243.  
  244.                             md c:\dbonline
  245.  
  246.             o    Unzip the dbol???.zip file into this directory:
  247.                  (??? refers to the version number of dB Online)
  248.  
  249.                             pkunzip dbol???.zip c:\dbonline
  250.  
  251.             o    Copy the dbonline.key file into the dB Online directory
  252.  
  253.             o    Please review the readme.txt file for any product revisions.
  254.  
  255.             o    Once installation is complete proceed to the COMPILING and
  256.                  EXECUTION sections to create your first online database
  257.                  application.
  258.  
  259. Installed Files
  260.  
  261.          The  following  files  should be in your  dB  Online  directory  after
  262.          installation:
  263.  
  264.               COMPILE.EXE    Source .PRG compiler
  265.               DBOLFOX.EXE    dB Online executable for FoxPro compatibility
  266.               DBOL4.EXE      dB Online executable for dBASE IV compatibility
  267.               DBOL3.EXE      dB Online executable for dBASE III+ compatibility
  268.               DBOLCLIP.EXE   dB Online executable for Clipper compatibility.
  269.               DBONLINE.DOC   ASCII version of this document
  270.               README.TXT     Product revisions and documentation updates.
  271.               REGISTER.DOC   Product registration information.
  272.               DBONLINE.KEY   Key file to access Registered functions
  273.  
  274.  
  275.                                                               Database Concepts
  276.  
  277.  
  278.  
  279.  
  280.  
  281. What is a database?
  282.  
  283.          A  database is a organized collection of related information or  data.
  284.          A common example of a database is a telephone book.  It contains name,
  285.          phone  numbers, and addresses of thousands of people.  Each  entry  in
  286.          the  phone book corresponds to a record, and each piece of information
  287.          in  the  record,  such as the name or phone number, corresponds  to  a
  288.          field.   A  group  of  records  such as a  telephone  book  becomes  a
  289.          database.
  290.  
  291.          dB  Online  accesses the industry standard .DBF database files.   This
  292.          standard,  known as the xBase standard, is presently the  most  widely
  293.          used database standard.
  294.  
  295.          Fields
  296.          A field is the most basic piece of data in a database file.  There are
  297.          four attributes that describe each field.  These are described below:
  298.  
  299.          Field      Description
  300.          Attribute
  301.  
  302.          Name       This  refers  to  the name that will  be  used  to
  303.                     identify  the  field.  A field  name  can  have  a
  304.                     maximum  of 10 characters.  It must begin with  an
  305.                     alphabetical  character and  may  consist  of  any
  306.                     combination   of   alphanumeric   or    underscore
  307.                     characters.
  308.  
  309.  
  310.          Type       The  type  of  the field determines what  kind  of
  311.                     information  is  stored.  There  are  5  types  of
  312.                     fields  in  the xBase standard:  Character,  Date,
  313.                     Logical,  Numeric, and Memo.  The first  four  are
  314.                     fixed   length  fields  and  the  Memo  field   is
  315.                     variable length.
  316.  
  317.  
  318.          Length     This  refers to the number of characters or digits
  319.                     that can be stored in the field.
  320.  
  321.  
  322.          Decimals   This   only   applies  to  Numeric   fields.    It
  323.                     specified  the  number  of digits  to  follow  the
  324.                     decimal place.
  325.  
  326.  
  327.          Memo  fields are stored in a separate file and entries are  referenced
  328.          from  a  fixed field in the database file.  A memo entry can be  64000
  329.          characters in length.
  330.  
  331.          Records
  332.          A  record consists of one instance of every field.  Each record has  a
  333.          unique  record  number.   The  record number  indicates  the  physical
  334.          position  of  the  data  in the data file.  Each  record  also  has  a
  335.          deletion flag.  This deletion flag determines weather a record  is  to
  336.          be removed when the file is packed.
  337.  
  338.          Tags
  339.          A  tag determines the order that the records in the database file  are
  340.          presented.   The  tag  does not affect the physical  ordering  of  the
  341.          database  but  only  the order in which they are accessed.   Tags  are
  342.          created by specifying an expression that the records are ordered from.
  343.          The results of this expression is stored in the index key.
  344.  
  345.          Indexes
  346.          An  index is a file containing the sorted index keys for one  or  more
  347.          tags.   dB  Online supports several formats of index files.  They  are
  348.          specified below by the index file extensions:
  349.  
  350.               File Extension                Format
  351.                    .CDX                     FoxPro
  352.                    .MDX                    dBASE IV
  353.                    .NDX                   dBASE III+
  354.                    .NTX                    Clipper
  355.  
  356.          The  .CDX  and  .MDX formats allow you to have multiple tags  in  each
  357.          index  file, and production index files.  Production index files  open
  358.          automatically when the associated database is opened.   The  .NDX  and
  359.          .NTX index formats allow only one tag per index file.
  360.  
  361.  
  362.                                                                       Compiling
  363.  
  364.  
  365.  
  366.  
  367.  
  368. Source Code Format (.PRG)
  369.  
  370.          The  source code for a dB Online program consists of one or more  .PRG
  371.          files.    These   are  the  standard  source  files  for   all   xBase
  372.          applications.  The dB Online source program is defined by a main  .PRG
  373.          file and optional procedure files.
  374.  
  375.          The  main file is the file that will be executed first once the source
  376.          is compiled.  Procedure files are specified using the SET PROCEDURE TO
  377.          command.   These  files must include only procedure definitions.   The
  378.          main  file  and  all its procedure files are compiled  into  a  single
  379.          source .DBX file.
  380.  
  381.          The following code provides an example of the Source Code Format:
  382.  
  383.           FILE:  main.prg
  384.  
  385.           SET PROCEDURE TO function.prg * Beginning of main.prg
  386.           ...
  387.           RETURN    && ends main program
  388.           PROCEDURE proc1     && procedure definition with main program
  389.           ...
  390.           RETURN
  391.  
  392.           FILE:  function.prg
  393.  
  394.           PROCEDURE proc2     && Procedure files only contain procedures
  395.           ...
  396.           PROCEDURE proc3     && RETURN assumed before PROCEDURE
  397.           ...
  398.           RETURN
  399.  
  400. Compile Syntax
  401.  
  402.           The command line syntax of the dB Online compiler is:
  403.  
  404.                COMPILE <source.prg>
  405.  
  406.           <source.prg> identifies the main file to be compiled.
  407.  
  408.          The  dB Online compiler will compile the source code of the main file.
  409.          Any procedure files identified in the main file with the SET PROCEDURE
  410.          TO command will also be compiled.  The dB Online compiler will do full
  411.          syntax checking for all dB Online commands.
  412.  
  413.          Compile will output two types of messages during the compile.
  414.  
  415.          Error  messages  indicate errors in the source code program.   Compile
  416.          will indicate the source line number and show where the error occurred
  417.          in the actual source code.
  418.  
  419.          Warning messages indicate code that is not applicable to an executable
  420.          version of an xBase program.  These include commands such as SET TALK,
  421.          SET SCOREBOARD, etc.
  422.  
  423.          If there are zero error messages as a result of the compile, dB Online
  424.          will  then link all procedure calls in the code.  Procedure definition
  425.          are compared with procedure calls to ensure that the correct number of
  426.          parameters  are  being  passed  and  that  all  procedure  calls  have
  427.          corresponding procedure definitions.
  428.  
  429.          If  there  are no linking errors then a compiled source .DBX  file  is
  430.          created.    This  is  the  file  to  be  used  with  the  dbonline.exe
  431.          executable.
  432.  
  433.          All compilation error and warning messages are listed in APPENDIX 2.
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442. Examples
  443.  
  444.           Consider the following program: sample.prg
  445.  
  446.           ** File:  sample.prg
  447.           ? "Hello"
  448.           Return
  449.  
  450.           The output from the compiler would be:
  451.  
  452.           dB Online 2.0        Copyright (c) 1993  Merlin Systems Inc.
  453.           ------------------------------------------------------------
  454.           COMPILING:  sample.prg
  455.  
  456.           TOTAL ERRORS:   0    TOTAL WARNINGS:   0
  457.  
  458.           LINKING PROCEDURE CALLS
  459.  
  460.           SUCCESS
  461.  
  462.           WRITING FILE: sample.dbx
  463.  
  464.           For the following program: sample2.prg
  465.  
  466.           ** File: sample2.prg
  467.           USE customer.dbf ALIAX clients
  468.           LIST
  469.           RETURN
  470.  
  471.           The output from the compiler would be:
  472.  
  473.           dB Online 2.0        Copyright (c) 1993  Merlin Systems Inc.
  474.           ------------------------------------------------------------
  475.           COMPILING:  sample2.prg
  476.  
  477.            *** ERROR: Syntax Error.   Line:     2
  478.           USE customer.dbf ALIAX clients
  479.                            ^
  480.  
  481.           TOTAL ERRORS:   1    TOTAL WARNINGS:   0
  482.  
  483.  
  484.  
  485.                                                                       Execution
  486.  
  487.  
  488.  
  489.  
  490.          dB  Online operates with a number of database file formats, and  three
  491.          operating modes.  These options are explained in this section.
  492.  
  493.  
  494. File Format Compatibility
  495.  
  496.          dB  Online  presently  supports 4 common file  formats.   There  is  a
  497.          separate  dbonline.exe  file  for each format.   This  information  is
  498.          outlined in the following table:
  499.  
  500.            File Format    Index Format    Memo Format      dB Online Executable
  501.            dBASE III+     .NDX            .DBT             DBOL3.EXE
  502.            CLIPPER        .NTX            .DBT             DBOLCLIP.EXE
  503.            dBASE IV       .MDX            .DBT             DBOL4.EXE
  504.            FoxPro         .CDX            .FPT             DBOLFOX.EXE
  505.  
  506.          When  referring  to  the dB Online executable, this  manual  will  use
  507.          dbonline.exe.  However one of the above executables must  be  replaced
  508.          for dbonline.exe on the command line.
  509.  
  510. Operation Modes
  511.  
  512.          There  are three modes of operation for dB Online:  BBS Doorway  Mode,
  513.          Local  /  LAN  Mode  and  Stand Alone Mode.   The  dB  Online  calling
  514.          conventions for each mode area outlined below.
  515.  
  516.          BBS Doorway Mode
  517.          To  operate in BBS Doorway Mode you will need to use your BBS software
  518.          to  setup dB Online as a door.  The BBS software will require  you  to
  519.          create  a  batch  file  for the doorway.  Please  refer  to  your  BBS
  520.          documentation for assistance.
  521.  
  522.          You  will  need  to include in dB OnlineÆs command line  one  or  more
  523.          filenames of BBS drop files.
  524.  
  525.          Local/LAN Mode
  526.          dB Online can be executed in Local or LAN Mode.  This allows for local
  527.          testing and debugging of the application, as well as servicing all LAN
  528.          nodes on your BBS.
  529.  
  530.          All that is need on the command line, is the filename of a DBX file.
  531.  
  532.          Local/Lan Mode operation will not output  to any communications  port.
  533.          It only displays on the local screen.
  534.  
  535.          Stand Alone Mode
  536.          dB  Online  provides a method to operate over a COMM port without  the
  537.          need  of a BBS.  Stand Alone mode will wait to receive a call  on  the
  538.          modem and then connect with the user before executing the .DBX file.
  539.  
  540.  
  541. Command Line Parameters
  542.  
  543.          dB Online's command line syntax is as follows:
  544.  
  545.          dbonline <source.dbx> [<bbs drop files>] [PORT:xxxx:n,y] [-ESTACK:xx]
  546.                [-STACK:xx] [-AREA:xx] [-QUIET] [-SA]
  547.  
  548.          <source.dbx>
  549.          This  is the path and filename of the compiled .PRG files.  dB  Online
  550.          assumes a .DBX file extension if none is given.
  551.  
  552.          <bbs drop files>
  553.          This can consist of any combination of the following.
  554.  
  555.             o    DOOR.SYS (*)
  556.             o    PCBOARD.SYS (*)
  557.             o    DORINFOx.DEF (*)
  558.             o    CALLINFO.BBS (*)
  559.             o    CHAIN.TXT (*)
  560.             o    USERS.SYS
  561.             o    EXITINFO.BBS
  562.  
  563.          The BBS drop files are created by the BBS whenever a door is executed.
  564.          Consult  your  BBS documentation for the BBS drop files  created.   At
  565.          least  one  of  the files with asterisks is required, as they  provide
  566.          COMM  port information for dB Online.  USERS.SYS and EXITINFO.BBS only
  567.          provide user information.
  568.  
  569.          If the information in the <bbs drop files> provide a zero for the COMM
  570.          port  or  BAUD settings then operation will default to Local/Lan  Mode
  571.          operation.   This allows local nodes to log into your BBS  and  access
  572.          the dB Online door application.
  573.  
  574.          PORT:xxxx:n,y
  575.          This  command  is  for custom port configuration only.   This  is  not
  576.          usually  required for standard BBS Doorway Mode operation.   For  more
  577.          information, see the Communications section.
  578.  
  579.          -ESTACK:xx
  580.          This parameter is used to specify the amount of memory to allocate for
  581.          the  Evaluation Stack.  By default this is 20.  Maximum  is  32768  or
  582.          limited by available memory.
  583.  
  584.          -STACK:xx
  585.          This parameter is used to specify the amount of memory to allocate for
  586.          the  Runtime  Stack.   By default this is 50.   Maximum  is  32768  or
  587.          limited by available memory.
  588.  
  589.          -AREA:xx
  590.          The  maximum number of work areas to allocate memory for.  By  default
  591.          this value is 20.
  592.  
  593.          -SA
  594.          The -SA option identifies Stand Alone Mode operation.
  595.  
  596.          The  PORT: command is not optional in Stand Alone operation.  It  must
  597.          be  specified  in  order  that dB Online call detect  incoming  calls.
  598.          Please see the Communications section for more details.
  599.  
  600.          Upon  execution  dB  Online Stand Alone will enter  the  call  waiting
  601.          screen.  This screen is shown below:
  602.  
  603.                            ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  604.                            █                            █
  605.                            █          ▀▀▀  ▀▀▀▀▀▀▀▀▀    █
  606.                            █          ▀▀    ▀▀      ▀▀  █
  607.                            █          ▀▀    ▀▀      ▀▀  █
  608.                            █          ▀▀    ▀▀      ▀▀  █
  609.                            █    ▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀▀▀    █
  610.                            █  ▀▀      ▀▀    ▀▀      ▀▀  █
  611.                            █  ▀▀      ▀▀    ▀▀      ▀▀  █
  612.                            █  ▀▀      ▀▀    ▀▀      ▀▀  █
  613.                            █  ▀▀      ▀▀    ▀▀      ▀▀  █
  614.                            █    ▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀    █
  615.                            █           Online           █
  616.                            ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  617.  
  618.     █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  619.     █ dB Online v2.0   Copyright (c) 1994 Merlin Systems Inc.                █
  620.     █ Last call on 00/00/00 00:00  (0 total calls)                           █
  621.     █ Port 1 on UART driver opened at 9600 baud.                             █
  622.     █ Initializing Modem.                                                    █
  623.     █ Waiting for a call...                            (Press F1 for Help)   █
  624.     █                                                                        █
  625.     █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  626.  
  627.  
  628.  
  629.          This entry screen provides information on the PORT settings as well as
  630.          previous  caller  information.  There is a window that  indicates  the
  631.          Connection Status of the PORT.
  632.          There are three events that will exit from the call waiting screen.
  633.  
  634.             o   A call is received.
  635.                 dB Online will make a connection and then execute the specified
  636.                 .DB2 program.
  637.  
  638.             o   The local user presses <F2>.
  639.                 dB Online will then execute the specified .DBX program in local
  640.                 mode.
  641.  
  642.             o   The local user presses <Esc>.
  643.                 dB Online will exit and return a DOS errorlevel of 114 (defined
  644.                 in Appendix 1).
  645.  
  646.          Once  dB  Online terminates for any reason, it will return control  to
  647.          DOS.   You  must create a batch file that will re-enter dB  Online  to
  648.          wait for another caller.
  649.  
  650.          Stand Alone Batch File
  651.          This example batch file will start dB Online Stand Alone with a source
  652.          file sample.dbx using COMM port 1 at 9600 baud.  If the user presses
  653.          <Esc> at the call waiting screen then the batch file will terminate.
  654.  
  655.                :start
  656.                dbonline sample.dbx -SA PORT:COM:1,9600
  657.                REM if local user presses escape do not re-enter
  658.                if errorlevel 115 goto start
  659.                if errorlevel 114 goto end
  660.                goto start
  661.                :end
  662.  
  663.  
  664.  
  665.                                                                  Communications
  666.  
  667.  
  668.  
  669.  
  670.          dB  Online includes the ability to communicate with a wide variety  of
  671.          communications hardware.  Support is provided for standard COM  ports,
  672.          FOSSIL  drivers, Interrupt 14 (BIOS), DigiBoard, and Arnet  smart  I/O
  673.          cards.  16550 FIFO support is automatically handled.
  674.  
  675.          The  PORT  command  line  parameter is used  to  specify  custom  port
  676.          configurations for use with dB Online.  A PORT command is required for
  677.          Stand  Alone  operation  and  may be required  for  BBS  Doorway  Mode
  678.          operation.
  679.  
  680. PORT Command Syntax
  681.  
  682.          The PORT command line parameter has the following syntax:
  683.  
  684.                PORT:<driver>:<port>,<baud>
  685.  
  686.          The <driver> settings are outlined below:
  687.  
  688.          COM
  689.          The COM <driver> setting is for standard COM ports.
  690.  
  691.          For   ISA  machines  the  <port>  value  is  between  1  and  4.   For
  692.          Multichannel machines the <port> value can be from 1 to 8.
  693.  
  694.          The <baud> value can range up to 115200.
  695.  
  696.          INT14
  697.          This INT14 <driver> setting is for Interrupt 14 (BIOS) ports.
  698.  
  699.          With  this  driver,  dB  Online will access the  serial  port  through
  700.          Interrupt  14.  INT14 should be used if you have a TSR or driver  that
  701.          uses  Int  14  to route serial calls to something other than  the  COM
  702.          ports.   INT14  should also be used if you have a non-intelligent  I/O
  703.          board and are using its driver software.
  704.  
  705.          The <port> value is the same as the standard COM port values.
  706.  
  707.          The <baud> value can range up to 19200.
  708.  
  709.          FOSSIL
  710.          The FOSSIL <driver> setting is for FOSSIL drivers.
  711.  
  712.          Use  this  driver  if  you have a FOSSIL driver installed.   Two  such
  713.          drivers are X00 and BNU.
  714.  
  715.          The <port> and <baud> values are dependent on the FOSSIL driver.
  716.  
  717.          SDIGI
  718.          The SDIGI <driver> setting is for an Intelligent DigiBoard I/O board.
  719.  
  720.          A  recent version of the DigiBoard driver will be required.  The  most
  721.          recent  driver  as of printing of this manual was XDIDOS5.SYS  version
  722.          4.0.5.  It is available from the DigiBoard BBS at 612-943-0812.
  723.  
  724.          The  <port> value will be the DigiBoard channel to be use. The  <baud>
  725.          value can range up to 115,200.
  726.  
  727.          For  proper  DigiBoard operation ensure the driver is  configured  for
  728.          EBIOS  support, and that the IRQ line, the character ready  flag,  and
  729.          the handshaking are all disabled.
  730.  
  731.          SARNET
  732.          The SARNET <driver> setting is for an Intelligent Arnet I/O board.
  733.  
  734.          The  <port>  value  is the channel or handle as stated  by  the  Arnet
  735.          device driver upon loading.
  736.  
  737.          The <baud> value can range up to 115200.
  738.  
  739.  
  740.                                                              Language Reference
  741.  
  742.  
  743.  
  744.  
  745.  
  746. Symbols and Conventions
  747.  
  748.          The  following  symbols  are used throughout  the  Language  Reference
  749.          section  to  describe  the  syntax  of  the  dB  Online  commands  and
  750.          functions.
  751.  
  752.          Symbol       Definition
  753.          <item>       Angle brackets indicate that you must enter the
  754.                       enclosed item.  Do not enter the angled brackets.
  755.          [item]       Square brackets indicate that the enclosed item is
  756.                       optional.  Do not enter the Square brackets.
  757.          <item1> |    The vertical line separates choices of items.  Choose
  758.          <item2>      one of the options given.
  759.          <expr>       A valid dB Online expression must be entered.  See
  760.                       the Expressions section below.
  761.          <expN>       A numeric expression must be entered here.
  762.          <expC>       A character expression must be entered here.
  763.          <expD>       A date expression must be entered here.
  764.          <expL>       A logical expression must be entered here.
  765.          <var>        A memory variable identifier must be entered here.
  766.          <memovar>    A field that represents a Memo.
  767.          <array>      A memory variable that is an array.
  768.          <field>      A database field identifier must be entered here.
  769.          <alais>      A character alias identifier must be entered here.
  770.          <proc name>  A procedure name must be entered here.
  771.          <filename>   A valid DOS filename must be entered here.  This can
  772.                       include the drive and full path if necessary.
  773.          <text>       Any text may be entered here.
  774.          <scope>      Allows the specification of records.  Valid values
  775.                       are:  ALL, RECORD <expN>, NEXT <expN>, REST.
  776.          <commands>   Any dB Online command may be entered here.
  777.          <item list>  The word list following an item indicates that a
  778.                       number of items may be entered.  These items must be
  779.                       separated by a comma (,).
  780.          <item>       An item in italics indicate that it may be macro
  781.                       substituted.  See the Macro (&) function for more
  782.                       details.
  783.  
  784.          The  naming  conventions for <var>, <field>, <proc name>, and  <alias>
  785.          area  all  the same.  They may be up to 10 characters in  length,  can
  786.          consist of alphanumeric and underscore characters, and must begin with
  787.          an alphabetic character.
  788.  
  789. Expressions
  790.          dB Online provides a complete expression evaluator.  The components of
  791.          these expression are outlined below:
  792.  
  793.          Variables/Fields
  794.          Variables  can  contain  5 types of data:  character,  numeric,  date,
  795.          logical,  and  array.   Fields have the same data  types,  except  for
  796.          array, andso include the memo field type.
  797.  
  798.          Aliases
  799.          There  are twenty work areas available in dB Online.  Aliases identify
  800.          the  work  area of a specific database.  The alias of a work  area  is
  801.          usually  the  database  file name minus the extension.   This  can  be
  802.          changed  using the USE...ALIAS command.  The alias for  the  first  10
  803.          areas can also be referred to as A through J.
  804.  
  805.          To  specify a field from another work area the aliasing indicator  (->
  806.          or  .)  must  be used.  For example to specify the NAME field  in  the
  807.          second work area you would type:
  808.  
  809.                B->NAME     or      B.NAME
  810.  
  811.          To  avoid confusion between a memory variable and a field of the  same
  812.          name you may explicitly specify the variable by writing M->VARIABLE.
  813.  
  814.          Mathematical Operators
  815.          dB Online supports the standard symbols for mathematical calculations:
  816.  
  817.             Operator     Description
  818.                +         Addition
  819.                -         Subtraction
  820.                *         Multiplication
  821.                /         Division
  822.                ^         Exponent
  823.                **        Exponent
  824.  
  825.          These operators may all be used with numeric operands.
  826.  
  827.          The +,- operators may be used with character operands.  The + operator
  828.          will  concatenate  two character strings.  The -  operator  will  also
  829.          concatenate  two  strings but will move any trailing blanks  from  the
  830.          first string to the end of the concatenated string.
  831.  
  832.          The  +,- operators may be used for date arithmetic.  Both can be  used
  833.          to  add or subtract a specific number of days from a date value.   For
  834.          example  {10/21/93}  +  7  will return 10/28/93.   Two  dates  may  be
  835.          subtracted from each other to determine the number of days in  between
  836.          them.
  837.  
  838.          BBS Information Functions
  839.          The  BBS  Information  Functions provide a way to include  information
  840.          from  the BBS drop files into a dB Online application.  Included  with
  841.          the  description  of  each  function is a  Valid  With  clause.   This
  842.          determines which BBS drop files provide the information for the  given
  843.          function.   If this BBS drop file is not included in the command  line
  844.          of  dB  Online  a  null value will be returned by the BBS  Information
  845.          Function.
  846.  
  847. Relational Operators
  848.  
  849.          dB Online supports the following relational operators:
  850.  
  851.             Operator     Description
  852.                 <        Less than
  853.                 >        Greater than
  854.                 =        Equal to
  855.                <>        Not equal to
  856.                 #        Not equal to
  857.                <=        Less than or equal to
  858.                >=        Greater than or equal to
  859.                 $        Is contained in
  860.  
  861.          The results of all relational operators is a logical value.
  862.  
  863.          The  $  operator is valid with character operands.  If A  and  B  area
  864.          character strings, A$B returns True (.T.) if A is either identical  to
  865.          B or contained within B.
  866.  
  867.          Logical Operators
  868.          dB Online supports the following logical operators:
  869.  
  870.             Operator                Description
  871.               .AND.                 Logical AND
  872.               .OR.                   Logical OR
  873.               .NOT.         Logical NOT (unary operator)
  874.  
  875.          All Operators may appear without periods.
  876.  
  877.          Operator Precedence
  878.          dB  Online evaluates expressions with the following standard  operator
  879.          precedence:
  880.  
  881.             Operators                         Description
  882.             ( )                               Parenthesis grouping
  883.             +   -                             Unary positive and negative
  884.             **   ^                            Exponent
  885.             *   /                             Multiplication, Division
  886.             +   -                             Addition, Subtraction
  887.             <   >   <=   >=  =   !=   #   $   Relational Operators
  888.             .NOT.                             Logical Not
  889.             .AND.                             Logical And
  890.             .OR.                              Logical Or
  891.  
  892.          All  operations  at the same precedence level are performed  in  order
  893.          from left to right.
  894.  
  895. Language Modifications
  896.          The following language modifications are new to dB Online version 2.0.
  897.  
  898.           @ ... EDIT ...                  New command
  899.           @ ... GET ... MESSAGE ...       Added the MESSAGE keyword
  900.           @ ... GET NOMODIFY              Added the NOMODIFY keyword
  901.           @ ... PROMPT                    New command
  902.           @ ... SAY | GET COLOR ...       Added the COLOR keyword
  903.           ACOPY ()                        New array function
  904.           ADEL ()                         New array function
  905.           ADIR ()                         New array function
  906.           AELEMENT ()                     New array function
  907.           AFIELDS ()                      New array function
  908.           AINS ()                         New array function
  909.           ALEN ()                         New array function
  910.           ASCAN ()                        New array function
  911.           ASORT ()                        New array function
  912.           ASUBSCRIPT ()                   New array function
  913.           CBLOCK ()                       New communications I/O function
  914.           CBREAK ()                       New communications I/O function
  915.           CCD ()                          New communications I/O function
  916.           CCLOSE ()                       New communications I/O function
  917.           CCTS ()                         New communications I/O function
  918.           CDSR ()                         New communications I/O function
  919.           CDTRSET ()                      New communications I/O function
  920.           CERROR ()                       New communications I/O function
  921.           CGETS ()                        New communications I/O function
  922.           CHANDSHAKING ()                 New communications I/O function
  923.           COPEN ()                        New communications I/O function
  924.           CPEEKCHAR ()                    New communications I/O function
  925.           CPORT ()                        New communications I/O function
  926.           CPUTS ()                        New communications I/O function
  927.           CRC16 ()                        New communications I/O function
  928.           CRC32 ()                        New communications I/O function
  929.           CREAD ()                        New communications I/O function
  930.           CRING ()                        New communications I/O function
  931.           CRTSSET ()                      New communications I/O function
  932.           CRXCLEAR ()                     New communications I/O function
  933.           CSETPORT ()                     New communications I/O function
  934.           CSTATUS ()                      New communications I/O function
  935.           CTXCLEAR ()                     New communications I/O function
  936.           CWRITE ()                       New communications I/O function
  937.           DECLARE / DIMENSION ...         New array commands
  938.           FCHSIZE ()                      New file I/O function
  939.           FCLOSE ()                       New file I/O function
  940.           FCREATE ()                      New file I/O function
  941.           FDATE ()                        New file I/O function
  942.           FEOF ()                         New file I/O function
  943.           FERROR ()                       New file I/O function
  944.           FFLUSH ()                       New file I/O function
  945.           FGETS ()                        New file I/O function
  946.           FLEN ()                         New file I/O function
  947.           FLLOCK ()                       New file I/O function
  948.           FLUNLOCK ()                     New File I/O function
  949.           FOPEN ()                        New file I/O function
  950.           FPUTS ()                        New file I/O function
  951.           FREAD ()                        New file I/O function
  952.           FSEEK ()                        New file I/O function
  953.           FSETTIME ()                     New file I/O function
  954.           FTELL ()                        New file I/O function
  955.           FTIME ()                        New file I/O function
  956.           FUNCTION ...                    New command
  957.           FWRITE ()                       New File I/O function
  958.           ISDIGIT ()                      New function
  959.           ISREMPTY ()                     New communications I/O function
  960.           ISRFULL ()                      New communications I/O function
  961.           ISTEMPTY ()                     New communications I/O function
  962.           ISTFULL ()                      New communications I/O function
  963.           LINENO ()                       New function
  964.           MEMORY ()                       New function
  965.           MENU TO ...                     New command
  966.           MODIFY FILE | COMMAND ...       New command
  967.           MODIFY MEMO ...                 New command
  968.           PROGRAM ()                      New function
  969.           RCVASCII ()                     New communications I/O function
  970.           RCVKERMIT ()                    New communications I/O function
  971.           RCVXMODEM ()                    New communications I/O function
  972.           RCVYMODEM ()                    New communications I/O function
  973.           RCVZMODEM ()                    New communications I/O function
  974.           REGISTEREDTO ()                 New function
  975.           RETURN ...                      RETURN can now return a value
  976.           SELECT ()                       New function
  977.           SERIALNO ()                     New function
  978.           SET COMPATIBLE ...              New command
  979.           SET CURRENCY LEFT | RIGHT       New command
  980.           SET CURRENCY TO ...             New command
  981.           SET DATE TO ...                 New command
  982.           SET MARK TO ...                 New command
  983.           SET POINT TO ...                New command
  984.           SET SEPARATOR TO ...            New command
  985.           SET SPACE ON | OFF              New command
  986.           SNDASCII ()                     New communications I/O function
  987.           SNDKERMIT ()                    New communications I/O function
  988.           SNDXMODEM ()                    New communications I/O function
  989.           SNDYMODEM ()                    New communications I/O function
  990.           SNDZMODEM ()                    New communications I/O function
  991.  
  992.  
  993.  
  994. Language Reference
  995.  
  996. &
  997. Function  &  is the macro substitution function.  It substitutes the contents of
  998.           a character memory variable for another variable name or a file name.
  999.  
  1000. Syntax    &<var>
  1001.  
  1002. Returns   <var> | <field> | <filename>
  1003.  
  1004. Remarks   The  contents  of  <var>  will specify either  another  variable/field
  1005.           identifier or a file name to be used in a file command.
  1006.  
  1007.           The  macro  (&) function has been enhanced.  Anywhere a variable/field
  1008.           identifier can be used, it can be substituted with a macro function as
  1009.           follows:   &<var>,  text&<var>.  This allows the simulation of  arrays
  1010.           with  the  second  syntax.  This will apply for  both  evaluation  and
  1011.           assignment of variables and fields.
  1012.  
  1013. Example   To macro substitute a variable name:
  1014.  
  1015.           x = "hello"
  1016.           hello = 10
  1017.           ? x
  1018.           hello
  1019.           ? &x
  1020.           10
  1021.  
  1022.           To macro substitute a file name:
  1023.  
  1024.           x = "customer.dbf"
  1025.           use &x                    &&Opens customer.dbf
  1026.  
  1027. =
  1028. Function  Evaluates an expression
  1029.  
  1030. Syntax    = <expr>
  1031.  
  1032. Remarks   The  Equals  command  can be used to evaluate  an  expression  without
  1033.           assigning the value to a variable.  This is useful for functions  that
  1034.           have side effects such as LOCK(), PAGELEN().
  1035.  
  1036. Example   =PAGELEN(23)
  1037.  
  1038. ?|??
  1039. Function  ?|?? evaluates and displays the value of one or more expressions.
  1040.  
  1041. Syntax    ?|?? <expr list>
  1042.  
  1043. Remarks   The single question mark issues a carriage return and line feed before
  1044.           the  expression list is displayed.  The double question mark  displays
  1045.           at  the current cursor position.  The commas separating the expression
  1046.           list  output a single space in between expressions.  If an  expression
  1047.           consists of a single MEMO field identifier, then dB Online will output
  1048.           the memo contents word wrapped to the width set by SET MEMOWIDTH TO.
  1049.  
  1050. Example
  1051.           name = "John"
  1052.           ? "Hello there",name
  1053.           Hello there John
  1054.           ? "The date is "+ ctod(date())
  1055.           The date is 10/21/93
  1056.           ? 5+3*6
  1057.                23
  1058.  
  1059. See Also  @...SAY, TEXT...ENDTEXT, LIST, DISPLAY
  1060.  
  1061. @...CLEAR
  1062. Function  @...CLEAR is used to clear a rectangular area on the screen.
  1063.  
  1064. Syntax    @ <expN1> , <expN2> CLEAR [TO <expN3> , <expN4>] [COLOR <color>]
  1065.  
  1066. Remarks   dB Online will clear to the current background color the space defined
  1067.           by  the  4 expressions.  The line and row given by <expN1> and <expN2>
  1068.           become  the  top left corner, and <expN3>, <expN4> become  the  bottom
  1069.           right  corner.  If the second coordinates are not given then dB Online
  1070.           will clear to the bottom right corner of the display.
  1071.  
  1072.           If the COLOR clause is included, then the color will be changed before
  1073.           execution of the command.
  1074.  
  1075. See Also  @...TO, CLEAR
  1076.  
  1077. @...SAY...GET
  1078. Function  @...SAY..GET is used to create full screen input forms.   It  displays
  1079.           information at specific coordinates.
  1080.  
  1081. Syntax    @ <expN1> , <expN2>
  1082.               [SAY <expr>
  1083.                   [PICTURE <expC>]
  1084.                   [COLOR <color>]]
  1085.               [GET <var> | <field>
  1086.                   [PICTURE <expC>]
  1087.                   [RANGE <expr1> , <expr2>]
  1088.                   [MESSAGE <expC>]
  1089.                   [COLOR <color>]
  1090.                   [NOMODIFY]]
  1091.  
  1092. Remarks   The output begins at the row and column positions specified by <expN1>
  1093.           and <expN2>.  For a 23*80 terminal the row coordinate can range from 0
  1094.           to 22 and the column coordinate from 0 to 79.
  1095.  
  1096.           The  @...SAY command display information that you do not want to edit.
  1097.           The  value can be any valid dB Online expression.  The value of <expr>
  1098.           is evaluated and displayed at the row and column coordinates given.
  1099.  
  1100.           The  @...GET command displays and allows editing of data from existing
  1101.           memory variables and fields.  The READ command activates a full-screen
  1102.           editing mode which allows the editing of multiple GET fields.
  1103.  
  1104.           If  an  @...SAY...GET combination command is used, a single  space  is
  1105.           entered  between the display of the SAY expression and the  GET  input
  1106.           field.
  1107.  
  1108.           The  RANGE  option is used with numeric and date variables to  specify
  1109.           acceptable lower <expr1> and <expr2> lower bounds for input.  If  data
  1110.           is  entered outside the values specified by RANGE, dB Online will  not
  1111.           accept the input and request new data.
  1112.  
  1113.           The  MESSAGE clause character expression <expC> is displaayed  when  a
  1114.           text edxit region is selected.  The value of this character expression
  1115.           is displayed in the center of the last line.
  1116.  
  1117.           If the COLOR clause is included, then the color will be changed before
  1118.           execution of the command.
  1119.  
  1120.           By  including  the NOMODIFY clause, the field becomes read  only,  not
  1121.           allowing the user to alter its contents.
  1122.  
  1123.           The  PICTURE  option  allows formatting of the output  expression  and
  1124.           restricts  the type of data that may be entered into a variable.   The
  1125.           <expC>   is  called  a PICTURE clause and may consist  of  a  function
  1126.           and/or a template.
  1127.  
  1128.           If  a  PICTURE  function  is  used, the @ symbol  must  be  the  first
  1129.           character in the clause.  If a PICTURE function is used with a picture
  1130.           template, a space must separate the two.
  1131.  
  1132.           dB Online provides the following PICTURE functions:
  1133.  
  1134.            Symbol   Valid withDescription
  1135.                        type
  1136.               C      NUMERIC  Display CR after a positive number.  (SAY only)
  1137.               X      NUMERIC  Display DB after a negative number. (SAY only)
  1138.               (      NUMERIC  Enclose negative number in parentheses. (SAY only)
  1139.               B      NUMERIC  Left justifies numeric data.  (SAY only)
  1140.               Z      NUMERIC  Displays zero numeric value as a blank string. (SAY
  1141.                               only)
  1142.               D        DATE   Use {MM/DD/YY} date format.
  1143.               E        DATE   Use {DD/MM/YY} date format.
  1144.               A     CHARACTER Allow only alphabetic characters. (GET only)
  1145.               !     CHARACTER Converts all letters to uppercase.
  1146.               R     CHARACTER Literal characters displayed in template, but not
  1147.                               entered in the field.
  1148.             S<n>    CHARACTER Limits field width to <n> characters.  GETs will
  1149.                               scroll horizontally to access whole field.  <n> must
  1150.                               be a literal positive integer.
  1151.  
  1152.           A  PICTURE  template  is  created by using a single  symbol  for  each
  1153.           character  to be displayed or input.  Any character may be  used,  but
  1154.           characters  other  than  the template symbols are  considered  literal
  1155.           characters.
  1156.  
  1157.           If  the R picture function is used for character input with a template
  1158.           containing  literal  characters, the literals are  inserted  into  the
  1159.           display and not stored as part of the GET variable.  If R is not used,
  1160.           the  literals  are  displayed  instead  of  the  corresponding  string
  1161.           character and are stored in the GET variable.
  1162.  
  1163.           For numeric variables, literal characters are always inserted into the
  1164.           display and not stored as part of the number.
  1165.  
  1166.           dB Online provides the following template symbols:
  1167.  
  1168.           Symbol  Description
  1169.              9    Allows digits for character and date input.  Allows digits and
  1170.                   signs for numeric data.
  1171.              #    Allows digits, blanks, and signs.
  1172.              A    Allows only alphabetic characters.
  1173.              L    Allows only logical characters:  t, T, f, F, y, Y, n, N.
  1174.              Y    Allows only logical characters:  y, Y, n, N.
  1175.              N    Allows alphanumeric characters.
  1176.              X    Allows any character.
  1177.              !    Converts letters to uppercase and does not affect other
  1178.                   characters
  1179.              $    Displays dollar signs in place of leading zeros for numeric data.
  1180.              *    Displays asterisks in place of leading zeros for numeric data.
  1181.              .    Specifies the decimal position for numeric data
  1182.              ,    Displays if there are digits to the left of the comma for numeric
  1183.                   data.
  1184.  
  1185.           If  a  PICTURE template is used to GET a decimal number,  the  decimal
  1186.           point must be included in the template.
  1187.  
  1188. Example   The following code provides examples of the @...SAY PICTURE command:
  1189.  
  1190.           name = "John Smith"
  1191.           @ 1,0 SAY name
  1192.           John Smith
  1193.           @ 2,0 SAY name PICTURE '@!'
  1194.           JOHN SMITH
  1195.           num1 = 456789
  1196.           num2 = 23.78
  1197.           num3 = -9.25
  1198.           @ 3,0 SAY num1
  1199.           456789
  1200.           @ 4,0 SAY num1 PICTURE '$$$,$$$,$$$'
  1201.           $$$$456,789
  1202.           @ 5,0 SAY num2 PICTURE '***,***.***'
  1203.           *****23,780
  1204.           @ 6,0 SAY num3 PICTURE "@X ***,***.**'
  1205.           ******9.25 DB
  1206.  
  1207. See Also  ?|??,  APPEND BLANK, CLEAR, CLEAR GETS, COL(), READ, ROW(),  SET BELL,
  1208.           SET CONFIRM, SET DELIMITERS, SET INTENSITY, TEXT...ENDTEXT
  1209.  
  1210. @ ... EDIT
  1211. Function  This  command creates a rectangular text editing region for editing  a
  1212.           memo variable.
  1213.  
  1214. Syntax    @ <expN1>, <expN2> EDIT <memovar>
  1215.               [SIZE <expN3>, <expN4>]
  1216.               [MESSAGE <expC>]
  1217.               [NOMODIFY]
  1218.               [COLOR <color>]
  1219.               [TAB]]
  1220.  
  1221. Remarks   If  you do not supply a SIZE clause, then this command behaves exactly
  1222.           like a @ ... GET command.
  1223.  
  1224.           The  MESSAGE clause character expression <expC> is displaayed  when  a
  1225.           text edxit region is selected.  The value of this character expression
  1226.           is displayed in the center of the last line.
  1227.  
  1228.           By  including a NOMODIFY clause, the user is not allowed to  edit  the
  1229.           contents of the memo variable.
  1230.  
  1231.           If the COLOR clause is included, then the color will be changed before
  1232.           execution of the command.
  1233.  
  1234.           Inclusing  the TAB clause causes the Tab key to be inserted  into  the
  1235.           text,  instead of jumping to the next editing region.  The  user  must
  1236.           then  press  CT  to  save their changes and move to the  next  editing
  1237.           region.
  1238.  
  1239. See Also  @...GET
  1240.  
  1241. @... PROMPT
  1242. Function  Creates a menu bar
  1243.  
  1244. Syntax    @ <expN1>,<expN2> PROMPT <expC1> [MESSAGE <expC2>] [COLOR <color>]
  1245.  
  1246. Remarks   This  statement will allow the building a menus.  These menus are read
  1247.           with the MENU TO statement.
  1248.  
  1249.           If the COLOR clause is included, then the color will be changed before
  1250.           execution of the command.
  1251.  
  1252. See Also  MENU TO
  1253.  
  1254. @...TO
  1255. Function  @...TO is used to draw a box with single or double lines.
  1256.  
  1257. Syntax    @ <expN1>,<expN2> TO <expN3>,<expN4> [DOUBLE] [COLOR <color>]
  1258.  
  1259. Remarks   The row and column of the top left corner of the box are specified  by
  1260.           <expN1> and <expN2>.  The bottom right corner are specified by <expN3>
  1261.           and  <expN4>.  If both row coordinates are the same, a horizontal line
  1262.           is  drawn.  If the column coordinates are the same, a vertical line is
  1263.           drawn.
  1264.  
  1265.           The  DOUBLE  option  draws a double line box instead  of  the  default
  1266.           single line box.
  1267.  
  1268.           If the COLOR clause is included, then the color will be changed before
  1269.           execution of the command.
  1270.  
  1271. See Also  @...CLEAR
  1272.  
  1273. ABS()
  1274. Function  The ABS() function returns the absolute value of a numeric expression.
  1275.  
  1276. Syntax    ABS(<expN>)
  1277.  
  1278. Returns   NUMERIC
  1279.  
  1280. Example
  1281.           ? ABS(3)
  1282.           3
  1283.           ? ABS(-3)
  1284.           3
  1285.  
  1286. ACCEPT
  1287. Function  ACCEPT allows character input into a memory variable.
  1288.  
  1289. Syntax    ACCEPT [<expC>] TO <var>
  1290.  
  1291. Remarks   ACCEPT  displays  the optional prompt <expC> before waiting  for  user
  1292.           input.  The character input is then placed into <var>.
  1293.  
  1294. Example   To input a users name:
  1295.  
  1296.           ACCEPT "Please input your name :" TO name
  1297.           ? name
  1298.  
  1299. See Also  @...SAY...GET, INPUT, WAIT
  1300.  
  1301. ACOPY()
  1302. Function  Copies elements from one array to another array
  1303.  
  1304. Syntax    ACOPY ( <array1> , <array2>  , <expN1> [ , <expN2> [ , <expN3> ] ] ] )
  1305.  
  1306. Returns   NUMERIC
  1307.  
  1308. Remarks   <array1> is the source array,
  1309.           <array2> is the destination array,
  1310.           <expN1> is the first element in the source array to be copied,
  1311.           <expN2> is the number of elements to copy,
  1312.           <expN3> is the first element in the destination array.
  1313.           ACOPY will return the number of elements copied.
  1314.  
  1315. See Also  ADEL(), AELEMENT(), AINS(), ASCAN(), ASORT(), DIMENSION
  1316.  
  1317. ADEL()
  1318. Function  Deletes an element, row or column from an array
  1319.  
  1320. Syntax    ADEL ( <array> , <expN1> [ , <expN2> ] )
  1321.  
  1322. Returns   NUMERIC
  1323.  
  1324. Remarks   <array> is the array,
  1325.           <expN1> is the element, row or column to delete.
  1326.           If <expN2> is equal to 2, then <expN1> represents a column.
  1327.           ADEL() returns 1 is successful.
  1328.           The last element, row or column is set to a logical .F.
  1329.  
  1330. See Also  ACOPY(), AELEMENT(), AINS(), ASCAN(), ASORT(), DIMENSION
  1331.  
  1332. ADIR()
  1333. Function  Retreives directory information into an array.
  1334.  
  1335. Syntax    ADIR ( <array> [ , <expC1> [ , <expC2> ] ] )
  1336.  
  1337. Returns   NUMERIC
  1338.  
  1339. Remarks   <array> is the array,
  1340.           <expC1> is the file and path wildcard,
  1341.           <expC2> specifies additional files to include.
  1342.  
  1343.           ADIR() returns the number of files found.
  1344.  
  1345.           ADIR() will automatically overwrite and redimension <array>.
  1346.  
  1347.           <expC2> can be one or more of the following:
  1348.  
  1349.                D       Subdirectories
  1350.                H       Hidden Files
  1351.                S       System Files
  1352.                V       Volume Label
  1353.  
  1354.           The following table describes what each column in the array contains:
  1355.  
  1356.             Column       File Information        Data Type
  1357.                1               Name              CHARACTER
  1358.                2               Size               NUMERIC
  1359.                3               Date                DATE
  1360.                4               Time              CHARACTER
  1361.                5            Attributes           CHARACTER
  1362.  
  1363.           The File Attributes may contain any of the following:
  1364.  
  1365.             Letter          Attribute
  1366.                A             Archive
  1367.                H             Hidden
  1368.                R            Read Only
  1369.                S             System
  1370.                D            Directory
  1371.                V          Volume Label
  1372.  
  1373. Example
  1374.           DECALRE array(5,5)
  1375.           =ADIR(array,ôc:\dbonline\*.exeö)
  1376.  
  1377. See Also  ACOPY(), ADEL(), AELEMENT(), AINS(), ASCAN(), ASORT(), DIMENSION
  1378.  
  1379. AELEMENT()
  1380. Function  Returns the number of an array element from the arrayÆs subscripts.
  1381.  
  1382. Syntax    AELEMENT ( <array> , <expN1> [ , <expN2> ] )
  1383.  
  1384. Returns   NUMERIC
  1385.  
  1386. Remarks   <expN1> is the row subscript,
  1387.           <expN2> is the column subscript.
  1388.  
  1389. Example
  1390.           DECLARE x(2,3)
  1391.           ? AELEMENT(x,1,3)
  1392.           3
  1393.           ? AELEMENT(x,2,3)
  1394.           6
  1395.  
  1396. See Also  ACOPY(),  ADEL(), ADIR(), AFIELDS(), AINS(), ALEN(), ASCAN(), ASORT(),
  1397.           ASUBSCRIPT(), DIMENSION
  1398.  
  1399. AFIELDS()
  1400. Function  Places the database structure into an array.
  1401.  
  1402. Syntax    AFIELDS( <array> )
  1403.  
  1404. Returns   NUMERIC
  1405.  
  1406. Remarks   AFIELDS() returns the number of fields placed into the array.
  1407.  
  1408.           The array is overwritten and redimensioned to fir all of the data.
  1409.  
  1410.           The following table describes what each column in the array contains:
  1411.  
  1412.           Column  Field Information     Data Type
  1413.             1     Name                  CHARACTER
  1414.             2     Type                  CHARACTER
  1415.             3     Length                NUMERIC
  1416.             4     Decimal Places        NUMERIC
  1417.  
  1418.           The Field Type is one of the following:
  1419.  
  1420.               Field Type     Description
  1421.                   C          CHARACTER
  1422.                   D          DATE
  1423.                   L          LOGICAL
  1424.                   M          MEMO
  1425.                   N          NUMERIC
  1426.  
  1427. See Also  ACOPY(),  DEL(), ADIR(), AELEMENT(), AINS(), ALEN(), ASCAN(), ASORT(),
  1428.           ASUBSCRIPT(), DIMENSION
  1429.  
  1430. AINS()
  1431. Function  Inserts an element, row or column from an array
  1432.  
  1433. Syntax    AINS ( <array> , <expN1> [ , <expN2> ] )
  1434.  
  1435. Returns   NUMERIC
  1436.  
  1437. Remarks   <array> is the array,
  1438.           <expN1> is the element, row or column to insert.
  1439.           If <expN2> is equal to 2, then <expN1> represents a column.
  1440.           ADEL() returns 1 is successful.
  1441.           The inserted element, row or column is set to a logical .F.
  1442.  
  1443. See Also  ACOPY(), ADEL(), AELEMENT(), ASCAN(), ASORT(), DIMENSION
  1444.  
  1445. ALEN()
  1446. Function  Returns the number of elements, rows or columns in an array.
  1447.  
  1448. Syntax    ALEN ( <array> [ , <expN> ] )
  1449.  
  1450. Returns   NUMERIC
  1451.  
  1452. Remarks   What is returned depends on the value of <expN>;
  1453.  
  1454.            <expN>       What is Returned
  1455.               0      the number of elements
  1456.               1        the number of rows
  1457.               2       the number of columns
  1458.  
  1459. Example
  1460.           DECLARE x(3,7)
  1461.           ? ALEN(x)
  1462.           21
  1463.           ? ALEN(x,1)
  1464.           3
  1465.           ? ALEN(x,2)
  1466.           7
  1467.  
  1468. See Also  ACOPY(),   ADEL(),   ADIR(),  AFIELDS(),  AINS(),  ASCAN(),   ASORT(),
  1469.           ASUBSCRIPT(), DIMENSION
  1470.  
  1471. APPEND BLANK
  1472. Function  APPEND  BLANK allows a new record to be added to the end of the active
  1473.           database file.
  1474.  
  1475. Syntax    APPEND BLANK
  1476.  
  1477. Remarks   The  new  record  is blank and becomes the current record.   Any  open
  1478.           index files are updated with the new record information.
  1479.  
  1480.           This command cannot be used with read only files.
  1481.  
  1482. ASC()
  1483. Function  The ASC() function returns the ASCII value of the first character in a
  1484.           character expression.
  1485.  
  1486. Syntax    ASC(<expC>)
  1487.  
  1488. Returns   NUMERIC
  1489.  
  1490. Remarks   Returns the ASCII value of the first character in <expC> in the  range
  1491.           0 to 255.  If  the length of <expC> is 0 then ASC() returns 0.
  1492.  
  1493. Example
  1494.           ? ASC('A')
  1495.           65
  1496.           ? ASC("Hello")
  1497.           72
  1498.  
  1499. See Also  CHR()
  1500.  
  1501. ASCAN()
  1502. Function  Searches an array for an expression.
  1503.  
  1504. Syntax    ASCAN ( <array> , <expr> [ , <expN1> [ , <expN2> ] ] )
  1505.  
  1506. Returns   NUMERIC
  1507.  
  1508. Remarks   <array> is the array to search,
  1509.           <expr> is the expression to search for,
  1510.           <expN1> is the element to begin the search at,
  1511.           <expN2> is the number of elements to search.
  1512.  
  1513.           ASCAN() returns 0 if not match exists.
  1514.  
  1515. Example
  1516.           =ASCAN(x,öJOE BROWNö)
  1517.  
  1518. See Also  ACOPY(),  ADEL(),  ADIR(), AFIELDS(), AINS(),  ASORT(),  ASUBSCRIPT(),
  1519.           DIMENSION
  1520.  
  1521. ASORT()
  1522. Function  Sorts elements in an array.
  1523.  
  1524. Syntax    ASORT ( <array> [ , <expN1> [ , <expN2> [ , <expN3> ] ] )
  1525.  
  1526. Returns   NUMERIC
  1527.  
  1528. Remarks   <array> is the array to sort,
  1529.           <expN1> is the element or row to begin the sort at,
  1530.           <expN2> is the column to begin the sort at,
  1531.           <expN3> if the sort order; 0 for ascending, 1 for descending.
  1532.  
  1533.           ASCAN() returns 1 if successful.
  1534.  
  1535. See Also  ACOPY(),  ADEL(),  ADIR(), AFIELDS(), AINS(),  ASCAN(),  ASUBSCRIPT(),
  1536.           DIMENSION
  1537.  
  1538. ASUBSCRIPT()
  1539. Function  Return  the  row or column subscript on an element from the  elementÆs
  1540.           number.
  1541.  
  1542. Syntax    ASUBSCRIPT ( <array> , <expN1> , <expN2> )
  1543.  
  1544. Returns   NUMERIC
  1545.  
  1546. Remarks   <array> is an array,
  1547.           <expN1> is the element number,
  1548.           If <expN2> is 1, then ASUBSCRIPT() returns the row subscript,
  1549.           if <expN2> is 2, then ASUBSCRIPT() returns the column subscript.
  1550.  
  1551. See Also  ACOPY(), ADEL(), ADIR(), AFIELDS(), AINS(), ASCAN(), DIMENSION
  1552.  
  1553. AT()
  1554. Function  The  AT() function returns the starting position of a character string
  1555.           within a second string.
  1556.  
  1557. Syntax    AT(<expC1>,<expC2>)
  1558.  
  1559. Returns   NUMERIC
  1560.  
  1561. Remarks   Returns  the  character offset in <expC1> where <expC2> is  contained.
  1562.           If <expC2> is not contained then 0 is returned.
  1563.  
  1564. Example
  1565.           ? AT("Hi there John","there")
  1566.           4
  1567.  
  1568.           WAIT TO x
  1569.           responses = "123456"
  1570.           IF AT(responses,x) =0
  1571.             ?"Invalid Choice"
  1572.           ENDIF
  1573.  
  1574. See Also  SUBSTR()
  1575.  
  1576. AVERAGE
  1577. Function  AVERAGE calculates the arithmetic mean of numeric expressions  in  the
  1578.           active database file.
  1579.  
  1580. Syntax    AVERAGE [<scope>] <expr list> TO <var list>
  1581.               [WHILE <expL1>]
  1582.               [FOR <expL2>]
  1583.  
  1584. Remarks   All  records in the current database are averaged unless specified  by
  1585.           the  <scope>,  WHILE,  or  FOR clauses.  The <expr  list>  items  must
  1586.           correspond to the memory variables in <var list>.
  1587.  
  1588. Example   To AVERAGE the cost filed for all of John Smiths sales
  1589.  
  1590.           USE sales
  1591.           AVERAGE cost TO av_cost FOR salesman = "JS"
  1592.           ? av_cost
  1593.  
  1594. See Also  COUNT, SUM
  1595.  
  1596. BAUD()
  1597. Function  The BAUD() function returns the baud the user connected at.
  1598.  
  1599. Syntax    BAUD()
  1600.  
  1601. Returns   NUMERIC
  1602.  
  1603. Remarks   If the user is connected locally, then BAUD() returns zero.
  1604.  
  1605. Valid With      pcboard.sys,  exitinfo.bbs, door.sys,  dorinfox.def,  chain.txt,
  1606.           callinfo.bbs
  1607.  
  1608. See Also  COMMPORT(), DTE()
  1609.  
  1610. BBSNAME()
  1611. Function  The BBSNAME() function returns the name of the calling BBS.
  1612.  
  1613. Syntax    BBSNAME()
  1614.  
  1615. Returns   CHARACTER
  1616.  
  1617. Valid With     chain.txt, dorinfox.def
  1618.  
  1619. BOF()
  1620. Function  The  BOF()  function indicates the beginning of the  current  database
  1621.           file.
  1622.  
  1623. Syntax    BOF()
  1624.  
  1625. Returns   LOGICAL
  1626.  
  1627. Remarks   Returns  a  logical True (.T.) when an attempt is  made  to  move  the
  1628.           record pointer before the first logical record of the current database
  1629.           file.
  1630.  
  1631. Example
  1632.           USE customer
  1633.           ? BOF()
  1634.           .F.
  1635.           SKIP -1
  1636.           ? BOF()
  1637.           .T.
  1638.  
  1639. See Also  EOF()
  1640.  
  1641. CANCEL
  1642. Function  CANCEL  stops  the  execution of the current dB  Online  session.   dB
  1643.           Online  will  close all files and return to the calling  program  (BBS
  1644.           etc.)
  1645.  
  1646. Syntax    CANCEL
  1647.  
  1648. Remarks   CANCEL will return a 0 to the DOS errorlevel.
  1649.  
  1650. See Also  QUIT, RETURN
  1651.  
  1652. CBLOCK()
  1653. Function  Stops remote end from sending data.
  1654.  
  1655. Syntax    CBLOCK( <expN1> , <expN2> )
  1656.  
  1657. Returns   LOGICAL
  1658.  
  1659. Remarks   <expN1> is a communications handle returned by COPEN(),
  1660.           <expN2> can be either 1 to set the port into hard blocking state, or 0
  1661.           to clear that port.
  1662.  
  1663.           CBLOCK() will return .T. if successful.
  1664.  
  1665. See Also  COPEN(), CCLOSE()
  1666.  
  1667. CBREAK()
  1668. Function  Send a break signal to a port.
  1669.  
  1670. Syntax    CBREAK( <expN1> [ , <expN2> ] )
  1671.  
  1672. Returns   LOGICAL
  1673.  
  1674. Remarks   <expN1> is a communications handle returned by COPEN(),
  1675.           <expN2>  is  the  number of milliseconds allowed to  elapse  before  a
  1676.           timeout.
  1677.  
  1678.           CBREAK() will return .T. if successful.
  1679.  
  1680. See Also  COPEN(), CCLOSE()
  1681.  
  1682. CCD()
  1683. Function  Returns the state of Carrier Detect (CD).
  1684.  
  1685. Syntax    CCD( <expN> )
  1686.  
  1687. Returns   LOGICAL
  1688.  
  1689. Remarks   <expN> is a communications handle returned by COPEN()
  1690.  
  1691.           CCD() will return .T. if Carrier Detect is on.
  1692.  
  1693. See Also  COPEN(), CCLOSE()
  1694.  
  1695. CCLOSE()
  1696. Function  Closes a specified communications port.
  1697.  
  1698. Syntax    CCLOSE( <expN> )
  1699.  
  1700. Returns   LOGICAL
  1701.  
  1702. Remarks   <expN> is a communications handle returned by COPEN()
  1703.  
  1704.           CCLOSE() will return .T. if successful.
  1705.  
  1706. See Also  COPEN()
  1707.  
  1708. CCTS()
  1709. Function  Returns the state of Clear To Send (CTS).
  1710.  
  1711. Syntax    CCTS( <expN> )
  1712.  
  1713. Returns   LOGICAL
  1714.  
  1715. Remarks   <expN> is a communications handle returned by COPEN()
  1716.  
  1717.           CCTS() will return .T. if CTS is on.
  1718.  
  1719. See Also  COPEN(), CCLOSE()
  1720.  
  1721. CDOW()
  1722. Function  The  CDOW() function returns the character name of the day of the week
  1723.           from a date expression.
  1724.  
  1725. Syntax    CDOW(<expD>)
  1726.  
  1727. Returns   CHARACTER
  1728.  
  1729. Example   If the system date = 10/21/93
  1730.  
  1731.           ? CDOW(DATE())
  1732.           Thursday
  1733.           ? CDOW(DATE()+1)
  1734.           Friday
  1735.  
  1736. See Also  DAY(), DOW()
  1737.  
  1738. CDSR()
  1739. Function  Returns the state of Data Set Ready (DSR).
  1740.  
  1741. Syntax    CDSR( <expN> )
  1742.  
  1743. Returns   LOGICAL
  1744.  
  1745. Remarks   <expN> is a communications handle returned by COPEN()
  1746.  
  1747.           CCD() will return .T. if DSR is on.
  1748.  
  1749. See Also  COPEN(), CCLOSE()
  1750.  
  1751. CDTRSET()
  1752. Function  Set DTR on or off for a communications port.
  1753.  
  1754. Syntax    CDTRSET( <expN1> , <expN2> )
  1755.  
  1756. Returns   LOGICAL
  1757.  
  1758. Remarks   <expN1> is a communications handle returned by COPEN()
  1759.           <expN2> is 1 to set DTR, 0 to clear it.
  1760.  
  1761.           CDTRSET() will return .T. if successful.
  1762.  
  1763.           If  the  line  is  being used for flow control  such  as  XON/XOFF  or
  1764.           RTS/CTS,  it  may  cause  unpredidictable results.   Dropping  DTR  is
  1765.           frequently used as a way yo hang up a modem.
  1766.  
  1767. See Also  COPEN(), CCLOSE()
  1768.  
  1769. CDX()
  1770. Function  The CDX() function returns the filename for the active index files  in
  1771.           a work area.
  1772.  
  1773. Syntax    CDX(<expN1> [ ,<expN2> | <alias>])
  1774.  
  1775. Returns   CHARACTER
  1776.  
  1777. Remarks   Returns the filename of an open .cdx file in a work area.  <expN1>  is
  1778.           the  .cdx  file position in the index file list specified by  the  SET
  1779.           INDEX TO <file list>, or USE INDEX <file list> commands.  The optional
  1780.           second parameter returns .cdx files for other work areas.
  1781.  
  1782. Example
  1783.           USE customer INDEX name.cdx, phone.cdx
  1784.           ? CDX(1)
  1785.           c:name.cdx
  1786.           ? CDX(2)
  1787.           c:phone.cdx
  1788.  
  1789. See Also  NDX(), MDX()
  1790.  
  1791. CERROR()
  1792. Function  Returns the last error on the specified communications port.
  1793.  
  1794. Syntax    CERROR( <expN1> [ , <expN2> ] )
  1795.  
  1796. Returns   NUMERIC
  1797.  
  1798. Remarks   <expN1> is a communications handle returned by COPEN()
  1799.           If you include <expN2>, then the error status will be cleared.
  1800.  
  1801.             Error                            Description
  1802.            Number
  1803.               0     No error.
  1804.              -1     General error, non-specific.
  1805.              -2     Specified port is invalid or not open.
  1806.              -3     Cannot open a port that is already open.
  1807.              -5     Out of memory.
  1808.              -6     Requested port has not being initialized or opened.
  1809.              -7     One or more parameters are invalid.
  1810.              -8     Receive buffer empty.
  1811.              -9     Transfer buffer full.
  1812.              -10    Timeout.
  1813.              -11    CTS was expected but not asserted.
  1814.              -12    CD was expected but not asserted.
  1815.              -13    DSR was expected but not asserted.
  1816.              -14    No 8250 family UART at the requested location.
  1817.              -16    Local pressing of <Esc> during a file transfer.
  1818.              -20    Attempt  to  open  multiple ports on shared  interrupt  board
  1819.                     using different interrupt lines conflict.
  1820.              -25    Baud rate is not legal.
  1821.              -27    Word length not legal.
  1822.              -28    Number of stop bits not legal.
  1823.              -30    Driver software not detected. (DigiBOARD or Arnet)
  1824.              -31    Buffer overflow.
  1825.              -34    Attempt to initialize on multi-port board using wrong number.
  1826.              -35    Multi-port board is in use.
  1827.  
  1828. See Also  COPEN(), CCLOSE()
  1829.  
  1830. CGETS()
  1831. Function  Returns a character string from a communications port.
  1832.  
  1833. Syntax    CGETS( <expN1> [ , <expN2> ] )
  1834.  
  1835. Returns   CHARACTER
  1836.  
  1837. Remarks   <expN1> is a communications handle returned by COPEN()
  1838.           <expN2> is the maximun number of characters to read.
  1839.  
  1840.           Use this function to read in a line of characters from a port.
  1841.  
  1842. See Also  COPEN(), CCLOSE()
  1843.  
  1844. CHANDSHAKING()
  1845. Function  Enable or disable handshaking on a port.
  1846.  
  1847. Syntax    CHANDSHAKING( <expN1>  , <expN2> , <expN3>  )
  1848.  
  1849. Returns   LOGICAL
  1850.  
  1851. Remarks   <expN1> is a communications handle returned by COPEN()
  1852.           <expN2> is the type of handshaking to enable or disable.
  1853.  
  1854.            <expN2>   Type of handshaking
  1855.               0            DTR/DSR
  1856.               1            RTS/CTS
  1857.               2            XON/XOFF
  1858.  
  1859.           If  <expN3>  is 1, then handshaking will be enabled, else it  will  be
  1860.           disabled.
  1861.  
  1862.           This function will return .T. is successful.
  1863.  
  1864. See Also  COPEN(), CCLOSE()
  1865.  
  1866. CHR()
  1867. Function  The  CHR()  function returns the character corresponding to  an  ASCII
  1868.           code value.
  1869.  
  1870. Syntax    CHR(<expN>)
  1871.  
  1872. Returns   CHARACTER
  1873.  
  1874. Remarks   Returns a single character corresponding to the ASCII value of <expN>.
  1875.           If <expN> is 0 then CHR() returns an empty string.
  1876.  
  1877. Example
  1878.           ? CHR(65)
  1879.           A
  1880.           ? CHR(72)+CHR(105)
  1881.           Hi
  1882.  
  1883. See Also  ASC(), INKEY()
  1884.  
  1885. CITY()
  1886. Function  The CITY() function returns the user's city and state or province.
  1887.  
  1888. Syntax    CITY()
  1889.  
  1890. Returns   CHARACTER
  1891.  
  1892. Valid With     exitinfo.bbs, door.sys, dorinfo1.def, users.sys, callinfo.bbs
  1893.  
  1894. CLEAR
  1895. Function  CLEAR  erases both the local and remote screens.  It also  clears  all
  1896.           pending GET's.
  1897.  
  1898. Syntax    CLEAR
  1899.  
  1900. Remarks   The  cursor  is positioned at the top left hand corner of  the  screen
  1901.           after execution.
  1902.  
  1903. See Also  @...CLEAR, CLEAR GETS
  1904.  
  1905. CLEAR ALL
  1906. Function  CLEAR  ALL closes all open database files, index file, and memo files,
  1907.           and selects work area 1.
  1908.  
  1909. Syntax    CLEAR ALL
  1910.  
  1911. Remarks   Memory variables are not cleared as in dBASE III+
  1912.  
  1913. See Also  CLOSE
  1914.  
  1915. CLEAR GETS
  1916. Function  CLEAR GETS releases all pending @...GET commands issued.
  1917.  
  1918. Syntax    CLEAR GETS
  1919.  
  1920. See Also  @...SAY...GET, CLEAR
  1921.  
  1922. CLEAR TYPEAHEAD
  1923. Function  CLEAR TYPEAHEAD empties the type-ahead buffer.
  1924.  
  1925. Syntax    CLEAR TYPEAHEAD
  1926.  
  1927. Remarks   CLEAR TYPEAHEAD will only clear characters that have been received  by
  1928.           the  local  modem.   There  can  be  significant  delay  in  receiving
  1929.           characters from a remote terminal and CLEAR TYPEAHEAD will  not  clear
  1930.           characters in transit.
  1931.  
  1932. CLOSE
  1933. Function  CLOSE is used to close various file types.
  1934.  
  1935. Syntax    CLOSE ALL|ALTERNATE|DATABASES|INDEX
  1936.  
  1937. Remarks   CLOSE   ALTERNATE  will  close  the  current  alternate  file.   CLOSE
  1938.           DATABASES  will  close all database, index and memo files  and  select
  1939.           work  area  1.  CLOSE INDEX will close all index files in the  current
  1940.           work area.  CLOSE ALL will close all the above file types.
  1941.  
  1942. See Also  CLEAR ALL, RETURN, SET ALTERNATE TO, USE
  1943.  
  1944. CMONTH()
  1945. Function  The  CMONTH() function returns the character name of the month from  a
  1946.           date expression.
  1947.  
  1948. Syntax    CMONTH(<expD>)
  1949.  
  1950. Returns   CHARACTER
  1951.  
  1952. Example   Assume the date is 10/21/93
  1953.  
  1954.           ?  CMONTH(DATE())
  1955.           October
  1956.  
  1957. See Also  MONTH()
  1958.  
  1959. COL()
  1960. Function  The  COL() function returns the current column position on the  remote
  1961.           and local screens.
  1962.  
  1963. Syntax    COL()
  1964.  
  1965. Returns   NUMERIC
  1966.  
  1967. Remarks   Returns current column position from 0 to 79.
  1968.  
  1969. Example
  1970.           ? "Hello"
  1971.           ? col()
  1972.           5
  1973.  
  1974. See Also  @...SAY...GET, ROW()
  1975.  
  1976. COMMPORT()
  1977. Function  The  COMMPORT() function returns a numeric value corresponding to  the
  1978.           comm port connection.
  1979.  
  1980. Syntax    COMMPORT()
  1981.  
  1982. Returns   NUMERIC
  1983.  
  1984. Remarks   If the user is connected locally, then COMMPORT() will return zero.
  1985.  
  1986. Valid With     pcboard.sys, door.sys, dorinfo1.def, chain.txt, callinfo.bbs
  1987.  
  1988. See Also  BAUD(), DTE(), ISLOCAL()
  1989.  
  1990. CONFERENCE()
  1991. Function  The  CONFERENCE()  function returns the number of the   conference  or
  1992.           area the user was in before calling the dB Online door.
  1993.  
  1994. Syntax    CONFERENCE()
  1995.  
  1996. Returns   NUMERIC
  1997.  
  1998. Valid With     pcboard.sys, door.sys
  1999.  
  2000. See Also  NODE()
  2001.  
  2002. CONTINUE
  2003. Function  CONTINUE searches for the next record in current database as specified
  2004.           by the conditions of the most recent LOCATE command.
  2005.  
  2006. Syntax    CONTINUE
  2007.  
  2008. Remarks   See the LOCATE command for details
  2009.  
  2010. See Also  FOUND(), LOCATE, SEEK
  2011.  
  2012. COPEN()
  2013. Function  Opens a communications port.
  2014.  
  2015. Syntax    COPEN ( <expN1> , <expN2> , <expN3> [ , <expC> [ , <expN4> [ , <expN5>
  2016.           ] ] ] )
  2017.  
  2018. Returns   NUMERIC
  2019.  
  2020. Remarks   <expN1> is the type of driver to be used for the open;
  2021.  
  2022.             <expN1>    Driver
  2023.                1       BIOS/Interrupt 14
  2024.                2       Fast & Direct
  2025.                3       FOSSIL
  2026.                4       Smart Arnet
  2027.                5       Smart DigiBoard
  2028.  
  2029.           <expN2> is a communications port (1 .. 16)
  2030.           <expN3> is the baud rate (110 ... 115200)
  2031.           <expC> is the parity;
  2032.  
  2033.             <expC>         Parity
  2034.              æNÆ            None
  2035.              æOÆ            Odd
  2036.              æEÆ            Even
  2037.              æSÆ           Space
  2038.              æMÆ            Mark
  2039.  
  2040.           <expN4> is the databits (8 or 7),
  2041.           <expN5> is the stop bits (0 or 1).
  2042.  
  2043.           You may open only 8 ports and you may not reopen the port that you are
  2044.           currently operating in.
  2045.  
  2046. See Also  CCLOSE()
  2047.  
  2048. COUNT
  2049. Function  COUNT  calculates the number of records in the current  database  that
  2050.           match specified conditions.
  2051.  
  2052. Syntax    COUNT [<scope>]
  2053.               [WHILE <expL1>]
  2054.               [FOR <expL2>]  TO  <var>
  2055.  
  2056. Remarks   All  records  in the current database are counted unless specified  by
  2057.           the <scope>, WHILE, or FOR clauses.
  2058.  
  2059. Example   To count all your Ontario customers
  2060.  
  2061.           USE customer
  2062.           COUNT  FOR province = "ON" to number
  2063.           ? number
  2064.  
  2065. See Also  AVERAGE, SUM
  2066.  
  2067. CPEEKCHAR()
  2068. Function  Returns a character from a communications port.
  2069.  
  2070. Syntax    CGETS( <expN> )
  2071.  
  2072. Returns   CHARACTER
  2073.  
  2074. Remarks   <expN1> is a communications handle returned by COPEN()
  2075.  
  2076. See Also  COPEN(), CCLOSE()
  2077.  
  2078. CPORT()
  2079. Function  Returns the communications handle of the port used.
  2080.  
  2081. Syntax    CPORT( )
  2082.  
  2083. Returns   NUMERIC
  2084.  
  2085. Remarks   You  may  use  the  returned  value in any function  that  requires  a
  2086.           communication handle otherwise obtained from COPEN().
  2087.  
  2088.           You should not close this port using the CCLOSE() function.
  2089.  
  2090. See Also  COPEN(), CCLOSE()
  2091.  
  2092. CPUTS()
  2093. Function  Sends out a character string to a communications port.
  2094.  
  2095. Syntax    CPUTS( <expN1> , <expC> [ , <expN2> ] )
  2096.  
  2097. Returns   NUMERIC
  2098.  
  2099. Remarks   <expN1> is the communications handle returned by COPEN(),
  2100.           <expC> is the string to send,
  2101.           <expN2> is the number of characters to send.
  2102.  
  2103.           A carriage return and line feed is appended and sent with the string.
  2104.  
  2105.           CPUTS() will return the number of characters sent.
  2106.  
  2107. See Also  COPEN(), CCLOSE()
  2108.  
  2109. CRC16()
  2110. Function  Returns the 16-bit CRC of a character string
  2111.  
  2112. Syntax    CRC16( <expC> , <expN>)
  2113.  
  2114. Returns   NUMERIC
  2115.  
  2116. Remarks   This  functions computes the CCITT (ITI) Cyclic Redundancy Check  word
  2117.           supporting the polynomial X^16+X^12+X^5+1.
  2118.  
  2119.           <expN> is the starting value.  This is usually -1 or 0.
  2120.  
  2121. See Also  CRC32()
  2122.  
  2123. CRC32()
  2124. Function  Returns the 32-bit CRC of a character string
  2125.  
  2126. Syntax    CRC32( <expC> , <expN> )
  2127.  
  2128. Returns   NUMERIC
  2129.  
  2130. Remarks   This  functions computes the CCITT (ITI) Cyclic Redundancy Check  word
  2131.           supporting the polynomial X^16 + X^15 + X^14 + X^13 + X^12  +  X^11  +
  2132.           X^10 + X^9 + X^8 + X^7 + X^6 + X^5 + X^4 + X^3 + X^2 + X^1 + X^0.
  2133.  
  2134.           <expN> is the starting value.  This is usually -1 or 0.
  2135.  
  2136. See Also  CRC16()
  2137.  
  2138. CREAD()
  2139. Function  Reads a series of characters from a communications port.
  2140.  
  2141. Syntax    CREAD( <expN1> , <expN2> [ , <expN3> ] )
  2142.  
  2143. Returns   CHARACTER
  2144.  
  2145. Remarks   <expN1> is the communications handle returned by COPEN(),
  2146.           <expN2> is the number of characters to send,
  2147.           <expN3> is the optional timeout in milliseconds.
  2148.  
  2149.           If you do not use a timeout, this function returns immediately.
  2150.  
  2151. See Also  COPEN(), CCLOSE(), CGETS(), CWRITE()
  2152.  
  2153. CRING()
  2154. Function  Returns whether or not a ring has been detected since the last CRING()
  2155.           function call.
  2156.  
  2157. Syntax    CRING ( <expN> )
  2158.  
  2159. Returns   LOGICAL
  2160.  
  2161. Remarks   <expN> is the communications handle returned by COPEN().
  2162.  
  2163. See Also  COPEN(), CCLOSE()
  2164.  
  2165. CRTSSET()
  2166. Function  Set RTS on or off for a communications port.
  2167.  
  2168. Syntax    CRTSSET( <expN1> , <expN2> )
  2169.  
  2170. Returns   LOGICAL
  2171.  
  2172. Remarks   <expN1> is a communications handle returned by COPEN()
  2173.           <expN2> is 1 to set RTS, 0 to clear it.
  2174.  
  2175.           CRTSSET() will return .T. if successful.
  2176.  
  2177.           If  the  line  is  being used for flow control  such  as  XON/XOFF  or
  2178.           DTR/DTS, it may cause unpredidictable results
  2179.  
  2180. See Also  COPEN(), CCLOSE()
  2181.  
  2182. CRXCLEAR()
  2183. Function  Clears the receive buffer for a communications port.
  2184.  
  2185. Syntax    CRXCLEAR( <expN> )
  2186.  
  2187. Returns   LOGICAL
  2188.  
  2189. Remarks   <expN> is a communications handle returned by COPEN().
  2190.  
  2191.           This function returns .T. if successful.
  2192.  
  2193. See Also  COPEN(), CCLOSE()
  2194.  
  2195. CSETPORT()
  2196. Function  Sets the parameters for a communications port.
  2197.  
  2198. Syntax    CSETPORT( <expN1> , <expN2> , <expC> , <expN3> , <expN4> )
  2199.  
  2200. Returns   LOGICAL
  2201.  
  2202. Remarks   <expN1> is a communications handle returned by COPEN(),
  2203.           <expN2> is the baud rate (110 ... 115200),
  2204.           <expC> is the parity (æNÆ, æOÆ, æEÆ, æSÆ, æMÆ),
  2205.           <expN3> is the databits (8 or 7),
  2206.           <expN4> is the stopbits (0 or 1).
  2207.  
  2208.           This function returns .T. if successful.
  2209.  
  2210. See Also  COPEN(), CCLOSE()
  2211.  
  2212. CSTATUS()
  2213. Function  Returns the line status for a communications port.
  2214.  
  2215. Syntax    CSTATUS( <expN1> [ , <expN2> ] )
  2216.  
  2217. Returns   NUMERIC
  2218.  
  2219. Remarks   <expN1> is a communications handle returned by COPEN(),
  2220.           If <expN2> is non-zero, then the line status will be cleared.
  2221.  
  2222.           The return value is made up of any combinations of the following:
  2223.  
  2224.               Value     Description
  2225.                 2       Overrun error.
  2226.                 4       Parity error.
  2227.                 8       Framing error.
  2228.                16       Break signal detected.
  2229.                32       Transmitter holding register empty.
  2230.                64       Transmitter shift and holding registers empty.
  2231.  
  2232.  
  2233. See Also  COPEN(), CCLOSE()
  2234.  
  2235. CTOD()
  2236. Function  The CTOD() function converts a character expression to a date value.
  2237.  
  2238. Syntax    CTOD(<expC>) or
  2239.           {<date>}
  2240.  
  2241. Returns   DATE
  2242.  
  2243. Remarks   Returns  a  date value by converting <expC>.  The format of <expC>  is
  2244.           mm/dd/yy with SET CENTURY OFF, or mm/dd/ccyy with SET CENTURY ON.
  2245.  
  2246.           The {} structure allows for date literals.  The syntax is {mm/dd/yy}.
  2247.  
  2248. Example
  2249.           STORE CTOD('02/28/93') to test
  2250.           ? test
  2251.           02/28/93
  2252.           ? test + 5
  2253.           03/05/93
  2254.  
  2255. See Also  DTOC(), SET CENTURY
  2256.  
  2257. CTXCLEAR()
  2258. Function  Clears the transmit buffer for a communications port.
  2259.  
  2260. Syntax    CTXCLEAR( <expN> )
  2261.  
  2262. Returns   LOGICAL
  2263.  
  2264. Remarks   <expN> is a communications handle returned by COPEN().
  2265.  
  2266.           This function returns .T. if successful.
  2267.  
  2268. See Also  COPEN(), CCLOSE()
  2269.  
  2270. CWRITE()
  2271. Function  Writes a series of characters from a communications port.
  2272.  
  2273. Syntax    CWRITE( <expN1> , <expC> , <expN2> [ , <expN3> ] )
  2274.  
  2275. Returns   NUMERIC
  2276.  
  2277. Remarks   <expN1> is the communications handle returned by COPEN(),
  2278.           <expC> is the character string to be sent,
  2279.           <expN2> is the number of characters to send,
  2280.           <expN3> is the optional timeout in milliseconds.
  2281.  
  2282.           If you do not use a timeout, this function returns immediately.
  2283.  
  2284. See Also  COPEN(), CCLOSE(), CPUTS(), CREAD()
  2285.  
  2286. DATABITS()
  2287. Function  The  DATABITS() function returns the number of databits of the current
  2288.           communications port.
  2289.  
  2290. Syntax    DATABITS()
  2291.  
  2292. Returns   NUMERIC
  2293.  
  2294. Remarks   If  a  valid  BBS  drop  file does not exist, the DATABITS()  function
  2295.           returns a default value of 8.
  2296.  
  2297. Valid With     dorinfox.def, callinfo.bbs
  2298.  
  2299. See Also  PARITY(), STOPBITS()
  2300.  
  2301. DATAPHONE()
  2302. Function  The DATAPHONE() function returns the user's data phone number.
  2303.  
  2304. Syntax    DATAPHONE()
  2305.  
  2306. Returns   CHARACTER
  2307.  
  2308. Valid With     exitinfo.bbs, door.sys, users.sys, callinfo.bbs
  2309.  
  2310. See Also  VOICEPHONE()
  2311.  
  2312. DATE()
  2313. Function  The DATE() function returns the current system date.
  2314.  
  2315. Syntax    DATE()
  2316.  
  2317. Returns   DATE
  2318.  
  2319. Example    Assume the system date is 10/21/93
  2320.  
  2321.           ? DATE()
  2322.           10/21/93
  2323.  
  2324. See Also  DAY(), MONTH(), SET CENTURY, YEAR()
  2325.  
  2326. DAY()
  2327. Function  The  DAY()  function  returns  the  day  of  the  month  from  a  date
  2328.           expression.
  2329.  
  2330. Syntax    DAY(<expD>)
  2331.  
  2332. Returns   NUMERIC
  2333.  
  2334. Example   If the system date is 10/21/93
  2335.  
  2336.           ? DAY(DATE())
  2337.           21
  2338.  
  2339. See Also  DATE(), MONTH(), YEAR()
  2340.  
  2341. DBF()
  2342. Function  The DBF() function returns the filename of the database in the current
  2343.           work area.
  2344.  
  2345. Syntax    DBF()
  2346.  
  2347. Returns   CHARACTER
  2348.  
  2349. Remarks   Returns the full path used to specify the database in the current work
  2350.           area.
  2351.  
  2352. Example
  2353.           USE customer
  2354.           ? dbf()
  2355.           c:customer.dbf
  2356.  
  2357. See Also  CDX(), FIELD(), LUPDATE(), MDX(), NDX(), RECCOUNT(), RECSIZE()
  2358.  
  2359. DECLARE
  2360. Function  Declares one or more array variables.
  2361.  
  2362. Syntax    DECLARE <array> ( <expN1> [, <expN2>] )
  2363.               [, ...]
  2364.  
  2365. Remarks   DECLARE  is  identical  in operation to DIMENSION.   Please  See  that
  2366.           command for more information.
  2367.  
  2368. See Also  DIMENSION
  2369.  
  2370. DELETE
  2371. Function  DELETE marks records in the current database for deletion.
  2372.  
  2373. Syntax    DELETE [<scope>] [WHILE <expL>] [FOR <expL>]
  2374.  
  2375. Remarks   Unless  otherwise specified DELETE marks only the current  record  for
  2376.           deletion.
  2377.  
  2378.           DELETE cannot be used with read only files.
  2379.  
  2380. Example   USE customer
  2381.           ? DELETED()
  2382.           .F.
  2383.           DELETE
  2384.           ? DELETED()
  2385.           .T.
  2386.  
  2387. See Also  DELETED(), PACK, RECALL, SET DELETED
  2388.  
  2389. DELETED()
  2390. Function  The   DELETED()  function  identifies  records  that  are  marked  for
  2391.           deletion.
  2392.  
  2393. Syntax    DELETED()
  2394.  
  2395. Returns   LOGICAL
  2396.  
  2397. Remarks   Returns  True  (.T.) if the current record is marked for deletion,  if
  2398.           not, False (.F.) is returned.
  2399.  
  2400. Example
  2401.           USE customer
  2402.           ? DELETED()
  2403.           .F.
  2404.           DELETE
  2405.           ? DELETED()
  2406.           .T.
  2407.  
  2408. See Also  DELETE, PACK, RECALL, SET DELETED ON
  2409.  
  2410. DIMENSION
  2411. Function  Creates one or more array variables.
  2412.  
  2413. Syntax    DIMENSION <array> ( <expN1> [, <expN2>] )
  2414.               [, ...]
  2415.  
  2416. Remarks   If  a  variable  existed  by the same name  as  <array>,  then  it  is
  2417.           overwritten  and assigned the properties of an array.   If  the  older
  2418.           variable  is  an  array, then it is redimensioned,  and  its  original
  2419.           values are placed back into the new array.
  2420.  
  2421.           A new arrayÆs elements are always filled with .F. after its creation.
  2422.  
  2423.           If  you  include  <expN2>, then the array will  be  a  two-dimensional
  2424.           array, and will have <expN1> rows and <expN2> columns.
  2425.  
  2426. Example
  2427.           DIMENSION myarray(5)
  2428.           myarray(2)=3.5
  2429.           myarray(3)=ôHelloö
  2430.           ? myarray(3)
  2431.           Hello
  2432.           ? myarray(2)
  2433.           3.5
  2434.           ? myarray(1)
  2435.           .F.
  2436.  
  2437. See Also  DECLARE
  2438.  
  2439. DISKSPACE()
  2440. Function  The  DISKSPACE() function returns the number of bytes available on the
  2441.           default drive.
  2442.  
  2443. Syntax    DISKSPACE()
  2444.  
  2445. Returns   NUMERIC
  2446.  
  2447. See Also  GETENV(), OS(), VERSION()
  2448.  
  2449. DISPLAY
  2450. Function  DISPLAY is used to view the contents of the current database file.
  2451.  
  2452. Syntax    DISPLAY
  2453.               [OFF]
  2454.               [<scope>]
  2455.               [<expr list>]
  2456.               [WHILE <expL1>]
  2457.               [FOR <expL2>]
  2458.  
  2459. Remarks   The  current record is displayed unless otherwise specified  with  the
  2460.           <scope>, WHILE, or FOR expressions.
  2461.  
  2462.           If  <expr  list> is not specified then all fields are displayed.   The
  2463.           record number is displayed unless the OFF option is included.  A  memo
  2464.           field will be output in a word wrapped format only if it is explicitly
  2465.           specified in <expr list>.  The memo field will be output in  a  column
  2466.           width defined by SET MEMOWIDTH TO.
  2467.  
  2468. See Also  LIST, SET MEMOWIDTH
  2469.  
  2470. DO
  2471. Function  DO executes a user defined procedure and passes optional parameters.
  2472.  
  2473. Syntax    DO <proc name> [WITH <expr list>]
  2474.  
  2475. Remarks   The  <proc  name>  is  defined  with the PROCEDURE  command.   Program
  2476.           execution  passes  to  the corresponding procedure.   After  procedure
  2477.           execution,  program  control  passes  to  the  command  after  the  DO
  2478.           statement.
  2479.  
  2480.           The  WITH  option  allows parameter passing to  the  subroutine.   The
  2481.           parameter  list can contain any valid expression.  If a  parameter  is
  2482.           specified  as  a  single memory variable,  any  changes  made  to  the
  2483.           variables  value in the subroutine will be reflected  in  the  calling
  2484.           programs variable.
  2485.  
  2486. Example   The following program calculates the area of a circle.
  2487.  
  2488.           area = 0
  2489.           DO areacalc WITH 2 , area
  2490.           ? area
  2491.           12.5663600
  2492.  
  2493.           PROCEDURE areacalc
  2494.           PARAMETERS radius, result
  2495.             result = 3.14159 * radius^2
  2496.           RETURN
  2497.  
  2498. See Also  PARAMETERS, PRIVATE, PROCEDURE, RETURN, SET PROCEDURE
  2499.  
  2500. DO CASE
  2501. Function  DO   CASE  is  a  structured  programming  command  that  chooses  one
  2502.           alternative from a set of choices.
  2503.  
  2504. Syntax    DO CASE
  2505.               CASE <expL>
  2506.                <commands>
  2507.               [CASE <lexpr]
  2508.                <commands>
  2509.               [...]
  2510.               [OTHERWISE]
  2511.                <commands>
  2512.           ENDCASE
  2513.  
  2514. Remarks   The  <expL>  following  the CASE statements  determine  which  set  of
  2515.           <commands> are executed.  The <command> set corresponding to the first
  2516.           <expL>  to evaluate to True (.T.) will be executed.  If none  evaluate
  2517.           to  True  (.T.)  then the <commands> corresponding  to  the  OTHERWISE
  2518.           condition  are  executed if present.  After a set  of  <commands>  are
  2519.           executed, program execution continues after the ENDCASE command.
  2520.  
  2521. See Also  DO, DO WHILE, IF, IIF()
  2522.  
  2523. DO WHILE
  2524. Function  DO  WHILE  is a structured programming command that allows  a  set  of
  2525.           commands to be executed based on a specified condition.
  2526.  
  2527. Syntax    DO WHILE <expL>
  2528.                <commands>
  2529.               [EXIT]
  2530.                <commands>
  2531.               [LOOP]
  2532.                <commands>
  2533.           ENDDO
  2534.  
  2535. Remarks   The  <expL>  following the DO WHILE statement determines  whether  the
  2536.           <commands> in the structure are executed.
  2537.  
  2538.           The  EXIT  command transfers program control to the command  following
  2539.           the ENDDO statement.  It is often used with an IF...ENDIF structure.
  2540.  
  2541.           The  LOOP  command  transfers program control back  to  the  DO  WHILE
  2542.           statement.    The  <expL>  is  then  reevaluated  and  the  <commands>
  2543.           conditionally executed.
  2544.  
  2545. Example
  2546.           USE customer
  2547.           DO WHILE .NOT. EOF()
  2548.             ....
  2549.             DISPLAY
  2550.             IF QUIT = .T.
  2551.               EXIT
  2552.             ENDIF
  2553.           ENDDO
  2554.  
  2555. See Also  DO, DO CASE, IF, RETURN
  2556.  
  2557. DOW()
  2558. Function  The DOW() function returns a number representing the day of the week.
  2559.  
  2560. Syntax    DOW(<expD>)
  2561.  
  2562. Returns   NUMERIC
  2563.  
  2564. Remarks   Returns a number representing the day of the week.  Sunday returns  1,
  2565.           and Saturday returns 7
  2566.  
  2567. Example   Assume the system date is 10/21/93
  2568.  
  2569.           ? DOW(DATE())
  2570.           5
  2571.  
  2572. See Also  CDOW(), DAY()
  2573.  
  2574. DTE()
  2575. Function  The DTE() function returns the DTE baud of the user.
  2576.  
  2577. Syntax    DTE()
  2578.  
  2579. Returns   NUMERIC
  2580.  
  2581. Valid With     pcboard.sys, door.sys, callinfo.bbs
  2582.  
  2583. See Also  BAUD(), COMMPORT()
  2584.  
  2585. DTOC()
  2586. Function  The  DTOC()  function returns a character representation of  the  date
  2587.           expression.
  2588.  
  2589. Syntax    DTOC(<expD>)
  2590.  
  2591. Returns   CHARACTER
  2592.  
  2593. Remarks   Returns  a character representation of <expD> in the form mm/dd/yy  if
  2594.           SET CENTURY is OFF, or mm/dd/ccyy if SET CENTURY is ON.
  2595.  
  2596. Example   Assume the system date is 10/21/93
  2597.  
  2598.           ? DTOC(DATE())
  2599.           10/21/93
  2600.  
  2601. See Also  CTOD(), SET CENTURY
  2602.  
  2603. ERRORCOR()
  2604. Function  The  ERRORCOR() function identifies if an error correcting  connection
  2605.           has been established.
  2606.  
  2607. Syntax    ERRORCOR()
  2608.  
  2609. Returns   LOGICAL
  2610.  
  2611. Valid With     pcboard.sys, exitinfo.bbs, door.sys, callinfo.bbs
  2612.  
  2613. EOF()
  2614. Function  The EOF() function indicates the end of the current database file.
  2615.  
  2616. Syntax    EOF()
  2617.  
  2618. Returns   LOGICAL
  2619.  
  2620. Remarks   Returns  a logical true (.T.) when record pointer is positioned  after
  2621.           the last logical record of the current database file.
  2622.  
  2623. Example
  2624.           USE customer
  2625.           GOTO BOTTOM
  2626.           ? EOF()
  2627.           .F.
  2628.           SKIP 1
  2629.           ? EOF()
  2630.           .T.
  2631.  
  2632. See Also  BOF(), FOUND()
  2633.  
  2634. ERASE
  2635. Function  ERASE deletes a file from the disk directory.
  2636.  
  2637. Syntax    ERASE <filename>    or
  2638.           DELETE FILE <filename>
  2639.  
  2640. Remarks   The file will be deleted if it exists on the drive.
  2641.  
  2642. Example   To delete c:\sales\customer.txt
  2643.  
  2644.           file = "c:\sales\customer.txt"
  2645.           ERASE &file
  2646.  
  2647. ERROR()
  2648. Function  The  ERROR()  function returns the number corresponding to  the  error
  2649.           that caused an error condition.
  2650.  
  2651. Syntax    ERROR()
  2652.  
  2653. Returns   NUMERIC
  2654.  
  2655. Remarks   The  ERROR()  function  is used for runtime error  handling.   In  the
  2656.           procedure set by the ON ERROR command the ERROR() function can be used
  2657.           to  attempt  corrective action and then RETRY execution.   The  return
  2658.           values of the ERROR() function are outlined in APPENDIX A.
  2659.  
  2660. Example   The  following program will recover from the error:  File  is  already
  2661.           open.
  2662.  
  2663.           ON ERROR DO recover
  2664.           <commands>
  2665.           USE customer
  2666.           <commands>
  2667.           RETURN
  2668.  
  2669.           PROCEDURE recover
  2670.  
  2671.           IF ERROR() =  3
  2672.             CLOSE DATABASES
  2673.             RETRY   && attempt to re-use
  2674.           ENDIF
  2675.           RETURN
  2676.  
  2677. See Also  MESSAGE(), ON ERROR(), RETRY
  2678.  
  2679. EXP()
  2680. Function  The EXP() function returns the value of ex.
  2681.  
  2682. Syntax    EXP(<expN>)
  2683.  
  2684. Returns   NUMERIC
  2685.  
  2686. Remarks   Returns the value ex where x is <expN>.
  2687.  
  2688. Example
  2689.           ? EXP(1.000)
  2690.           2.718
  2691.  
  2692. See Also  OG()
  2693.  
  2694. FCHSIZE()
  2695. Function  Changes the size of a file on disk
  2696.  
  2697. Syntax    FCHSIZE( <expN1>, <expN2>)
  2698.  
  2699. Returns   LOGICAL
  2700.  
  2701. Remarks   <expN1> is the file handle returned by FOPEN or FCREATE
  2702.           <expN2> is the size you wish the file to be
  2703.  
  2704.           If  the  file is not opened, or another errors occurs, .F. is returned
  2705.           and the ERROR() function is updated with the error number.
  2706.  
  2707. See Also  FOPEN(), FCLOSE(), FCREATE(), FSEEK(), FTELL()
  2708.  
  2709. FCLOSE()
  2710. Function  Closes a files
  2711.  
  2712. Syntax    FCLOSE( <expN>)
  2713.  
  2714. Returns   LOGICAL
  2715.  
  2716. Remarks   <expN> is the file handle returned by FOPEN or FCREATE
  2717.  
  2718.           If  the  file is not opened, or another errors occurs, .F. is returned
  2719.           and the ERROR() function is updated with the error number.
  2720.  
  2721. See Also  FOPEN(), FCREATE()
  2722.  
  2723. FCREATE()
  2724. Function  Creates and opens a file
  2725.  
  2726. Syntax    FCREATE( <expC> [, <expN>] )
  2727.  
  2728. Returns   NUMERIC
  2729.  
  2730. Remarks   <expC> is a filename
  2731.  
  2732.           If  you  include <expN>, then it represents one of the  followin  file
  2733.           attributes.
  2734.  
  2735.                 <expN>        File Attribute
  2736.                   0           Read/Write (default)
  2737.                   1           Read Only
  2738.                   2           Hidden
  2739.                   3           Read Only / Hidden
  2740.                   4           System
  2741.                   5           Read Only / System
  2742.                   6           System / Hidden
  2743.                   7           Read Only / Hidden / System
  2744.  
  2745.           If  an error occurs, then -1 is returned and FERROR() is updated  with
  2746.           an error number.
  2747.  
  2748. See Also  FOPEN(), FCLOSE()
  2749.  
  2750. FDATE()
  2751. Function  Returns the last updated date of the opened file
  2752.  
  2753. Syntax    FDATE( <expN1> )
  2754.  
  2755. Returns   DATE
  2756.  
  2757. Remarks   <expN1> is a file handle returned by either FOPEN or FCREATE.
  2758.  
  2759.           If  the file is not opened, or another errors occurs, null is returned
  2760.           and the ERROR() function is updated with the error number.
  2761.  
  2762. See Also  FOPEN(), FCREATE(), FTIME(), FSETTIME()
  2763.  
  2764. FEOF()
  2765. Function  Determines if the fileÆs position is at the end of the file
  2766.  
  2767. Syntax    FEOF( <expN> )
  2768.  
  2769. Returns   LOGICAL
  2770.  
  2771. Remarks   <expN> is the file handle returned by FOPEN or FCREATE
  2772.  
  2773.           If  the  file is not opened, or another errors occurs, .F. is returned
  2774.           and the ERROR() function is updated with the error number.
  2775.  
  2776. See Also  FOPEN(), FCLOSE(), FTELL(), FSEEK()
  2777.  
  2778. FERROR()
  2779. Function  Returns  a  number that represents the last low-level file error  that
  2780.           occured
  2781.  
  2782. Syntax    FERROR( )
  2783.  
  2784. Returns   NUMERIC
  2785.  
  2786. Remarks   FERROR()  returned zero (0) if no file errors have occured  since  and
  2787.           inclusing the last low-level file function.  Otherwise it contains one
  2788.           of the following:
  2789.  
  2790.            Error Number    Description
  2791.                  2         File not found
  2792.                  4         Too many files open (out of file handles)
  2793.                  5         Access denied
  2794.                  6         Invalid file handle given
  2795.                  8         Out of memory
  2796.                 25         Seek error
  2797.                 29         Disk full
  2798.                 31         Error opening file
  2799.  
  2800.  
  2801. See Also  FCHSIZE(),  FCLOSE(), FCREATE(), FDATE(), FEOF(),  FFLUSH(),  FGETS(),
  2802.           FLEN(),  FLLOCK(),  FOPEN(),  FPUTS(), FREAD(),  FSEEK(),  FSETTIME(),
  2803.           FTELL(), FTIME(), FLUNLOCK(), FWRITE()
  2804.  
  2805. FFLUSH()
  2806. Function  Flushes a file to disk
  2807.  
  2808. Syntax    FFLUSH( <expN> )
  2809.  
  2810. Returns   LOGICAL
  2811.  
  2812. Remarks   <expN> is the file handle returned by FOPEN or FCREATE
  2813.  
  2814.           If  the  file is not opened, or another errors occurs, .F. is returned
  2815.           and the ERROR() function is updated with the error number.
  2816.  
  2817. See Also  FOPEN(), FCLOSE(), FWRITE(), FPUTS()
  2818.  
  2819. FGETS()
  2820. Function  Returns a character string read from an opened file
  2821.  
  2822. Syntax    FGETS( <expN1> [, <expN2>] )
  2823.  
  2824. Returns   CHARACTER
  2825.  
  2826. Remarks   <expN1> is the file handle returned by FOPEN or FCREATE
  2827.           <expN2> is the maximum length of characters to read.
  2828.  
  2829.           The maximum character ever read is 254.
  2830.  
  2831.           If  the file is not opened, or another errors occurs, null is returned
  2832.           and the ERROR() function is updated with the error number.
  2833.  
  2834. See Also  FOPEN(), FCLOSE(), FREAD()
  2835.  
  2836. FIELD()
  2837. Function  The  FIELD()  function returns field names from the  current  database
  2838.           file.
  2839.  
  2840. Syntax    FIELD(<expN>)
  2841.  
  2842. Returns   CHARACTER
  2843.  
  2844. Remarks   eturns the field name corresponding to <expN> in the file structure of
  2845.           the current database file.  The returned field name is in uppercase.
  2846.  
  2847. Example
  2848.           USE customer
  2849.           ? FIELD(2)
  2850.           LASTNAME
  2851.  
  2852. See Also  BF()
  2853.  
  2854. FILE()
  2855. Function  The FILE() function determines the existence of  a file on the disk.
  2856.  
  2857. Syntax    FILE(<expC>)
  2858.  
  2859. Returns   LOGICAL
  2860.  
  2861. Remarks   eturns  a  logical True (.T.) if the file specified by <expC>  exists.
  2862.           If  no  drive  is  specified the default drive is used.   FILE()  will
  2863.           search  the current directory first and then any directories specified
  2864.           by the SET PATH TO command.
  2865.  
  2866. Example    If the default drive is C and customer.dbf is on D
  2867.  
  2868.           ? FILE(customer.dbf)
  2869.           .F.
  2870.           ? FILE(d:customer.dbf)
  2871.           .T.
  2872.  
  2873. See Also  ET PATH
  2874.  
  2875. FIRSTNAME()
  2876. Function  The   FIRSTNAME()  function  returns  the  user's  first   name   with
  2877.           appropriate capitalization.
  2878.  
  2879. Syntax    FIRSTNAME()
  2880.  
  2881. Returns   CHARACTER
  2882.  
  2883. Valid With     pcboard.sys, dorinfo1.def
  2884.  
  2885. See Also  USERNAME()
  2886.  
  2887. FLEN()
  2888. Function  Returns the size of the opened file
  2889.  
  2890. Syntax    FLEN( <expN1> )
  2891.  
  2892. Returns   NUMERIC
  2893.  
  2894. Remarks   <expN1> is a file handle returned by either FOPEN or FCREATE.
  2895.  
  2896.           If  the file is not opened, or another errors occurs, zero is returned
  2897.           and the ERROR() function is updated with the error number.
  2898.  
  2899. See Also  FOPEN(), FCREATE(), FCHSIZE()
  2900.  
  2901. FLLOCK()
  2902. Function  Locks an opened file
  2903.  
  2904. Syntax    FLLOCK( <expN1>, <expN2>, <expN3> )
  2905.  
  2906. Returns   LOGICAL
  2907.  
  2908. Remarks   <expN1>  is  a  file handle returned by either FOPEN or FCREATE.   The
  2909.           location  and  the size of the lock, is specified in the  <expN2>  and
  2910.           <expN3> value respectfully.
  2911.  
  2912.           If  the  lock  is  successful, then true (.T.) is returned,  otherwise
  2913.           false  (.F.) is returned and the ERROR() function is updated with  the
  2914.           error number.
  2915.  
  2916.           Ony  one  lock  can occur at a certain location in a  file.   Thus  if
  2917.           another application has locked a similar area as your application, the
  2918.           lock will fail.
  2919.  
  2920. Example   Lock the file starting at location 0 for 16 bytes
  2921.  
  2922.           if .not. FLLOCK(flhandle,0,16)
  2923.             ? ôFile is locked!ö
  2924.           endif
  2925.  
  2926. See Also  FLUNLOCK(), FOPEN(), FCREATE()
  2927.  
  2928. FLOCK()
  2929. Function  he  FLOCK()  function attempts to lock the current database  file  and
  2930.           returns the whether it was successful.
  2931.  
  2932. Syntax    LOCK()
  2933.  
  2934. Remarks   OCK() will return True (.T.) if dB Online was able to lock the current
  2935.           database  file.  It will return False (.F.) otherwise.  Any file  that
  2936.           has been locked by another user cannot be written to.
  2937.  
  2938.           A  record remains locked until RLOCK() is issued, the file is  closed,
  2939.           or the UNLOCK command is issued.
  2940.  
  2941.           FLOCK()  will  re-attempt to lock the current database  based  on  the
  2942.           value of SET REPROCESS TO.
  2943.  
  2944. Example
  2945.           IF FLOCK()
  2946.             PACK    && must lock before PACKing
  2947.           ELSE
  2948.             ? "Unable to lock file", dbf()
  2949.             RETURN
  2950.           ENDIF
  2951.  
  2952. See Also  OCK(), RLOCK(), SET EXCLUSIVE, SET REPROCESS, UNLOCK, USE
  2953.  
  2954. FLUNLOCK()
  2955. Function  Unlocks a previously locked opened file
  2956.  
  2957. Syntax    FLUNLOCK( <expN1>, <expN2>, <expN3> )
  2958.  
  2959. Returns   LOGICAL
  2960.  
  2961. Remarks   <expN1>  is  a  file handle returned by either FOPEN or FCREATE.   The
  2962.           location  and  the size of the lock, is specified in the  <expN2>  and
  2963.           <expN3> value respectfully.
  2964.  
  2965.           If  the  unlock is successful, then true (.T.) is returned,  otherwise
  2966.           false  (.F.) is returned and the ERROR() function is updated with  the
  2967.           error number.
  2968.  
  2969. See Also  FLLOCK(), FOPEN(), FCREATE()
  2970.  
  2971. FOPEN()
  2972. Function  Opens a file
  2973.  
  2974. Syntax    FOPEN( <expC> [, <expN>] )
  2975.  
  2976. Returns   NUMERIC
  2977.  
  2978. Remarks   <expC> is a filename
  2979.  
  2980.           If  you  include <expN>, then it represents one of the  followin  file
  2981.           attributes.
  2982.  
  2983.            <expN>   Read/Write Attribute   Buffering Scheme
  2984.              0      Read Only (default)    Buffered
  2985.              1      Write Only             Buffered
  2986.              2      Read and Write         Buffered
  2987.              10     Read Only              Unbuffered
  2988.              11     Write Only             Unbuffered
  2989.              12     Read and Write         Unbuffered
  2990.  
  2991.           If  an error occurs, then -1 is returned and FERROR() is updated  with
  2992.           an error number.
  2993.  
  2994. See Also  FCREATE(), FCLOSE()
  2995.  
  2996. FOUND()
  2997. Function  he  FOUND()  function returns the success of the previous FIND,  SEEK,
  2998.           LOCATE, or CONTINUE command.
  2999.  
  3000. Syntax    FOUND()
  3001.  
  3002. Returns   LOGICAL
  3003.  
  3004. Remarks   Returns  a  logical True (.T.) if the previous FIND, SEEK, LOCATE,  or
  3005.           CONTINUE  command  is successful.  If files are linked  with  the  SET
  3006.           RELATION command dB Online does an implicit SEEK on the slave database
  3007.           files.   FOUND() will then return the status of the slave  files.   If
  3008.           the  record  pointer is moved with any other commands  the  result  of
  3009.           FOUND() is .F.
  3010.  
  3011. See Also  CONTINUE, EOF(), LOCATE(), SEEK, SET RELATIOIN
  3012.  
  3013. FPUTS()
  3014. Function  Writes  a character string, a carriage return, and a line feed  to  an
  3015.           opened file
  3016.  
  3017. Syntax    FPUTS( <expN1>, <expC> [, <expN2>] )
  3018.  
  3019. Returns   NUMERIC
  3020.  
  3021. Remarks   <expN1> is the file handle returned by FOPEN or FCREATE
  3022.           <expC> is the character string that you wish to save to the file
  3023.           If  included,  <expN2> is the maximum length of  characters  to  save.
  3024.           Otherwise, the entire string is saved.
  3025.  
  3026.           If  the file is not opened, or another errors occurs, zero is returned
  3027.           and the ERROR() function is updated with the error number.
  3028.  
  3029.           If successful, the number of characters written.
  3030.  
  3031. See Also  FOPEN(), FCLOSE(), FWRITE()
  3032.  
  3033. FREAD()
  3034. Function  Returns a character string read from an opened file
  3035.  
  3036. Syntax    FREAD( <expN1>, <expN2> )
  3037.  
  3038. Returns   CHARACTER
  3039.  
  3040. Remarks   <expN1> is the file handle returned by FOPEN or FCREATE
  3041.           <expN2> is the maximum length of characters to read.
  3042.  
  3043.           If  the file is not opened, or another errors occurs, null is returned
  3044.           and the ERROR() function is updated with the error number.
  3045.  
  3046. See Also  FOPEN(), FCLOSE(), FGETS()
  3047.  
  3048. FSEEK()
  3049. Function  Set a files position
  3050.  
  3051. Syntax    FSEEK( <expN1>, <expN2> [, <expN3>] )
  3052.  
  3053. Returns   NUMERIC
  3054.  
  3055. Remarks   <expN1> is the file handle returned by FOPEN or FCREATE
  3056.           <expN2> is the number of bytes to move the pointer
  3057.           <expN3>  is a value that determines how the pointer is moved according
  3058.           to the following table:
  3059.  
  3060.              <expN3>     Movement Relative to
  3061.                 0        the beginning of the file (default)
  3062.                 1        the current file pointer position
  3063.                 2        the end of the file
  3064.  
  3065.           Is successful, FSEEK() returns the new file position.
  3066.  
  3067.           If  the file is not opened, or another errors occurs, null is returned
  3068.           and the ERROR() function is updated with the error number.
  3069.  
  3070. See Also  FOPEN(), FCLOSE(), FTELL()
  3071.  
  3072. FSETTIME()
  3073. Function  Set the date and time of an opened file
  3074.  
  3075. Syntax    FSETTIME( <expN1>, <expD>, <expC>)
  3076.  
  3077. Returns   LOGICAL
  3078.  
  3079. Remarks   <expN1> is a file handle returned by either FOPEN or FCREATE.
  3080.  
  3081.           <expD> is the date that you wish the file to have.
  3082.           <expC>  is  the  time that you wish the file to have in the  following
  3083.           format:
  3084.                HH:MM:SS
  3085.  
  3086.           If  the  file is not opened, or another errors occurs, .F. is returned
  3087.           and the ERROR() function is updated with the error number.
  3088.  
  3089. See Also  FOPEN(), FCREATE(), FTIME(), FDATE()
  3090.  
  3091. FTELL()
  3092. Function  Returns the current position of an opened file
  3093.  
  3094. Syntax    FTELL( <expN1> )
  3095.  
  3096. Returns   NUMERIC
  3097.  
  3098. Remarks   <expN1> is a file handle returned by either FOPEN or FCREATE.
  3099.  
  3100.           If  the file is not opened, or another errors occurs, zero is returned
  3101.           and the ERROR() function is updated with the error number.
  3102.  
  3103. See Also  FOPEN(), FCREATE(), FSEEK()
  3104.  
  3105. FTIME()
  3106. Function  Returns the last updated time of the opened file
  3107.  
  3108. Syntax    FTIME( <expN1> )
  3109.  
  3110. Returns   CHARACTER
  3111.  
  3112. Remarks   <expN1> is a file handle returned by either FOPEN or FCREATE.
  3113.  
  3114.           If  the file is not opened, or another errors occurs, null is returned
  3115.           and the ERROR() function is updated with the error number.
  3116.  
  3117. Example
  3118.           flhandle=fopen(ô\autoexec.batö)
  3119.           ? FTIME(flhandle)
  3120.           10:45:23
  3121.  
  3122. See Also  FOPEN(), FCREATE(), FDATE(), FSETTIME()
  3123.  
  3124. FUNCTION
  3125. Function  Identifies the start of a user-defined function
  3126.  
  3127. Syntax    FUNCTION <function name>
  3128.  
  3129. Remarks   The  FUNCTION statement is quite like the PROCEDURE statement,  except
  3130.           that upon return from the function, a value can be returned and placed
  3131.           on the evaluation stack.
  3132.  
  3133.           Functions  can  be used anywhere an expression can be used,  but  they
  3134.           must return the correct type needed or a DATA TYPE MISMATCH error will
  3135.           occur at run-time.
  3136.  
  3137.           The PARAMETERS statement can proceed the FUNCTION statement to declare
  3138.           parameters for this function.
  3139.  
  3140. Example
  3141.           ? areacalc(2)
  3142.           12.5663600
  3143.  
  3144.           FUNCTION areacalc
  3145.             PARAMETERS radius
  3146.             RETURN 3.14159 * radius^2
  3147.  
  3148. See Also  PROCEDURE, PARAMETERS
  3149.  
  3150. FWRITE()
  3151. Function  Writes a character string to an opened file
  3152.  
  3153. Syntax    FWRITE( <expN1>, <expC> [, <expN2>] )
  3154.  
  3155. Returns   NUMERIC
  3156.  
  3157. Remarks   <expN1> is the file handle returned by FOPEN or FCREATE
  3158.           <expC> is the character string that you wish to save to the file
  3159.           If  included,  <expN2> is the maximum length of  characters  to  save.
  3160.           Otherwise, the entire string is saved.
  3161.  
  3162.           If  the file is not opened, or another errors occurs, zero is returned
  3163.           and the ERROR() function is updated with the error number.
  3164.  
  3165.           If successful, the number of characters written.
  3166.  
  3167. See Also  FOPEN(), FCLOSE(), FPUTS()
  3168.  
  3169. GETENV()
  3170. Function  The  GETENV()  function returns the value of an  environmental  system
  3171.           variable.
  3172.  
  3173. Syntax    GETENV(<expC>)
  3174.  
  3175. Returns   CHARACTER
  3176.  
  3177. Remarks   Returns the value of the DOS system variable specified by <expC>  such
  3178.           as  PATH  or COMSPEC.  If the character expression is not  found,   dB
  3179.           Online returns a null string.
  3180.  
  3181. Example
  3182.           ? GETENV("COMSPEC")
  3183.           C:\COMMAND.COM
  3184.           ? GETENV("PATH")
  3185.           C:\DOS;C:\BIN
  3186.  
  3187. See Also  DISKSPACE, OS(), VERSION()
  3188.  
  3189. GO|GOTO
  3190. Function  GO|GOTO  positions  the  record pointer to a specific  record  in  the
  3191.           active database file.
  3192.  
  3193. Syntax    [GO|GOTO] <expN>  or
  3194.           GO|GOTO TOP|BOTTOM
  3195.  
  3196. Remarks   If  the  [GO|GOTO] optional command is not specified then <expN>  must
  3197.           begin with a numeric constant.
  3198.           If  an  index file is active GO TOP|BOTTOM refer to the top and bottom
  3199.           logical records in the index file.  GO|GOTO <expN> always refers to  a
  3200.           specific record number.  If SET DELETED is ON, you may access a record
  3201.           marked for deletion by directly specifying its record number.
  3202.  
  3203. Example   USE customer
  3204.           GO TOP
  3205.           ? RECNO()
  3206.           1
  3207.           5
  3208.           ? RECNO()
  3209.           5
  3210.  
  3211. See Also  RECNO(), SKIP
  3212.  
  3213. IF
  3214. Function  IF  is  a  structured programming command that allows the  conditional
  3215.           execution of commands.
  3216.  
  3217. Syntax    IF <expL>
  3218.                <commands>
  3219.           [ELSE]
  3220.                <commands>
  3221.           ENDIF
  3222.  
  3223. Remarks   If  <expL> is evaluated to True (.T.) then the first set of <commands>
  3224.           are   executed  and  program  control  is  transferred  to  the  ENDIF
  3225.           statement.   If  <expL>  is evaluated to False (.F.)  then  dB  Online
  3226.           transfers program control to the ELSE statement or the ENDIF statement
  3227.           if the ELSE statement is omitted.
  3228.  
  3229. See Also  DO CASE, IIF()
  3230.  
  3231. IIF()
  3232. Function  The  IIF()  function  is a shortcut to the IF...ENDIF  structure.   It
  3233.           returns one of two values based on a logical expression.
  3234.  
  3235. Syntax    IIF(<expL> , <expr1> , <expr2>)
  3236.  
  3237. Returns   <expr1> or <expr2>
  3238.  
  3239. Remarks   Returns  the  value  of  <expr1>  if <expL>  is  Logical  True  (.T.),
  3240.           otherwise it returns the value of <expr2>.
  3241.  
  3242. Example
  3243.           lastname = "Smith"
  3244.           ? IIF(sex = 'M',"Mr. ","Ms. ") + lastname
  3245.  
  3246. See Also  IF...ENDIF, DO CASE
  3247.  
  3248. INKEY()
  3249. Function  The  INKEY() function returns a value representing the most recent key
  3250.           pressed by either the remote or local terminals.  It does not wait for
  3251.           a keypress.
  3252.  
  3253. Syntax    INKEY( [<expN>] )
  3254.  
  3255. Returns   NUMERIC
  3256.  
  3257. Remarks   Returns  a value in the range of 0 to 255 corresponding to a value  in
  3258.           the  IBM Extended Character.  If there are several characters  in  the
  3259.           type-ahead buffer the first character is returned and cleared from the
  3260.           buffer.
  3261.  
  3262.           If you supply an argument to INKEY, it will wait <expN> seconds.  If 0
  3263.           is the argument or no argument is present, it will wait indefinitely.
  3264.  
  3265.           INKEY()  returns  zero  if  no  key is  pressed  and  the  control-key
  3266.           equivalent  of cursor and extended keys.  The return values  of  INKEY
  3267.           are identified in the following table:
  3268.  
  3269.  Cursor   Alternative   INKEY() return
  3270.    Key        Keys          value
  3271. r         CD                  4
  3272. l         CS                  19
  3273. t         CE                  5
  3274. b         CX                  24
  3275. Cr        CB                  2
  3276. Cl        CZ                  26
  3277. I         CV                  22
  3278. D         CG                  7
  3279. h         Ca                  1
  3280. e         Cf                  6
  3281. u         Cr                  18
  3282. d         Cc                  3
  3283. Ch        C]                  29
  3284. Ce        Cw                  23
  3285. E                             27
  3286. Cu        C_                  31
  3287. Cd        C]                  30
  3288.  
  3289. Example
  3290.  
  3291.           ? "Press any key to continue"
  3292.           DO WHILE INKEY() =0
  3293.             @ 1,72 SAY TIME()
  3294.           ENDDO
  3295.  
  3296. See Also  CHR(), LASTKEY(), WAIT
  3297.  
  3298. INPUT
  3299. Function  INPUT is used to input numeric information from the keyboard.
  3300.  
  3301. Syntax    INPUT [<expC>] TO <var>
  3302.  
  3303. Remarks   The  optional  <expC> is displayed as a prompt for input.   The  value
  3304.           returned to the <var> is the numeric value of the characters inputted.
  3305.  
  3306. Example   INPUT "Type in your age " TO age   && If 28 is entered
  3307.           ? age
  3308.           28
  3309.  
  3310. See Also  ACCEPT, WAIT
  3311.  
  3312. INT()
  3313. Function  The INT() function return the integer portion of a numeric argument
  3314.  
  3315. Syntax    INT(<expN>)
  3316.  
  3317. Returns   NUMERIC
  3318.  
  3319. Remarks   Returns the integer portion of <expN>.  All digits to the right of the
  3320.           decimal point are discarded.
  3321.  
  3322. Example
  3323.           ? INT(23.55)
  3324.           23
  3325.           ? INT(-5.5)
  3326.           -5
  3327.  
  3328. ISALPHA()
  3329. Function  The  ISALPHA  function  returns a logical True (.T.)  if  a  character
  3330.           string begins with an alpha character.
  3331.  
  3332. Syntax    ISALPHA(<expC>)
  3333.  
  3334. Returns   LOGICAL
  3335.  
  3336. Remarks   Returns  a logical True (.T.) if the first character in <expC>  is  an
  3337.           upper or lower case letter between a and z.
  3338.  
  3339. Example
  3340.           ? ISALPHA("HELLO")
  3341.           .T.
  3342.           ? ISALPHA("123 Main St.")
  3343.           .F.
  3344.  
  3345. See Also  ISLOWER(), ISUPPER(), ISDIGIT()
  3346.  
  3347. ISANSI()
  3348. Function  The  ISANSI() function returns whether the user is in ANSI  compatible
  3349.           mode.
  3350.  
  3351. Syntax    ISANSI()
  3352.  
  3353. Returns   LOGICAL
  3354.  
  3355. Valid With     pcboard.sys, door.sys, dorinfo1.def, chain.txt
  3356.  
  3357. See Also  ISCOLOR(), ISRIP()
  3358.  
  3359. ISCOLOR()
  3360. Function  The  ISCOLOR() function determines whether the user has selected color
  3361.           operation.
  3362.  
  3363. Syntax    ISCOLOR()
  3364.  
  3365. Returns   LOGICAL
  3366.  
  3367. Remarks   This information is provided by a BBS drop file.
  3368.  
  3369.           ISCOLOR()  a  logical  True  (.T.) if  the  user  has  selected  color
  3370.           operation.
  3371.  
  3372. Valid With     pcboard.sys, door.sys, callinfo.bbs
  3373.  
  3374. Example   To change default black and white colors if user is in color mode:
  3375.  
  3376.           IF ISCOLOR()
  3377.             SET COLOR TO W+/B,N/BG
  3378.           ENDIF
  3379.  
  3380. See Also  SET COLOR
  3381.  
  3382. ISDIGIT()
  3383. Function  Returns true if the first character is a digit.
  3384.  
  3385. Syntax    ISDIGIT( <expC> )
  3386.  
  3387. Returns   NUMERIC
  3388.  
  3389. Remarks   This  function  only  processes  the first  character,  the  rest  are
  3390.           ignored.
  3391.  
  3392. Example
  3393.           ? ISDIGIT(ôHelloö)
  3394.           .F.
  3395.           ? ISDIGIT(ô123 Elmvale Roadö)
  3396.           .T.
  3397.  
  3398. See Also  ISALPHA(), ISUPPER(), ISLOWER()
  3399.  
  3400. ISLOCAL()
  3401. Function  The ISLOCAL() function returns whether the user is in local mode.
  3402.  
  3403. Syntax    ISLOCAL()
  3404.  
  3405. Returns   LOGICAL
  3406.  
  3407. Valid With     all
  3408.  
  3409. ISLOWER()
  3410. Function  The  ISLOWER() function returns a logical True (.T.) if the  character
  3411.           expression begins with a lowercase letter.
  3412.  
  3413. Syntax    ISLOWER(<expC>)
  3414.  
  3415. Returns   LOGICAL
  3416.  
  3417. Example
  3418.           ? ISLOWER("Hello")
  3419.           .F.
  3420.           ? ISLOWER("hello")
  3421.           .T.
  3422.           ? ISLOWER("123 Main St.")
  3423.           .F.
  3424.  
  3425. See Also  ISALPHA(), ISUPPER(), ISDIGIT()
  3426.  
  3427. ISREMPTY()
  3428. Function  Returns whether the receive buffer is empty or not.
  3429.  
  3430. Syntax    ISREMPTY( <expN1> )
  3431.  
  3432. Returns   LOGICAL
  3433.  
  3434. Remarks   <expN1> is the communications handle returned by COPEN().
  3435.  
  3436. See Also  COPEN(), CCLOSE()
  3437.  
  3438. ISRFULL()
  3439. Function  Returns whether the receive buffer is full or not.
  3440.  
  3441. Syntax    ISRFULL( <expN1> )
  3442.  
  3443. Returns   LOGICAL
  3444.  
  3445. Remarks   <expN1> is the communications handle returned by COPEN().
  3446.  
  3447. See Also  COPEN(), CCLOSE()
  3448.  
  3449. ISRIP()
  3450. Function  The ISRIP() function returns whether the user is in RIP mode.
  3451.  
  3452. Syntax    ISRIP()
  3453.  
  3454. Returns   LOGICAL
  3455.  
  3456. Valid With     pcboard.sys, door.sys
  3457.  
  3458. See Also  ISANSI(), ISCOLOR()
  3459.  
  3460. ISTEMPTY()
  3461. Function  Returns whether the transmit buffer is empty or not.
  3462.  
  3463. Syntax    ISTEMPTY( <expN1> )
  3464.  
  3465. Returns   LOGICAL
  3466.  
  3467. Remarks   <expN1> is the communications handle returned by COPEN().
  3468.  
  3469. See Also  COPEN(), CCLOSE()
  3470.  
  3471. ISTFULL()
  3472. Function  Returns whether the transmit buffer is full or not.
  3473.  
  3474. Syntax    ISTFULL( <expN1> )
  3475.  
  3476. Returns   LOGICAL
  3477.  
  3478. Remarks   <expN1> is the communications handle returned by COPEN().
  3479.  
  3480. See Also  COPEN(), CCLOSE()
  3481.  
  3482.  
  3483. ISUPPER()
  3484. Function  The  ISUPPER() function returns a logical True (.T.) if the  character
  3485.           expression begins with a uppercase letter.
  3486.  
  3487. Syntax    ISUPPER(<expC>)
  3488.  
  3489. Returns   LOGICAL
  3490.  
  3491. Example
  3492.           ? ISUPPER("Hello")
  3493.           .T.
  3494.           ? ISUPPER("hello")
  3495.           .F.
  3496.           ? ISUPPER("123 Main St.")
  3497.           .F.
  3498.  
  3499. See Also  ISALPHA(), ISLOWER(), ISDIGIT()
  3500.  
  3501. LANGUAGE()
  3502. Function  The   LANGUAGE()   function  returns  the  user's  language   filename
  3503.           extension.
  3504.  
  3505. Syntax    LANGUAGE()
  3506.  
  3507. Returns   CHARACTER
  3508.  
  3509. Valid With     pcboard.sys
  3510.  
  3511. Remarks   The  LANGUAGE()  function will return a null string  if  the  language
  3512.           extension  is English.  Otherwise it will return a 4 character  string
  3513.           which could correspond to the extension on text files to be displayed:
  3514.           i.e..  If the French language is chosen then ".FRE" is returned.
  3515.  
  3516. LASTKEY()
  3517. Function  The  LASTKEY() function returns the value of the last key  pressed  to
  3518.           exit a full screen READ command.
  3519.  
  3520. Syntax    LASTKEY()
  3521.  
  3522. Returns   NUMERIC
  3523.  
  3524. Remarks   The return values of LASTKEY correspond to the INKEY() values.
  3525.  
  3526. Example
  3527.           @ 2,2 SAY "NAME" GET NAME
  3528.           <commands>
  3529.           READ
  3530.           IF LASTKEY() = 27
  3531.             QUIT
  3532.           ENDIF
  3533.  
  3534. See Also  INKEY()
  3535.  
  3536. LEFT()
  3537. Function  The  LEFT() function returns a number of characters from the beginning
  3538.           of the specified character expression.
  3539.  
  3540. Syntax    LEFT(<expC> , <expN>)
  3541.  
  3542. Returns   CHARACTER
  3543.  
  3544. Remarks   Returns  the leftmost <expN> characters in <expC>.  If <expN> is  less
  3545.           than or equal to zero, dB Online returns a null string.  If <expN>  is
  3546.           greater  than  the  length  of <expC>, dB Online  returns  the  entire
  3547.           string.
  3548.  
  3549. Example
  3550.           ? LEFT(æHello ThereÆ,5)
  3551.           Hello
  3552.  
  3553. See Also  AT(), LTRIM(), RIGHT(), SUBSTR(), TRIM()
  3554.  
  3555. LEN()
  3556. Function  The LEN() function returns the length of a character string.
  3557.  
  3558. Syntax    LEN(<expC>)
  3559.  
  3560. Returns   NUMERIC
  3561.  
  3562. Remarks   Returns  the length of <expC>.  If <expC> is a null string, dB  Online
  3563.           returns zero.
  3564.  
  3565. Example
  3566.           ? LEN("Good Morning")
  3567.           12
  3568.  
  3569. See Also  TRIM()
  3570.  
  3571. LINENO()
  3572. Function  Returns the currently executing line number
  3573.  
  3574. Syntax    LINENO( [<expN>] )
  3575.  
  3576. Returns   NUMERIC
  3577.  
  3578. Remarks   The  line  number is derived from the source code used to compile  the
  3579.           currently running DBX file.
  3580.  
  3581.           The  <expN> parameter always ignored, and is only provided as a  means
  3582.           of compatibility.
  3583.  
  3584. See Also  PROGRAM()
  3585.  
  3586. LIST
  3587. Function  LIST is used to view the contents of the current database file.
  3588.  
  3589. Syntax    LIST
  3590.               [OFF]
  3591.               [<scope>]
  3592.               [<expr list>]
  3593.               [WHILE <expL1>]
  3594.               [FOR <expL2>]
  3595.  
  3596. Remarks   All  records  are listed unless otherwise specified with the  <scope>,
  3597.           WHILE, or FOR expressions.
  3598.  
  3599.           If  <expr  list> is not specified then all fields are displayed.   The
  3600.           record number is displayed unless the OFF option is included.
  3601.  
  3602.           A  memo  field will be output in a word wrapped format only if  it  is
  3603.           explicitly specified in <expr list>.  The memo field will be output in
  3604.           a column width defined by SET MEMOWIDTH TO.
  3605.  
  3606. See Also  DISPLAY, SET MEMOWDTH
  3607.  
  3608. LOCATE
  3609. Function  LOCATE  scans  the active database for records that satisfy  specified
  3610.           conditions.
  3611.  
  3612. Syntax    LOCATE
  3613.               [<scope>]
  3614.               [WHILE <expL1>]
  3615.               [FOR <expL2>]
  3616.           [...]
  3617.           [CONTINUE]
  3618.  
  3619. Remarks   LOCATE  searches the entire database unless otherwise  specified  with
  3620.           the <scope>, WHILE, or FOR expressions.
  3621.  
  3622.           LOCATE  will  find the first record to match the specified conditions.
  3623.           If this record is found then FOUND() returns .T.  Use CONTINUE to find
  3624.           the next occurrence of the specified conditions.
  3625.  
  3626.           When the record counter reaches the end of the file or the end of  the
  3627.           <scope> then FOUND() returns .F.
  3628.  
  3629.           You can have a different LOCATE/CONTINUE for each work area.  The most
  3630.           recent LOCATE in any work area overrides any previous.
  3631.  
  3632. See Also  CONTINUE, FOUND(), SEEK
  3633.  
  3634. LOCK()
  3635. Function  The  LOCK()  function attempts to lock the current record and  returns
  3636.           the  whether  it  was  successful.  LOCK() is  identical  to  RLOCK().
  3637.           Please refer to RLOCK() in this section.
  3638.  
  3639. Syntax    LOCK()  |  RLOCK()
  3640.  
  3641. See Also  FLOCK(), RLOCK(), SET EXCLUSIVE, SET REPROCESS, UNLOCK, USE
  3642.  
  3643. LOG()
  3644. Function  The  LOG()  function  returns  the  natural  logarithm  of  a  numeric
  3645.           expression.
  3646.  
  3647. Syntax    LOG(<expN>)
  3648.  
  3649. Returns   NUMERIC
  3650.  
  3651. Remarks   Returns the natural logarithm of <expN>.  <expN> must be greater  than
  3652.           zero.
  3653.  
  3654. Example
  3655.           ? LOG(2.71828)
  3656.           1.00000
  3657.  
  3658. See Also  EXP()
  3659.  
  3660. LOWER()
  3661. Function  The LOWER() function converts a character expression to lower case.
  3662.  
  3663. Syntax    LOWER(<expC>)
  3664.  
  3665. Returns   CHARACTER:
  3666.  
  3667. Remarks   Returns a string in which all uppercase characters in <expC> have been
  3668.           converted to lowercase.
  3669.  
  3670. Example
  3671.           ? LOWER("Hello")
  3672.           hello
  3673.  
  3674. See Also  ISALPHA(), ISLOWER(), ISUPPER(), UPPER()
  3675.  
  3676. LTRIM()
  3677. Function  The   LTRIM()  function  removes  leading  blanks  from  a   character
  3678.           expression.
  3679.  
  3680. Syntax    LTRIM(<expC>)
  3681.  
  3682. Returns   <expC>
  3683.  
  3684. Example
  3685.           ? STR(12.45)
  3686.                  12.45
  3687.           ? LTRIM(STR(12.45))
  3688.           12.45
  3689.  
  3690. See Also  LEFT(), RIGHT(), RTRIM(), STR(), SUBSTR(), TRIM()
  3691.  
  3692. LUPDATE()
  3693. Function  The LUPDATE() function returns the last date the current database file
  3694.           was updated.
  3695.  
  3696. Syntax    LUPDATE()
  3697.  
  3698. Returns   DATE
  3699.  
  3700. Example   Assume the system date is 10/21/93
  3701.  
  3702.           USE customer
  3703.           ?LUPDATE()
  3704.           9/15/93
  3705.           PACK
  3706.           ?LUPDATE()
  3707.           10/21/93
  3708.  
  3709. See Also  DBF()
  3710.  
  3711. MAX()
  3712. Function  The MAX() function returns the largest of two expressions.
  3713.  
  3714. Syntax    MAX(<expr1>,<expr2>)
  3715.  
  3716. Returns   <expr>
  3717.  
  3718. Remarks   Returns the largest of the two values.   Both <expr1> and <expr2> must
  3719.           be the same type and cannot be Logical.
  3720.  
  3721. Example
  3722.           ? MAX(55,102)
  3723.           102
  3724.  
  3725. See Also  MIN()
  3726.  
  3727. MDX()
  3728. Function  The MDX() function returns the filename for the active index files  in
  3729.           a work area.
  3730.  
  3731. Syntax    MDX(<expN1> [,<expN2> | <alias>])
  3732.  
  3733. Returns   CHARACTER
  3734.  
  3735. Remarks   Returns the filename of an open .mdx file in a work area.  <expN1>  is
  3736.           the  .mdx  file position in the index file list specified by  the  SET
  3737.           INDEX TO <file list>, or USE INDEX <file list> commands.  The optional
  3738.           second parameter returns .mdx files for other work areas.
  3739.  
  3740. Example
  3741.           USE customer INDEX name.mdx, phone.mdx
  3742.           ? MDX(1)
  3743.           c:name.mdx
  3744.           ? MDX(2)
  3745.           c:phone.mdx
  3746.  
  3747. See Also  CDX(), DBF(), FIELD(), LUPDATE(), NDX(), SET INDEX, SET ORDER
  3748.  
  3749. MEMORY()
  3750. Function  Returns the amount of free memory on your system.
  3751.  
  3752. Syntax    MEMORY ()
  3753.  
  3754. Returns   NUMERIC
  3755.  
  3756. Remarks   This  functions  returns the number of kilobytes of available  memory.
  3757.           In DOS, this would be any free memory underneath 640k.
  3758.  
  3759. Example
  3760.           ? MEMORY()
  3761.           365
  3762.  
  3763. MENU TO
  3764. Function  Activates a menu bar created with @... PROMPT
  3765.  
  3766. Syntax    MENU TO <memvar>
  3767.  
  3768. Remarks   The value initially contained in the <memvar> specifies which menu bar
  3769.           is activated.  Upon exit from the menu. the <memvar> variable contains
  3770.           the choice.  If E is pressed, <memvar> wil contain 0.
  3771.  
  3772. See Also  @... PROMPT
  3773.  
  3774. MESSAGE()
  3775. Function  The  MESSAGE() function returns the message corresponding to an  error
  3776.           condition.
  3777.  
  3778. Syntax    MESSAGE()
  3779.  
  3780. Returns   CHARACTER
  3781.  
  3782. Remarks   Returns   the  character  message  during  a  runtime  error  handling
  3783.           procedure.
  3784.  
  3785. Example
  3786.           ON ERROR DO recover
  3787.           <commands>
  3788.  
  3789.           PROCEDURE recover
  3790.             ?"dB Online has encountered a run time error"
  3791.             ? MESSAGE()
  3792.             ? "Now exiting"
  3793.             QUIT
  3794.           RETURN
  3795.  
  3796. See Also  ERROR()
  3797.  
  3798. MIN()
  3799. Function  The  MIN()  function  returns  the smaller  of  two  numeric  or  date
  3800.           functions.
  3801.  
  3802. Syntax    MIN(<expr1> , <expr2>)
  3803.  
  3804. Returns   <expr>
  3805.  
  3806. Remarks   Returns the smaller of the two values.   Both <expr1> and <expr2> must
  3807.           be the same type and cannot be Logical.
  3808.  
  3809. Example
  3810.           ? MIN(55,102)
  3811.           55
  3812.  
  3813. See Also  MAX()
  3814.  
  3815. MOD()
  3816. Function  The  MOD()  function  returns the remainder from  a  division  of  two
  3817.           numbers.
  3818.  
  3819. Syntax    MOD(<expN1> , <expN2>)
  3820.  
  3821. Returns   NUMERIC
  3822.  
  3823. Remarks   Returns  the  modulus, which is the remainder of  <expN1>  divided  by
  3824.           <expN2>
  3825.  
  3826. Example
  3827.           ? MOD(10,8)
  3828.           2
  3829.           ? MOD(0,60)
  3830.           0
  3831.  
  3832. MODIFY FILE | COMMAND
  3833. Function  Opens an editing window for editing a text file
  3834.  
  3835. Syntax    MODIFY FILE | COMMAND <filename> [NOEDIT]
  3836.  
  3837. Remarks   If MODIFY COMMAND is used and the filename has no file extension, then
  3838.           .PRG will be assumed.
  3839.  
  3840.           This  statement has the same effect as MODIFY MEMO, but will  allow  a
  3841.           user to edit a text file..
  3842.  
  3843.           By  speficying the NOEDIT clause, the user will not be able  to  alter
  3844.           the contents of the file.
  3845.  
  3846.           NOTE:  Only  the first 64000 bytes of the fille will be editable,  and
  3847.           upon saving the file will be truncated to only 64000 bytes
  3848.  
  3849. See Also  MODIFY MEMO
  3850.  
  3851. MODIFY MEMO
  3852. Function  Opens an editing window for editing a memo field
  3853.  
  3854. Syntax    MODIFY MEMO <memovar> [NOEDIT]
  3855.  
  3856. Remarks   This statement cause the same effect as placing a @ GET statement with
  3857.           a memo field and then having the user press Ch.
  3858.  
  3859.           By  speficying the NOEDIT clause, the user will not be able  to  alter
  3860.           the contents of the memo field.
  3861.  
  3862. See Also  @...GET, MODIFY FILE
  3863.  
  3864. MONTH()
  3865. Function  The  MONTH() function returns a number representing the month  from  a
  3866.           date expression.
  3867.  
  3868. Syntax    MONTH(<expD>)
  3869.  
  3870. Returns   NUMERIC
  3871.  
  3872. Remarks   Returns a value between 1 and 12 corresponding to January to December.
  3873.  
  3874. Example   Assume the system date is 10/21/93
  3875.  
  3876.           ? MONTH(DATE())
  3877.           10
  3878.  
  3879. See Also  CMONTH(), DAY(), YEAR()
  3880.  
  3881. NDX()
  3882. Function  The NDX() function returns the filename for the active index files  in
  3883.           a work area.
  3884.  
  3885. Syntax    NDX(<expN1> [ ,<expN2> | <alias>])
  3886.  
  3887. Returns   CHARACTER
  3888.  
  3889. Remarks   Returns the filename of an open .ndx file in a work area.  <expN1>  is
  3890.           the  .ndx  file position in the index file list specified by  the  SET
  3891.           INDEX TO <file list>, or USE INDEX <file list> commands.  The optional
  3892.           second parameter returns .ndx files for other work areas.
  3893.  
  3894. Example
  3895.           USE customer INDEX name.ndx, phone.ndx
  3896.           ? NDX(1)
  3897.           c:name.ndx
  3898.           ? NDX(2)
  3899.           c:phone.ndx
  3900.  
  3901. See Also  CDX(), DBF(), LUPDATE(), SET INDEX, SET ORDER
  3902.  
  3903. NODE()
  3904. Function  The NODE() function return the node number the user is on.
  3905.  
  3906. Syntax    NODE()
  3907.  
  3908. Returns   NUMERIC
  3909.  
  3910. Valid With     pcboard.sys, door.sys, callinfo.bbs
  3911.  
  3912. Remarks   The  NODE() function is useful for creating temporary file  names  for
  3913.           each BBS node.
  3914.  
  3915. See Also  CONFERENCE()
  3916.  
  3917. NOTE
  3918. Function  NOTE is used to indicate comments in the source code.
  3919.  
  3920. Syntax    NOTE|* <text>
  3921.           [<command>]&& <text>
  3922.  
  3923. Remarks   The <text> indicated above is ignored by the compiler.  If any comment
  3924.           line  ends with a semicolon, then the next line is also treated  as  a
  3925.           comment.
  3926.  
  3927.           && is used to insert a comment on the same line as a command.
  3928.  
  3929. Example
  3930.           USE customer.dbf    && open customer database
  3931.           NOTE  List all data
  3932.           LIST
  3933.  
  3934. ON ERROR
  3935. Function  ON ERROR is used to enable runtime error handling.
  3936.  
  3937. Syntax    ON ERROR [DO <proc name> [WITH <expr list>]]
  3938.  
  3939. Remarks   ON ERROR responds to dB Online database errors as outlined in APPENDIX
  3940.           3.   When a runtime error occurs, program control will transfer to the
  3941.           procedure  <proc  name> defined in the ON ERROR command.   To  disable
  3942.           error trapping enter ON ERROR R without a DO command.
  3943.  
  3944.           In  the  procedure the function ERROR() will identify the error  which
  3945.           occurred and the function MESSAGE() will return a character message of
  3946.           the error which occurred.
  3947.  
  3948.           If  the  error recovery procedure ends with a RETRY command, the  same
  3949.           command  which  generated the error will be executed.   However  RETRY
  3950.           will  not attempt to re-execute any conditional commands such  as  IF,
  3951.           WHILE, CASE etc.
  3952.  
  3953. Example   The  following program will recover from the error:  File  is  already
  3954.           open.
  3955.  
  3956.           ON ERROR DO recover
  3957.           <commands>
  3958.           USE customer
  3959.           <commands>
  3960.           RETURN
  3961.  
  3962.           PROCEDURE recover
  3963.             IF ERROR() =  3
  3964.               CLOSE DATABASES
  3965.               RETRY && attempt to USE again
  3966.             ENDIF
  3967.           RETURN
  3968.  
  3969. See Also  INKEY(), ON ESCAPE
  3970.  
  3971. ON ESCAPE
  3972. Function  ON ESCAPE responds to the user pressing E.
  3973.  
  3974. Syntax    ON ESCAPE [DO <proc name> [WITH <expr list>]]
  3975.  
  3976. Remarks   When the user presses E during program execution, program control will
  3977.           be transferred to the procedure <proc name> define in the ON ESCAPE DO
  3978.           command.   ON  ESCAPE only works when SET ESCAPE is  ON.   To  disable
  3979.           error trapping enter ON ESCAPE R without a DO command.
  3980.  
  3981.           During  the execution of the ON ESCAPE procedure, escape key  trapping
  3982.           is disabled.
  3983.  
  3984. Example   This example allows the user to cancel a long listing:
  3985.  
  3986.           USE customer
  3987.           SET ESCAPE ON
  3988.           ON ESCAPE DO if_esc
  3989.           LIST
  3990.           RETURN
  3991.  
  3992.           PROCEDURE if_esc
  3993.           ACCEPT "Do you want to quit (Y/N)" TO response
  3994.           IF 'Y' $ UPPER(response)
  3995.              RETURN
  3996.           ELSE
  3997.              RETRY
  3998.           ENDIF
  3999.  
  4000. See Also  INKEY(), ON ERROR, READKEY(), SET ESCAPE
  4001.  
  4002. OS()
  4003. Function  The OS() function returns the name of the operating system under which
  4004.           dB Online is running.
  4005.  
  4006. Syntax    OS()
  4007.  
  4008. Returns   CHARACTER
  4009.  
  4010. Remarks   Returns a character value of the operating system.  As dB Online  only
  4011.           operates in DOS environments, OS() returns the DOS version.
  4012.  
  4013. Example
  4014.           ? OS()
  4015.           DOS 6.0
  4016.  
  4017. See Also  DISKSPACE(), GETENV(), VERSION()
  4018.  
  4019. PACK
  4020. Function  PACK  permanently removes all record marked for deletion in the active
  4021.           database file.
  4022.  
  4023. Syntax    PACK
  4024.  
  4025. Remarks   All  open  index files are automatically REINDEXed and  all  memofiles
  4026.           area automatically compressed.
  4027.  
  4028.           PACK cannot be used with read only files.
  4029.  
  4030. See Also  DELETE, RECALL, REINDEX
  4031.  
  4032. PAGELEN()
  4033. Function  The PAGELEN() function returns the user's page length setting.
  4034.  
  4035.  
  4036. Syntax    PAGELEN( [ <expN> ])
  4037.  
  4038. Returns   NUMERIC
  4039.  
  4040. Remarks   PAGELEN()  will  accept an optional numeric expression  to  allow  the
  4041.           value to be changed.
  4042.           This can be done using the new EQUALS command. eg:
  4043.                = PAGELEN(23)
  4044.  
  4045. Valid With     exitinfo.bbs, door.sys, user.sys, chain.txt, callinfo.bbs
  4046.  
  4047. See Also  @..SAY...GET
  4048.  
  4049. PARAMETERS
  4050. Function  PARAMETERS  assigns local variable names to data items passed  from  a
  4051.           calling program.
  4052.  
  4053. Syntax    PARAMETERS <var list>
  4054.  
  4055. Remarks   The PARAMETERS command must follow the PROCEDURE <proc name> command.
  4056.  
  4057.           The  <var  list>  corresponds  to the <expr  list>  from  the  calling
  4058.           program.  All variables identified in the PARAMETERS list are  private
  4059.           to  that  procedure.  When the procedure ends, the PARAMETER variables
  4060.           are released.
  4061.  
  4062. See Also  DO, PRIVATE, PROCEDURE , PUBLIC, SET PROCEDURE
  4063.  
  4064. PARITY()
  4065. Function  The  PARITY()  function identifies the parity setting of  the  current
  4066.           comm port.
  4067.  
  4068. Syntax    PARITY()
  4069.  
  4070. Returns   CHARACTER
  4071.  
  4072. Valid With     door.sys
  4073.  
  4074. Remarks   PARITY() will return 'EVEN' for even parity and 'NONE' for no parity.
  4075.  
  4076. PASSWORD()
  4077. Function  The PASSWORD() function returns the user's password.
  4078.  
  4079. Syntax    PASSWORD()
  4080.  
  4081. Returns   CHARACTER
  4082.  
  4083. Valid With     pcboard.sys, door.sys, users.sys, callinfo.bbs
  4084.  
  4085. See Also  SECURITY()
  4086.  
  4087. PRIVATE
  4088. Function  PRIVATE creates new memory variables in a lower-level subroutine.
  4089.  
  4090. Syntax    PRIVATE <var list>
  4091.  
  4092. Remarks   Any  changes  made  to private memory variables do  not  affect  other
  4093.           variables  of  the  same  name in higher  level  procedures.   When  a
  4094.           procedure containing a private memory variable ends, the value  hidden
  4095.           by  PRIVATE variable are then available.  Any variables defined  in  a
  4096.           PARAMETERS list are PRIVATE for that subroutine.
  4097.  
  4098. See Also  DO, PARAMETERS, PUBLIC
  4099.  
  4100. PROCEDURE
  4101. Function  PROCEDURE   identifies   the  beginning  of  a  procedure   subroutine
  4102.           definition.
  4103.  
  4104. Syntax    PROCEDURE <proc name>
  4105.           [PARAMETERS <var list>]
  4106.           <commands>
  4107.  
  4108. Remarks   Procedures  can  be  placed  after the main  program  or  in  separate
  4109.           procedure  files.  These procedure files are identified  in  the  main
  4110.           program with the SET PROCEDURE TO command.
  4111.  
  4112.           The   optional  PARAMETERS  variable  list  indicate  PRIVATE   memory
  4113.           variables  corresponding to the parameters passed with DO <proc  name>
  4114.           WITH <expr list>.
  4115.  
  4116.           A  RETURN statement is used to terminate PROCEDURE execution.  If  the
  4117.           RETURN  statement  is  not included, one is assumed  before  the  next
  4118.           PROCEDURE command or the end of file.
  4119.  
  4120. Example   The following program calculates the area of a circle.
  4121.  
  4122.           area = 0
  4123.           DO areacalc WITH 2 , area
  4124.           ? area
  4125.           12.5663600
  4126.  
  4127.           PROCEDURE areacalc
  4128.             PARAMETERS radius, result
  4129.             result = 3.14159 * radius^2
  4130.           RETURN
  4131.  
  4132. See Also  DO, PARAMETERS, SET PROCEDURE
  4133.  
  4134. PROGRAM()
  4135. Function  Returns the name of the currently executing program.
  4136.  
  4137. Syntax    PROGRAM( [<expN>] )
  4138.  
  4139. Returns   CHARACTER
  4140.  
  4141. Remarks   The  name  is  derived from the filename of the source  code  used  to
  4142.           compile the currently running DBX file.
  4143.  
  4144.           The  <expN> parameter always ignored, and is only provided as a  means
  4145.           of compatibility.
  4146.  
  4147. See Also  LINENO()
  4148.  
  4149. PROTOCOL()
  4150. Function  The PROTOCOL() function returns the user's selected protocol.
  4151.  
  4152. Syntax    PROTOCOL()
  4153.  
  4154. Returns   CHARACTER
  4155.  
  4156. Valid With     door.sys, users.sys, callinfo.bbs
  4157.  
  4158. Remarks   The return value will be a single character.  Possible values include:
  4159.  
  4160.  
  4161.   Return Value   Protocol
  4162.        A         ASCII
  4163.        X         Xmodem
  4164.        C         Xmodem-CRC
  4165.        1         Xmodem-1K
  4166.        Y         Ymodem (batch)
  4167.        G         Ymodem-G
  4168.        Z         Zmodem
  4169.        K         Kermit
  4170.  
  4171. PUBLIC
  4172. Function  PUBLIC makes memory variables globally available.
  4173.  
  4174. Syntax    PUBLIC <var list>
  4175.  
  4176. Remarks   All  variables  defined in your program are considered  PUBLIC  unless
  4177.           they  are declared as private within a subroutine using the PARAMETERS
  4178.           or PRIVATE command.
  4179.  
  4180. See Also  PARAMETERS, PRIVATE
  4181.  
  4182. QUIT
  4183. Function  QUIT  stops the execution of the current dB Online session.  dB Online
  4184.           will close all files and return to the calling program (BBS etc.)
  4185.  
  4186. Syntax    QUIT
  4187.  
  4188. Remarks   QUIT will return a 0 to the DOS errorlevel.
  4189.  
  4190. See Also  CANCEL, RETURN
  4191.  
  4192. RCV...()
  4193. Function  Receives a file(s) via the modem.
  4194.  
  4195. Syntax    RCVASCII ( <expC> [ , <expN1> ] )
  4196.           RCVKERMIT ( <expC> [ , <expN1> ] )
  4197.           RCVYMODEM ( <expC> [ , <expN1> [ , <expN2> ] ] )
  4198.           RCVXMODEM ( <expC> [ , <expN1> [ , <expN2> ] ] )
  4199.           RCVZMODEM ( <expC> [ , <expN1> ] )
  4200.  
  4201. Returns   NUMERIC
  4202.  
  4203. Remarks   All of the above functions return the bytes transfered.
  4204.  
  4205.           For  RCVASCII(), RCVKERMIT() and RCVXMODEM(), <expC> represents a path
  4206.           and a filename to store the incoming data into.
  4207.  
  4208.           For  RCVYMODEM() and RCVZMODEM(), <expC> represents  just  a  path  to
  4209.           store the incoming files into.
  4210.  
  4211.           <expN1> is the optional communications handle returned by COPEN().  By
  4212.           default the currently active communications port is used.
  4213.  
  4214.           For RCVYMODEM(), <expN2> may be 1 to represent the use of the Ymodem-G
  4215.           protocol.
  4216.           For RCVXMODEM(), <expN2> is as follows:
  4217.  
  4218.           <expN2>   Function
  4219.           0         Use Xmodem-CRC protocol (default)
  4220.           1         Use Xmodem-1k protocol
  4221.           2         Use Xmodem-G protocol
  4222.  
  4223. See Also  SND...(), COPEN(), CCLOSE()
  4224.  
  4225. READ
  4226. Function  READ  activates all @...GETs issued since the last CLEAR,  CLEAR  ALL,
  4227.           CLEAR GETS, or READ.
  4228.  
  4229. Syntax    READ [SAVE]
  4230.  
  4231. Remarks   READ  allows the user to enter data into multiple fields on  a  single
  4232.           input  screen.  The fields are defined by @...GET commands.  The  user
  4233.           is  allowed  to  tab  through  the input  fields  in  order  to  enter
  4234.           information.  The full screen editing keys are defined in APPENDIX 4.
  4235.  
  4236.           READ  clears all GETs after editing is finished.  The SAVE option does
  4237.           not clear the GETs, they will be active when the next READ command  is
  4238.           issued.
  4239.  
  4240.           If  an  @...GET is issued with a field of a read only file,  then  the
  4241.           read  command will allow the user to browse through the data  but  not
  4242.           change any values.
  4243.  
  4244. Example   To  allow  a  user to enter his name with a maximum of 12  characters.
  4245.           The first character will be forced to uppercase.
  4246.  
  4247.           name = SPACE(12)
  4248.  
  4249.           @ 3,3 SAY "Enter your name: " GET name PICTURE "!XXXXXXXXXXX"
  4250.           READ
  4251.  
  4252. See Also  @...SAY...GET, @...EDIT, CLEAR, CLEAR GETS
  4253.  
  4254. READKEY()
  4255. Function  The READKEY() function returns a value representing the key pressed to
  4256.           exit  a  full screen read statement.  READKEY() also indicates whether
  4257.           any data was changed.
  4258.  
  4259. Syntax    READKEY()
  4260.  
  4261. Returns   NUMERIC
  4262.  
  4263. Remarks   The  READKEY()  return values are identified in the table  below.   If
  4264.           none  of  the data had been changed, the return value is between  zero
  4265.           and  15.   If  any  of  the  data had been changed  the  return  value
  4266.           increases by 256.
  4267.  
  4268.   Key pressed         READKEY()   READKEY()      Meaning
  4269.                       No changes   Changes
  4270.   Left - ^Home - <-   0          256             Backward one character
  4271.   Right               1          257             Forward one character
  4272.   Up                  4          260             Backward one field
  4273.   Down                5          261             Forward one field
  4274.   PgUp                6          262             Backward one screen
  4275.   PgDn                7          263             Forward one screen
  4276.   Esc                 12         ---             Terminate without save
  4277.   ^End - ^W           13         270             Terminate with save
  4278.   Enter - Tab         15         271             Completed last field
  4279.  
  4280. Example   To  determine if the contents of a memory variable were altered and to
  4281.           REPLACE a field if changes were made.
  4282.  
  4283.           @ 2,2 SAY "NAME" GET mname
  4284.           READ
  4285.           IF READKEY() >=256  && if data changed
  4286.             REPLACE name WITH mname
  4287.           ENDIF
  4288.  
  4289. See Also  INKEY(), READ
  4290.  
  4291. RECALL
  4292. Function  RECALL  unmarks records in the current database that have been  marked
  4293.           for deletion.
  4294.  
  4295. Syntax    RECALL
  4296.               [<scope>]
  4297.               [WHILE <expL1>]
  4298.               [FOR <expL2>]
  4299.  
  4300. Remarks   Unless otherwise specified RECALL  unmarks only the current record.
  4301.           RECALL cannot be used with read only files.
  4302.  
  4303. Example
  4304.           USE customer
  4305.           ? DELETED()
  4306.           .T.
  4307.           RECALL
  4308.           ? DELETED()
  4309.           .F.
  4310.  
  4311. See Also  DELETE, DELETED(), PACK, SET DELETED
  4312.  
  4313. RECCOUNT()
  4314. Function  The RECCOUNT() function returns the number of records in the currently
  4315.           selected database.
  4316.  
  4317. Syntax    RECCOUNT()
  4318.  
  4319.  
  4320. Returns   NUMERIC
  4321.  
  4322. Example
  4323.           USE clients.dbf
  4324.           ? RECCOUNT()
  4325.           49
  4326.  
  4327. See Also  DBF(), DISKSPACE(), RECNO(), RECSIZE()
  4328.  
  4329. RECNO()
  4330. Function  The RECNO() function returns the current record number of the selected
  4331.           database.
  4332.  
  4333. Syntax    RECNO()
  4334.  
  4335. Returns   NUMERIC
  4336.  
  4337. Example
  4338.           USE clients.dbf
  4339.           ? RECNO()
  4340.           1
  4341.           SKIP
  4342.           ? RECNO()
  4343.           2
  4344.           GO BOTTOM
  4345.           ? RECNO()
  4346.           49
  4347.  
  4348. See Also  GOTO, RECCOUNT(), SKIP
  4349.  
  4350. RECSIZE()
  4351. Function  The  RECSIZE() functions returns the size of a record in the currently
  4352.           selected database file.
  4353.  
  4354. Syntax    RECSIZE()
  4355.  
  4356. Returns   NUMERIC
  4357.  
  4358. Example
  4359.           USE customer.dbf
  4360.           ? RECSIZE()
  4361.           43
  4362.  
  4363. See Also  DBF(), DISKSPACE(), LUPDATE(),  RECCOUNT()
  4364.  
  4365. REGISTEREDTO()
  4366. Function  Returns the Company Name that dB Online is registered to
  4367.  
  4368. Syntax    REGISTEREDTO()
  4369.  
  4370. Returns   CHARACTER
  4371.  
  4372. Remarks   This  information  is  derived from the DBONLINE.KEY  file.   If  this
  4373.           version is shareware, then this will return a blank string.
  4374.  
  4375. See Also  SERIALNO()
  4376.  
  4377. REINDEX
  4378. Function  REINDEX rebuilds all active index files in the current work area.
  4379.  
  4380. Syntax    REINDEX
  4381.  
  4382. Remarks   Only index files that have been opened with the corresponding database
  4383.           file will be rebuilt.
  4384.  
  4385.           REINDEX cannot be used with read only files.
  4386.  
  4387. See Also  PACK, SET INDEX, USE
  4388.  
  4389. RENAME
  4390. Function  RENAME changes the name of a file on disk.
  4391.  
  4392. Syntax    RENAME <filename1> TO <filename2>
  4393.  
  4394. Remarks   If  drive specifiers are used, they must both indicate the same drive.
  4395.           RENAME cannot be used to copy files to different drives.
  4396.  
  4397. REPLACE
  4398. Function  REPLACE  changes  the  contents of specified  fields  in  the  current
  4399.           database.
  4400.  
  4401. Syntax    REPLACE
  4402.               [<scope>] <field> WITH <expr> [,<field> WITH <expr> ...]
  4403.               [WHILE <expL1>]
  4404.               [FOR <exp2L>]
  4405.  
  4406. Remarks   REPLACE only changes the current record unless otherwise specified  by
  4407.           the <scope>, WHILE or FOR expressions.
  4408.  
  4409.           The <field> and WITH <expr> must have the same data type.
  4410.  
  4411.           If  replacements are made on a key field of an index file will  update
  4412.           the  index  file  if  it's in use.  Thus the <scope>,  WITH,  and  FOR
  4413.           conditions  will not operate properly as the record order will  change
  4414.           as  the  records  are  replaced.  The records should  be  replaced  in
  4415.           natural order when replacing more than a single record.
  4416.  
  4417.           REPLACE cannot be used with read only files.
  4418.  
  4419. Example   To raise all product costs by 10%:
  4420.  
  4421.           USE product INDEX part_no
  4422.           SET ORDER TO 0 && Record ordering
  4423.           REPLACE ALL part_no WITH part_no * 1.10
  4424.  
  4425. REPLICATE()
  4426. Function  The  REPLICATE() function repeats a character expression  a  specified
  4427.           number of times.
  4428.  
  4429. Syntax    REPLICATE(<expC>,<expN>)
  4430.  
  4431. Returns   CHARACTER
  4432.  
  4433. Remarks   Returns   <expC>  repeated  <expN>  times.   The  resulting  character
  4434.           expression must not exceed 254 characters.
  4435.  
  4436. Example   REPLICATE can be used to create bar graphs
  4437.  
  4438.           percent1 = 30
  4439.           percent2 = 60
  4440.           ? percent1, REPLICATE('*',percent1/10)
  4441.           30 ***
  4442.           ? percent2, REPILCATE('*',percent2/10)
  4443.           60 ******
  4444.  
  4445. See Also  SPACE()
  4446.  
  4447. RESTORE
  4448. Function  RESTORE retrieves memory variables from a memory file.
  4449.  
  4450. Syntax    RESTORE FROM <filename>
  4451.  
  4452. Remarks   A .mem file extension is assumed unless otherwise specified.
  4453.  
  4454.           Any  current  memory  variables with the  same  name  as  those  being
  4455.           restored  are overwritten.  The RESTORed variables will have the  same
  4456.           scope (PUBLIC, PRIVATE) as when the were SAVEed.
  4457.  
  4458.           All current memory variables are retained when using RESTORE.
  4459.  
  4460. Example
  4461.  
  4462.           variable = "Hello"
  4463.           SAVE TO memfile
  4464.           variable = ""
  4465.           RESTORE FROM memfile
  4466.           ? variable
  4467.           Hello
  4468.  
  4469. See Also  SAVE, STORE
  4470.  
  4471. RETRY
  4472. Function  RETRY  completes subroutine execution and returns program  control  to
  4473.           the command that called the subroutine.
  4474.  
  4475. Syntax    RETRY
  4476.  
  4477. Remarks   RETRY  is used mainly in error recovery where it can repeat a  command
  4478.           until  it is successfully executed.  RETRY will re-execute the command
  4479.           that called the current subroutine.  This is in contrast to the RETURN
  4480.           command that executes the command after the calling command.
  4481.  
  4482.           If  a runtime error occurs in a program that has a routine defined  by
  4483.           ON  ERROR  DO,  then  RETRY  can be used to re-attempt  the  erroneous
  4484.           command when the error conditions are corrected.
  4485.  
  4486. Example   The  following program will recover from the error:  File  is  already
  4487.           open.
  4488.  
  4489.           ON ERROR DO recover
  4490.           <commands>
  4491.           USE customer
  4492.           <commands>
  4493.           RETURN
  4494.  
  4495.           PROCEDURE recover
  4496.             IF ERROR() =  3
  4497.               CLOSE DATABASES
  4498.               RETRY && attempt to USE again
  4499.             ENDIF
  4500.           RETURN
  4501.  
  4502. See Also  ERROR(), ON ERROR, RETURN
  4503.  
  4504. RETURN
  4505. Function  RETURN  completes  procedure/function execution  and  returns  program
  4506.           control to the calling program.  The command after the calling command
  4507.           is then executed.
  4508.  
  4509. Syntax    RETURN [TO MASTER | <expr>]
  4510.  
  4511. Remarks   The  TO MASTER option will return program control to the highest level
  4512.           calling program.  This allows a simple method of RETURNing from nested
  4513.           procedures.
  4514.  
  4515.           If  the  RETURN  command is not included at the end of  a  program  or
  4516.           procedure  file  a  RETURN is assumed before  the  next  PROCEDURE  or
  4517.           FUNCTION statement or the end of file.
  4518.  
  4519.           RETURN releases all PRIVATE variables of a procedure.
  4520.  
  4521.           If  the RETURN statement contains an expression, then it must be  part
  4522.           of a FUNCTION declaration.
  4523.  
  4524. See Also  DO, PRIVATE, PROCEDURE, FUNCTION
  4525.  
  4526. RIGHT()
  4527. Function  The RIGHT() function returns a specified number of characters from the
  4528.           end of a character expression.
  4529.  
  4530. Syntax    RIGHT(<expC>,<expN>)
  4531.  
  4532. Returns   CHARACTER
  4533.  
  4534. Remarks   Return  the last <expN> characters of <expC>.  If <expN> is less  than
  4535.           or  equal  to  zero,  then a null string is returned.   If  <expN>  is
  4536.           greater than the length of <expC> then the entire string is returned.
  4537.  
  4538. Example
  4539.           ? RIGHT('Hello Bob',3)
  4540.           Bob
  4541.  
  4542. See Also  LEFT(), LTRIM(), SUBSTR(), TRIM()
  4543.  
  4544. RLOCK()
  4545. Function  The  RLOCK() function attempts to lock the current record and  returns
  4546.           the whether it was successful.
  4547.  
  4548. Syntax    RLOCK() | LOCK()
  4549.  
  4550. Remarks   RLOCK()  will  return True (.T.) if dB Online was  able  to  lock  the
  4551.           current  record.   It will return False (.F.) otherwise.   Any  record
  4552.           that has been locked by another user cannot be written to.
  4553.  
  4554.           A  record  remains locked until the the record pointer is  moved,  the
  4555.           file is closed, or the UNLOCK command is issued.
  4556.  
  4557.           RLOCK() will re-attempt to lock the current record based on the  value
  4558.           of SET REPROCESS TO.
  4559.  
  4560. Example
  4561.           IF RLOCK()
  4562.             DO editproc  && edit the record
  4563.           ELSE
  4564.             CLEAR
  4565.             ? "Unable to lock record"
  4566.             RETURN
  4567.           ENDIF
  4568.  
  4569. See Also  FLOCK(), LOCK(), SET EXCLUSIVE, SET REPROCESS, UNLOCK, USE
  4570.  
  4571. ROUND()
  4572. Function  The  ROUND()  function  rounds off numbers to a  specified  number  of
  4573.           decimal places.
  4574.  
  4575. Syntax    ROUND(<expN1>,<expN2>)
  4576.  
  4577. Returns   NUMERIC
  4578.  
  4579. Remarks   Returns <expN1> rounded off to <expN2> decimal places.  If <expN2>  is
  4580.           negative,  Round() returns a rounded whole number.
  4581.  
  4582. Example
  4583.           ? ROUND(123.4567,2)
  4584.                 123.46
  4585.           ? ROUND(123.4567,0)
  4586.                 123
  4587.           ? ROUND(123.4567,-1)
  4588.                 120
  4589.  
  4590. See Also  INT()
  4591.  
  4592. ROW()
  4593. Function  he  ROW()  function  returns  the row number  of  the  current  cursor
  4594.           position on the local and remote screens.
  4595.  
  4596. Syntax    ROW()
  4597.  
  4598.  
  4599. Returns   NUMERIC
  4600.  
  4601. Remarks   Returns the current row number between 0 and 24.
  4602.  
  4603. Example
  4604.           CLEAR
  4605.           ? ROW()
  4606.              1
  4607.           ? ROW()
  4608.              2
  4609.  
  4610. See Also  @...SAY...GET, ROW()
  4611.  
  4612. RTRIM()
  4613. Function  The   RTRIM()  function  removes  trailing  blanks  from  a  character
  4614.           expression.
  4615.  
  4616. Syntax    RTRIM(<expC>)
  4617.  
  4618. Returns   CHARACTER
  4619.  
  4620. Remarks   The RTRIM() function is identical to the TRIM() function.
  4621.  
  4622. Example
  4623.           title = "Mr.     "
  4624.           name = "Jones"
  4625.           ? title + name
  4626.           Mr.     Jones
  4627.           ? RTRIM(title)+' '+name
  4628.           Mr. Jones
  4629.  
  4630. See Also  LEFT(), LTRIM(), RIGHT(), TRIM()
  4631.  
  4632. RUN
  4633. Function  RUN executes a DOS command from within dB Online.
  4634.  
  4635. Syntax    RUN | ! <dos command>
  4636.  
  4637. Remarks   All parameters must be included in <dos command> above.  There must be
  4638.           enough memory to shell another version of COMMAND.COM
  4639.  
  4640.           RUN is only available in the Registered and Pro versions of dB Online.
  4641.  
  4642. Example   To download a file using DSZ.exe with dB Online.
  4643.  
  4644.           file = "data.zip"
  4645.           command = "dsz " + file
  4646.           ? "Please start you zmodem download"
  4647.           RUN &command
  4648.  
  4649. SAVE
  4650. Function  SAVE  stores all or part of the current set of memory variables  to  a
  4651.           disk file.
  4652.  
  4653. Syntax    SAVE TO <filename>
  4654.               [ALL LIKE | EXCEPT <var name spec>]
  4655.  
  4656. Remarks   The   default  extension  for  <filename>  is  .MEM  unless  otherwise
  4657.           specified.
  4658.  
  4659.           If  the  ALL LIKE|EXCEPT option is not used then all current variables
  4660.           are saved to disk.
  4661.  
  4662.           In  <var name spec>, a question mark (?) masks a single character  and
  4663.           an asterisk (*) masks any number of characters.
  4664.  
  4665. Example   To SAVE all memory variables beginning with 'user' to file.mem
  4666.  
  4667.           SAVE TO file ALL LIKE user*
  4668.  
  4669. See Also  RESTORE, STORE
  4670.  
  4671. SECURITY()
  4672. Function  The SECURITY() function returns the user's security level.
  4673.  
  4674.  
  4675. Syntax    SECURITY( [ <expN> ])
  4676.  
  4677. Returns   NUMERIC
  4678.  
  4679. Remarks   SECURITY()  will accept an optional numeric expression  to  allow  the
  4680.           value to be changed.
  4681.           This can be done using the new EQUALS command. eg:
  4682.                = SECURITY(23)
  4683.  
  4684. Valid With       exitinfo.bbs,  door.sys,  dorinfox.def,  users.sys,  chain.txt,
  4685.           callinfo.bbs
  4686.  
  4687. See Also  PASSWORD()
  4688.  
  4689. SEEK
  4690. Function  SEEK  searches for the first record in the active index of the current
  4691.           database whose key matches a specified expression.
  4692.  
  4693. Syntax    SEEK <expC> | <expD> | <expN>
  4694.  
  4695. Remarks   The expression must have the same data type as the active index key.
  4696.  
  4697.           For  character  searches,  the result of the  search  depends  on  the
  4698.           setting  of  SET  EXACT.  If SET EXACT is ON the key expression  would
  4699.           have  to  match  the full length of the index key.  However  with  SET
  4700.           EXACT  OFF a partial string will match the first occurrence in a index
  4701.           key.
  4702.  
  4703.           If  the search is successful the FOUND() flag is set to True(.T.).  If
  4704.           the  search is unsuccessful the record pointer moves to the end of the
  4705.           file and FOUND() is set to False (.F.).
  4706.  
  4707. Example
  4708.           USE customer INDEX name
  4709.           SET EXACT OFF
  4710.           SEEK "Smi"
  4711.           ? name
  4712.           Smith
  4713.           SET EXACT ON
  4714.           SEEK "Smi"
  4715.           ? FOUND()
  4716.           .F.
  4717.  
  4718. See Also  EOF(),  FOUND(), LOCATE, SET DELETED, SET INDEX, SET EXACT, SET ORDER,
  4719.           USE
  4720.  
  4721. SELECT()
  4722. Function  Returns the currently selected work area
  4723.  
  4724. Syntax    SELECT( [<expN>] )
  4725.  
  4726. Remarks   If  you include <expN>, and it equals 1, then the last available  work
  4727.           area is returned.
  4728.  
  4729. See Also  SELECT
  4730.  
  4731. SELECT
  4732. Function  SELECT chooses a work area from the twenty available work areas.
  4733.  
  4734. Syntax    SELECT <expN> | <alias>
  4735.  
  4736. Remarks   Work areas are <integers> numbered from 1 to 20, or A through J (Alpha
  4737.           aliasing can only access the first 10 work areas).  When you start  up
  4738.           your dB Online application, the active work area is one.
  4739.  
  4740.           Each  work area can contain one open database file and it's associated
  4741.           index and memo files.  You can use SELECT to change work areas so that
  4742.           the database in the new work area becomes the active database file.
  4743.  
  4744.           You  can  also  use SELECT by specifying the <alias> of a  work  area.
  4745.           This  <alias>  is  specified  when the database  is  opened  with  the
  4746.           USE...ALIAS  command.   If the ALIAS command  is  not  used  then  the
  4747.           database filename minus the extension is the default alias name.
  4748.  
  4749.           If you specify 0 for <expN>, then the next available area is used.
  4750.  
  4751.           Each  work  area  maintains its own record pointer and moving  between
  4752.           work  areas does not affect the position of any record pointers.   All
  4753.           work areas operate independently of each other unless related with SET
  4754.           RELATION TO.
  4755.  
  4756.           Fields  in  the  current work are accessed by simply indicating  their
  4757.           field  name.   To access fields from other work areas you can  specify
  4758.           fields in other work areas by using the aliasing indicator:
  4759.  
  4760.           alias->field      or      alias.field
  4761.  
  4762. Example
  4763.           SELECT a
  4764.           USE customer
  4765.           ? name
  4766.           Smith
  4767.           SELECT 2
  4768.           USE sales
  4769.           ? a->name
  4770.           Smith
  4771.           ? subtotal
  4772.           23.45
  4773.  
  4774. See Also  SET INDEX, USE, SELECT()
  4775.  
  4776. SERIALNO()
  4777. Function  Returns dB OnlineÆs Serial Number
  4778.  
  4779. Syntax    SERIALNO()
  4780.  
  4781. Returns   CHARACTER
  4782.  
  4783. Remarks   This  information  is  derived from the DBONLINE.KEY  file.   If  this
  4784.           version is shareware, then this will return a blank string.
  4785.  
  4786. See Also  REGISTEREDTO()
  4787.  
  4788. SET ALTERNATE
  4789. Function  SET  ALTERNATE  records  all output other  than  that  of  full-screen
  4790.           commands to a text file.
  4791.  
  4792. Syntax    SET ALTERNATE on | OFF
  4793.           SET ALTERNATE TO [<filename>]
  4794.  
  4795. Remarks   SET ALTERNATE is OFF by default.
  4796.  
  4797.           This command consists of two parts:
  4798.  
  4799.           SET  ALTERNATE TO <filename> creates and opens an ALTERNATE file.   It
  4800.           overwrites  any  file with the same name.  A .TXT  file  extension  is
  4801.           assumed unless otherwise specified.
  4802.  
  4803.           SET  ALTERNATE  ON starts recording of text output to the  text  file.
  4804.           Full screen commands such as @..SAY...GET are not recorded.
  4805.  
  4806.           SET ALTERNATE OFF suspends the recording of output to the file without
  4807.           closing the file.  Recording can be restarted with SET ALTERNATE ON.
  4808.  
  4809.           The file is closed with the SET ALTERNATE TO command or the equivalent
  4810.           CLOSE ALTERNATE.
  4811.  
  4812. Example   To flag a file to be downloaded in PCBoard:
  4813.  
  4814.           file = "program.zip"
  4815.           SET ALTERNATE TO pcbstuff.kbd
  4816.           SET ALTERNATE ON
  4817.           SET CONSOLE OFF     && To avoid output to screen
  4818.           ?? "FLAG " + file
  4819.           ?
  4820.           SET CONSOLE ON
  4821.           SET ALTERNATE TO    &&Closes pcbstuff.kbd
  4822.  
  4823. See Also  CLOSE
  4824.  
  4825. SET BELL
  4826. Function  SET  BELL  determines whether a bell is sounded when an  invalid  data
  4827.           type  is  entered  in an entry field or the end of an  input  area  is
  4828.           reached.
  4829.  
  4830. Syntax    SET BELL ON | off
  4831.  
  4832. Remarks   SET BELL is ON by default
  4833.  
  4834. See Also  @...SAY...GET, SET CONFIRM
  4835.  
  4836. SET CENTURY
  4837. Function  SET  CENTURY  allows the input and display of centuries  in  the  year
  4838.           portion of dates.
  4839.  
  4840. Syntax    SET CENTURY on | OFF
  4841.  
  4842. Remarks   SET CENTURY is OFF by default.
  4843.  
  4844.           Date  display and entry will only allow for 6 significant digits  when
  4845.           SET  CENTURY  is  OFF.   Thus all dates entered will  default  to  the
  4846.           twentieth century.  However any date calculation that result  in  non-
  4847.           twentieth century dates will be stored with the correct century.
  4848.  
  4849.           With  SET  CENTURY ON date display and entry will allow 8  significant
  4850.           digits.  Thus century information can be fully specified.
  4851.  
  4852. Example
  4853.  
  4854.           ? DATE()
  4855.           10/21/93
  4856.           SET CENTURY ON
  4857.           ? DATE()
  4858.           10/21/1993
  4859.  
  4860. See Also  CTOD(), DATE(), DTOC(), YEAR()
  4861.  
  4862. SET COLOR
  4863. Function  SET COLOR allows custom color selection for both standard and enhanced
  4864.           output.
  4865.  
  4866. Syntax    SET COLOR TO [<standard>[,<enhanced>]]
  4867.  
  4868. Remarks   SET  COLOR  is  only  operational in  ANSI  terminal  operation.   The
  4869.           <standard>  colors are used for normal text output and the  <enhanced>
  4870.           colors are used for @...GET input fields and error message outputs.
  4871.  
  4872.           The default colors upon startup are:         Standard: White on Black
  4873.                                    Enhanced: Black on White
  4874.  
  4875.           SET COLOR TO R  will re-select the default colors.
  4876.  
  4877.           The <standard> and <enhanced> colors are specified as follows:
  4878.  
  4879.     Color        Letter Code      Intense Color    Letter Code
  4880.     Black         N or blank        Dark Gray           N+
  4881.      Blue             B             Light Blue          B+
  4882.      Red              R             Light Red           R+
  4883.     Green             G            Light Green          G+
  4884.      Cyan             BG            Light Cyan         BG+
  4885.    Magenta            RB          Light Magenta        RB+
  4886.     Brown             GR              Yellow           GR+
  4887.   Light Gray       RGB or W           White         RGB+ or W+
  4888.     Blank             X              Flashing           *
  4889.  
  4890.           Foreground  and background colors are separated by a slash  (/).   The
  4891.           intense  colors are only available in the foreground.  If an  asterisk
  4892.           (*) is present then the output will be flashing.
  4893.  
  4894.           The  Blank (X) color specifier will output blank characters.  This  is
  4895.           useful for password entry.
  4896.  
  4897. Example   The following SET COLOR commands are explained:
  4898.  
  4899.           *  Standard:  Yellow on a Red background. Enhanced:  White  on  a  Red
  4900.           background.
  4901.           SET COLOR TO GR+/R,W/R
  4902.           *  Standard:  White on a Blue background. Enhanced: Black  on  a  Cyan
  4903.           background.
  4904.           SET COLOR TO W+/B,N/BG
  4905.  
  4906. See Also  ISCOLOR(), SET INTENSITY
  4907.  
  4908. SET COMPATIBLE
  4909. Function  SET COMPATIBLE alters how some commands function.
  4910.  
  4911. Syntax    SET COMPATIBLE TO [ FOXPLUS | DB4 | DB3PLUS | ON | OFF ]
  4912.  
  4913. Remarks   FOXPLUS is the default.  ON is the same as FOXPLUS and OFF is the same
  4914.           as DB4.
  4915.  
  4916. SET CONFIRM
  4917. Function  SET  CONFIRM determines whether the cursor moves automatically to  the
  4918.           next entry field when the current field is full.  This command affects
  4919.           only full screen functions.
  4920.  
  4921. Syntax    SET CONFIRM on | OFF
  4922.  
  4923. Remarks   SET   CONFIRM  is  OFF  by  default.   This  causes  the   cursor   to
  4924.           automatically  advance from one field to the next  in  a  full  screen
  4925.           @...GET  READ command.
  4926.  
  4927.           SET  CONFIRM ON causes the cursor to remain in the field until  the  R
  4928.           key is pressed.
  4929.  
  4930. See Also  @...SAY...GET, SET BELL
  4931.  
  4932. SET CONSOLE
  4933. Function  SET  CONSOLE determines whether output is sent to the local and remote
  4934.           terminals.
  4935.  
  4936. Syntax    SET CONSOLE ON | off
  4937.  
  4938. Remarks   SET  CONSOLE is ON by default.  This causes all output to be  sent  to
  4939.           the local and remote terminals.
  4940.  
  4941.           SET  CONSOLE  OFF  does  not send output to  either  local  or  remote
  4942.           terminals.   This  is  useful  for writing  files  to  disk  with  SET
  4943.           ALTERNATE.
  4944.  
  4945. See Also  SET ALTERNATE
  4946.  
  4947. SET CURRENCY
  4948. Function  Defines  the  currency symbol and position in the display  of  numeric
  4949.           expressions
  4950.  
  4951. Syntax    SET CURRENCY TO [<expC>]
  4952.           or
  4953.           SET CURRENCY LEFT | RIGHT
  4954.  
  4955. Remarks   If <expC> is omited, the dollar sign ($) will be used.
  4956.  
  4957. SET DATE
  4958. Function  Specifies the format for the display of date expressions
  4959.  
  4960. Syntax    SET  DATE [TO] AMERICAN | ANSI | BRITSH | FRENCH | GERMAN | ITALIAN  |
  4961.           JAPAN | USA | MDY | DMY | YMD
  4962.  
  4963. Remarks   The following is a table of formats for the above settings:
  4964.  
  4965.               Setting           Format
  4966.           AMERICAN             mm/dd/yy
  4967.           ANSI                 yy.mm.dd
  4968.           BRITSH / FRENCH      dd/mm/yy
  4969.           GERMAN               dd.mm.yy
  4970.           ITALIAN              dd-mm-yy
  4971.           JAPAN                yy/mm/dd
  4972.           USA                  mm-dd-yy
  4973.           MDY                  mm/dd/yy
  4974.           DMY                  dd/mm/yy
  4975.           YMD                  yy/mm/dd
  4976.  
  4977. See Also  SET MARK
  4978.  
  4979. SET DECIMALS
  4980. Function  SET  DECIMALS determines the minimum number of decimals to display for
  4981.           the results of numeric calculations.
  4982.  
  4983. Syntax    SET DECIMALS TO <expN>
  4984.  
  4985. Remarks   SET DECIMALS is set to 2 by default.
  4986.  
  4987.           SET  DECIMALS applies to division, exponents, EXP(), LOG(), SQRT() and
  4988.           VAL()  functions.   If SET FIXED is ON, SET DECIMALS  applies  to  all
  4989.           numeric output.
  4990.  
  4991. Example
  4992.           SET DECIMALS TO 2
  4993.           ? 1/4
  4994.               0.25
  4995.           ? 1/4.000
  4996.               0.250
  4997.           ? SQRT(3.452)
  4998.               1.86
  4999.           SET DECIMALS TO 5
  5000.           ? 1/4
  5001.               0.25000
  5002.  
  5003. See Also  SET FIXED
  5004.  
  5005. SET DEFAULT
  5006. Function  SET  DEFAULT determines the default drive to where all operations take
  5007.           place and files are stored unless otherwise specified.
  5008.  
  5009. Syntax    SET DEFAULT TO <drive>
  5010.  
  5011. Remarks   SET DEFAULT is set to the drive that dB Online was started up from.
  5012.  
  5013.           SET  DEFAULT does not check if the given disk drive exists and it does
  5014.           not change the default drive when dB Online exits.
  5015.  
  5016. Example   To set the default drive to D:
  5017.  
  5018.           SET DEFAULT TO d
  5019.  
  5020. See Also  SET PATH
  5021.  
  5022. SET DELETED
  5023. Function  SET  DELETED  determines  whether  records  marked  for  deletion  are
  5024.           included in the execution of dB Online commands.
  5025.  
  5026. Syntax    SET DELETED on | OFF
  5027.  
  5028. Function  SET DELETED is OFF by default.
  5029.  
  5030.           With  SET DELETED ON, most commands will not recognize records  marked
  5031.           for delete as part of the database.  Commands like LOCATE or LIST will
  5032.           not  display  deleted records.  Commands that specify a record  number
  5033.           using RECORD <n> or GO|GOTO <n> will included deleted records.
  5034.  
  5035. See Also  DELETE, DELETED(), RECALL
  5036.  
  5037. SET DELIMITERS
  5038. Function  SET  DELIMITERS  determines how fields are  indicated  in  full-screen
  5039.           editing mode.
  5040.  
  5041. Syntax    SET DELIMITERS on | OFF
  5042.           SET DELIMITERS TO [<expC> | DEFAULT]
  5043.  
  5044. Remarks   SET DELIMITERS is OFF by default.  This causes entry fields not to  be
  5045.           enclosed  by  delimiter  characters.  If SET INTENSITY  is  ON,  entry
  5046.           fields are display in enhanced colors.
  5047.  
  5048.           SET  DELIMITERS ON will enclose entry fields by the default delimiters
  5049.           of colons (:).
  5050.  
  5051.           SET DELIMITERS TO <expC> changes the default delimiter characters.  If
  5052.           a  single  character is specified then it is used to delimit both  the
  5053.           beginning and end of the entry field.  If two characters are specified
  5054.           then the first marks the beginning and the second marks the end.   Any
  5055.           extra characters are ignored.
  5056.  
  5057.           SET DELIMITERS TO DEFAULT returns the delimiters to colons (:)
  5058.  
  5059. See Also  @...SAY...GET, SET INTENSITY
  5060.  
  5061. SET ESCAPE
  5062. Function  SET ESCAPE determines whether pressing E terminates program execution.
  5063.  
  5064. Syntax    SET ESCAPE ON | off
  5065.  
  5066. Remarks   SET  ESCAPE  is ON by default.  This causes the dB Online  program  to
  5067.           terminate  when the user presses the E key.  Escape key trapping  with
  5068.           ON ESCAPE is only available with SET ESCAPE ON.
  5069.  
  5070.           With  SET  ESCAPE OFF  the E key does not terminate program execution.
  5071.           The  keypress  may  be  determined like any other  keypress  with  the
  5072.           INKEY() function.
  5073.  
  5074. See Also  INKEY(), ON ESCAPE, READKEY()
  5075.  
  5076. SET EXACT
  5077. Function  SET  EXACT  determines  whether  a comparison  between  two  character
  5078.           strings requires an exact match.
  5079.  
  5080. Syntax    SET EXACT on | OFF
  5081.  
  5082. Remarks   SET EXACT is OFF by default.  This causes character string comparisons
  5083.           to  be True (.T.) if the strings are identical up to the length of the
  5084.           second string.
  5085.  
  5086.           With  SET  EXACT  ON the character strings must be  exactly  the  same
  5087.           before a True (.T.) is returned.
  5088.  
  5089.           SET EXACT also applies to the SEEK command with character index keys.
  5090. Example
  5091.           SET EXACT OFF
  5092.           ? "abc" = "abcdef"
  5093.           .F.
  5094.           ? "abcdef" = "abc"
  5095.           .T.
  5096.           SET EXACT ON
  5097.           ? "abcdef" = "abc"
  5098.           .F.
  5099.  
  5100. See Also  LOCATE, SEEK, =
  5101.  
  5102. SET EXCLUSIVE
  5103. Function  SET  EXCLUSIVE allows the shared use of database file on a  multi-user
  5104.           system.
  5105.  
  5106. Syntax    SET EXCLUSIVE ON | off
  5107.  
  5108. Remarks   SET  EXCLUSIVE is ON by default.  This means that all data  files  are
  5109.           opened in exclusive mode.  Any other user attempting to open the  will
  5110.           receive an error.
  5111.  
  5112.           SET EXCLUSIVE OFF enables multi-user access to the database files.  dB
  5113.           Online  will provide file and record locking for database files  in  a
  5114.           method native to your DataBase Management System.
  5115.  
  5116. See Also  FLOCK(), LOCK(), RLOCK(), SET LOCK, SET REPROCESS, UNLOCK, USE
  5117.  
  5118. SET FILTER
  5119. Function  SET  FILTER allows only records that meet a specified condition to  be
  5120.           displayed.
  5121.  
  5122. Syntax    SET FILTER TO [<expL>]
  5123.  
  5124. Remarks   All  commands  that access database records can be used with  the  SET
  5125.           FILTER TO <expL> condition.
  5126.  
  5127.           SET  FILTER  only applies to the current database work area.   Thus  a
  5128.           different condition may be set for each work area.
  5129.  
  5130.           All  records  for  which  <expL>  is  True  (.T.)  are  available  for
  5131.           processing and any for which <expL> is False (.F.) are ignored.
  5132.  
  5133.           Filter  conditions  are not valid until the record  pointer  is  moved
  5134.           after  the  SET  FILTER TO command is executed.  You  must  move  your
  5135.           record pointer with GOTO TOP or SKIP to ensure the filter condition is
  5136.           valid.
  5137.  
  5138.           SET  FILTER  TO  R turns of a filter for the current work  area.   All
  5139.           records are then available for processing.
  5140.  
  5141. Example   To count the number of customers in New York:
  5142.  
  5143.           USE customer
  5144.           SET FILTER TO state = "NY"
  5145.           COUNT TO number
  5146.  
  5147.           To total all sales in October 1993:
  5148.  
  5149.           USE sales
  5150.           SET FILTER TO MONTH(saledate) = 10 .AND. YEAR(saledate) = 1993
  5151.           SUM price * quantity TO total
  5152.  
  5153. See Also  SET DELETED
  5154.  
  5155. SET FIXED
  5156. Function  SET  FIXED  determines whether a fixed number of  decimal  places  are
  5157.           displayed for all numeric output.
  5158.  
  5159. Syntax    SET FIXED on | OFF
  5160.  
  5161. Remarks   SET FIXED is OFF by default.  This causes the number of decimal places
  5162.           for numeric output to be as explained in the SET DECIMALS command.
  5163.  
  5164.           If  SET FIXED is ON all numeric output will have the number of decimal
  5165.           places identified by SET DECIMALS TO.
  5166.  
  5167. See Also  SET DECIMALS
  5168.  
  5169. SET INDEX
  5170. Function  SET INDEX opens specified index files in the current work area.
  5171.  
  5172. Syntax    SET INDEX TO [<filename> [,<filename>]...]
  5173.  
  5174. Remarks   The  default  file  extension is determined  by  which  database  file
  5175.           compatibility  you have chosen with dB Online.  For  dBASE  III+  file
  5176.           compatibility  the default extension is .NDX, for Clipper:  .NTX,  for
  5177.           dBASE IV: .MDX, and for FoxPro: .CDX
  5178.  
  5179.           SET  INDEX closes all indexes in the current work area before  opening
  5180.           the  ones  specified in the file list.  SET INDEX TO R will close  all
  5181.           index file in the current work area and is equivalent to CLOSE INDEX.
  5182.  
  5183.           The  first  tag of the first index file specified becomes  the  master
  5184.           index  for the current database (Tags do not apply to dBASE  III+  and
  5185.           Clipper  file compatibility).  The master index determines the  record
  5186.           order  as  well  as the search key for the SEEK command.   The  record
  5187.           pointer is positioned at the first logical record of the index key.
  5188.  
  5189.           All  open  index files are updated when changes are made to a database
  5190.           file.
  5191.  
  5192. See Also  SET ORDER, USE
  5193.  
  5194. SET INTENSITY
  5195. Function  SET  INTENSITY determines whether the enhanced screen colors are  used
  5196.           for full screen data entry fields.
  5197.  
  5198. Syntax    SET INTENSITY ON | off
  5199.  
  5200. Remarks   SET  INTENSITY  is  ON by default.  This causes all full  screen  data
  5201.           entry  fields (@...GETs) to be displayed in the enhanced screen  color
  5202.           as  determined by SET COLOR TO.  All other text output is displayed in
  5203.           the standard screen color.
  5204.  
  5205.           If  SET  INTENSITY is OFF, then the standard screen color is used  for
  5206.           all data output.
  5207.  
  5208. See Also  @...SAY...GET, SET COLOR, SET DELIMITERS
  5209.  
  5210. SET LOCK
  5211. Function  SET  LOCK  allows the current record of a database file to  be  locked
  5212.           before reading.
  5213.  
  5214. Syntax    SET LOCK on | OFF
  5215.  
  5216. Remarks   SET LOCK is OFF by default.  This mean that records are not locked  as
  5217.           they  are read into the record buffer.  This allows users to view  the
  5218.           same record simultaneously.
  5219.  
  5220.           With  SET LOCK ON, any record is automaticallly locked before reading.
  5221.           This ensures that there can be no changed to the data once it is read.
  5222.           While  this  greatly simplifies creating multi-user applications.   It
  5223.           increases the chances that another user will have to wait for a record
  5224.           if he only wants to view it.
  5225.  
  5226. See Also  FLOCK(), LOCK(), RLOCK(), SET EXCLUSIVE, SET REPROCESS,  UNLOCK
  5227.  
  5228. SET MARK
  5229. Function  Specifies the delimeter used to display dates
  5230.  
  5231. Syntax    SET MARK TO [<expC>]
  5232.  
  5233. Remarks   SET MARK TO specifies the character that separates the month, day, and
  5234.           year in displayed dates.
  5235.  
  5236.           If you omit <expC>, then the default forward slash (/) will be used.
  5237.  
  5238. Example
  5239.           ? DATE()
  5240.           08/01/94
  5241.           SET MARK TO æ-Æ
  5242.           ? DATE()
  5243.           08-01-94
  5244.  
  5245. See Also  SET DATE
  5246.  
  5247. SET MEMOWIDTH
  5248. Function  SET MEMOWIDTH determines the width for memo field output.
  5249.  
  5250. Syntax    SET MEMOWIDTH TO <expN>
  5251.  
  5252. Remarks   SET  MEMOWIDTH TO has a default value of 50 by default.   The  minimum
  5253.           value is 8 characters.
  5254.  
  5255.           All  memo output using the ?|?? or LIST|DISPLAY commands will be  word
  5256.           wrapped within a column width defined by SET MEMOWIDTH TO.
  5257.  
  5258. SET ORDER
  5259. Function  SET ORDER sets up an open index file as the master index.
  5260.  
  5261. Syntax    SET ORDER TO [<expN> | TAG <tag>]
  5262.  
  5263. Remarks   SET ORDER TO changes the master index from the available index tags.
  5264.  
  5265.           If  SET ORDER TO <expN> is used then the master index becomes the  tag
  5266.           corresponding to the value of <expN>.  For dBASE III+ and Clipper file
  5267.           compatibility  this  number corresponds  to  the  index  file  on  the
  5268.           USE...INDEX  or  SET  INDEX  TO  list.   For  dBASE  IV   and   FoxPro
  5269.           compatibility  it corresponds to the all the tags of  the  index  file
  5270.           list.
  5271.  
  5272.           If  SET ORDER TO TAG <tag> is used then a search is made for the first
  5273.           tag  whose name matches <tag>.  The tag names for dBASEIII and Clipper
  5274.           index  files  correspond to the index file names without the  filename
  5275.           extension.
  5276.  
  5277.           SET ORDER TO 0 returns the database to natural record ordering.
  5278.  
  5279. See Also  CDX(), MDX(), NDX(), SET INDEX
  5280.  
  5281. SET PATH
  5282. Function  SET  PATH  determines the directories dB Online will  search  to  find
  5283.           files not in the current directory.
  5284.  
  5285. Syntax    SET PATH TO [<path list>]
  5286.  
  5287. Remarks   By  default dB Online only searches the current directory.  If a <path
  5288.           list>  is  specified dB Online will search for a file in  the  current
  5289.           directory first and then in the directories specified.
  5290.  
  5291.           The <path list> consists of a list of paths separated by commas (,) or
  5292.           semi-colons (;).
  5293.  
  5294.           SET PATH applies only to commands that search for existing files.   If
  5295.           you create a file it will be saved in the current directory unless the
  5296.           you specify the path with the filename.
  5297.  
  5298. Example   The  following program will search in two directories if a file cannot
  5299.           be found in the default directory.
  5300.  
  5301.           SET PATH TO c:\dbonline\databases,c:\foxpro\files
  5302.           use customer
  5303.  
  5304. See Also  FILE(), SET DEFAULT
  5305.  
  5306. SET POINT
  5307. Function  Specifies  the decimal point character used in the display of  numeric
  5308.           expressions
  5309.  
  5310. Syntax    SET POINT TO [<expC>]
  5311.  
  5312. Remarks   If you omit <expC>, the period (.) will be used.
  5313.  
  5314. Example
  5315.           ? 1.25
  5316.           1.25
  5317.           SET POINT TO æ,Æ
  5318.           ? 1.25
  5319.           1,25
  5320.  
  5321. See Also  SET DECIMAL, SET FIXED, SET SEPARATOR
  5322.  
  5323. SET PROCEDURE
  5324. Function  SET  PROCEDURE is used to include procedure files while a source  file
  5325.           is being compiled.
  5326.  
  5327. Syntax    SET PROCEDURE TO [<filename>]
  5328.  
  5329. Remarks   SET  PROCEDURE TO specifies filenames to be included with the  current
  5330.           main  file.  All source files are compiled and a single .DBX  file  is
  5331.           created.  Thus it is not necessary to CLOSE PROCEDURE files.  The  SET
  5332.           PROCEDURE TO command is not present at runtime.
  5333.  
  5334.           See the Compiling section for more details on SET PROCEDURE.
  5335.  
  5336. See Also  DO, PARAMETERS
  5337.  
  5338. SET RELATION
  5339. Function  SET  RELATION  links  two  open database  files  according  to  a  key
  5340.           expression that is common to both files.
  5341.  
  5342. Syntax    SET RELATION TO [<key expr> | <expN> INTO <alias>]
  5343.  
  5344. Remarks   SET  RELATION  TO links the active database file to an  open  database
  5345.           file  in another work area.  The INTO file is identified by its alias.
  5346.           Only  one  relation  can  be made from each  work  area.   The  active
  5347.           database  file is called the parent file, and the INTO file is  called
  5348.           the child file.
  5349.  
  5350.           If a <key expression> is used then the child database must be indexed.
  5351.           The  <key expression> is evaluated and then a seek is performed on the
  5352.           child  work area.  The child database is position to the first  record
  5353.           that matches the key expression.
  5354.  
  5355.           When  the <expN> is used, and the child database is not indexed,  then
  5356.           the child database is positioned to the record number given by <expN>.
  5357.  
  5358.           If no record is found then the child database is positioned to the end
  5359.           of file and EOF() will return True (.T.).
  5360.  
  5361.           As  the  parent  and child files must be in separate work  areas,  SET
  5362.           RELATION is only available in the Pro version of dB Online.
  5363.  
  5364. Example   If  the  invoice  database has a field inv_no which matches  the  same
  5365.           field in sales we can set the following relation:
  5366.  
  5367.           SELECT a
  5368.           USE invoice.dbf
  5369.           USE sales INDEX inv_no.ndx IN 2    && open sales in work area b
  5370.           SELECT a
  5371.           SET RELATION TO inv_no INTO b
  5372.           LIST inv_no, customer, b->product, b->sales  && output related fieldS
  5373.  
  5374. See Also  SET INDEX, SET ORDER
  5375.  
  5376. SET REPROCESS
  5377. Function  SET  REPROCESS  determines how may times dB  Online  will  attempt  to
  5378.           access a locked record before returning an error.
  5379.  
  5380. Syntax    SET REPROCESS TO <expN>
  5381.  
  5382. Remarks   SET REPROCESS is set to -1 by default.  This means that dB Online will
  5383.           attempt   to   open  the  locked  data  approximately   every   second
  5384.           indefinately.  Once the data is available, then dB Online will proceed
  5385.           with program execution.
  5386.  
  5387.           If  SET  REPROCESS is set to any non-negative value,  dB  Online  will
  5388.           attempt  to  open the locked data <expN> times.  These  open  attempts
  5389.           will occur at approximately one second intervals.  If SET REPROCESS is
  5390.           set to 0 then dB Online will immidiately return a locking error.
  5391.  
  5392. See Also  FLOCK() , LOCK(), RLOCK(), SET LOCK, SET EXCLUSIVE, UNLOCK
  5393.  
  5394. SET SEPARATOR
  5395. Function  Dspecifies the character that separates each group of three digits  to
  5396.           the left of the decimal point
  5397.  
  5398. Syntax    SET SEPARATOR TO [<expC>]
  5399.  
  5400. Remarks   If you omit <expC>, the comma (,) will be used.
  5401.  
  5402. Example
  5403.           ? 12345
  5404.           12,345
  5405.           SET SEPARATOR TO æ.Æ
  5406.           ? 12345
  5407.           12.345
  5408.  
  5409. See Also  SET MARK
  5410.  
  5411. SET SPACE
  5412. Function  Determines  whether  or  not a space is displayed  between  fields  or
  5413.           expressions when you use the ? or ?? statement.
  5414.  
  5415. Syntax    SET SPACE ON | off
  5416.  
  5417. Example
  5418.           SET SPACE OFF
  5419.           ? ôJohnö,öSmithö
  5420.           JohnSmith
  5421.           SET SPACE ON
  5422.           ? ôJohnö,öSmithö
  5423.           John Smith
  5424.  
  5425. See Also  ? | ??
  5426.  
  5427. SKIP
  5428. Function  SKIP  moves  the  record pointer forward or backward  in  the  current
  5429.           database file.
  5430.  
  5431. Syntax    SKIP [<expN>]
  5432.  
  5433. Remarks   SKIP  uses  the  natural record order when moving the record  pointer,
  5434.           unless  there  is an active index file in use, then SKIP  follows  the
  5435.           index file order.
  5436.  
  5437.           SKIP  moves the record pointer by the value of <expN>.  Both  positive
  5438.           and  negative values of <expN> are allowed with negative values moving
  5439.           the  record pointer backwards.  If <expN> is omitted, then the  record
  5440.           pointer is moved a single record forward.
  5441.  
  5442.           If  SKIP is used with a positive value when the record pointer  is  at
  5443.           the last record in the database, then the EOF() condition will be True
  5444.           (.T.).
  5445.  
  5446.           If  SKIP is used with a negative value when the record pointer  is  at
  5447.           the  first  record in the database, then the BOF() condition  will  be
  5448.           True (.T.).
  5449.  
  5450. Example
  5451.           USE customer
  5452.           SKIP
  5453.           ? RECNO()
  5454.           2
  5455.           SKIP 15
  5456.           ? RECNO()
  5457.           17
  5458.           SKIP -5
  5459.           ? RECNO()
  5460.           12
  5461.  
  5462. See Also  BOF(), EOF(), GOTO
  5463.  
  5464. SND...()
  5465. Function  Transfers a file via the modem.
  5466.  
  5467. Syntax    SNDASCII ( <expC> [ , <expN1> ] )
  5468.           SNDKERMIT ( <expC> [ , <expN1> ] )
  5469.           SNDYMODEM ( <expC> [ , <expN1> [ , <expN2> ] ] )
  5470.           SNDXMODEM ( <expC> [ , <expN1> [ , <expN2> ] ] )
  5471.           SNDZMODEM ( <expC> [ , <expN1> ] )
  5472.  
  5473. Returns   NUMERIC
  5474.  
  5475. Remarks   All of the above functions return the bytes transfered.
  5476.  
  5477.           <expC>  is  the  path  and  filename of the  file  to  transfer.   For
  5478.           SNDYMODEM()  and SNDZMODEM(), you may use multiple files separated  by
  5479.           spaces.
  5480.  
  5481.           <expN1> is the optional communications handle returned by COPEN().  By
  5482.           default the currently active communications port is used.
  5483.  
  5484.           For SNDYMODEM(), <expN2> may be 1 to represent the use of the Ymodem-G
  5485.           protocol.
  5486.           For SNDXMODEM(), <expN2> is as follows:
  5487.  
  5488.           <expN2>   Function
  5489.           0         Use Xmodem-CRC protocol (default)
  5490.           1         Use Xmodem-1k protocol
  5491.           2         Use Xmodem-G protocol
  5492.  
  5493. See Also  RCV...(), COPEN(), CCLOSE()
  5494.  
  5495. SPACE()
  5496. Function  The  SPACE()  function  generates  a  character  string  containing  a
  5497.           specified number of spaces.
  5498.  
  5499. Syntax    SPACE(<expN>)
  5500.  
  5501. Returns   CHARACTER
  5502.  
  5503. Remarks   The range of <expN> is from 0 to 254
  5504.  
  5505. Example
  5506.           ? '*' + SPACE(10) + '*'
  5507.           *          *
  5508.  
  5509. See Also  REPLICATE()
  5510.  
  5511. SQRT()
  5512. Function  The  SQRT()  function returns the square root of a specified  positive
  5513.           numeric argument.
  5514.  
  5515. Syntax    SQRT(<expN>)
  5516.  
  5517. Returns   NUMERIC
  5518.  
  5519. Example
  5520.           ? SQRT(4)
  5521.            2
  5522.           ? SQRT(2)
  5523.           1.4
  5524.           ? SQRT(2.0000)
  5525.           1.414
  5526.  
  5527. STOPBITS()
  5528. Function  The  STOPBITS()  function identifies the number  of  stopbits  of  the
  5529.           current comm port settings.
  5530.  
  5531. Syntax    STOPBITS()
  5532.  
  5533. Returns   NUMERIC
  5534.  
  5535. Valid With     dorinfox.def
  5536.  
  5537. Remarks   If  a  valid  BBS  drop file is not included then STOPBITS  returns  a
  5538.           default value of one.
  5539.  
  5540. See Also  DATABITS(), PARITY()
  5541.  
  5542. STORE
  5543. Function  STORE creates and assigns values to one or more memory variables.
  5544.  
  5545. Syntax    STORE <expr> TO <var list>  or
  5546.           <var> = <expr>
  5547.  
  5548. Remarks   The  value  of <expr> is assigned to all the variables in  <var  list>
  5549.           when  using  the  STORE command.  With the alternate  syntax,  only  a
  5550.           single variable may be assigned at a time.
  5551.  
  5552.           You can not assign values to fields using the STORE command.  You must
  5553.           use the REPLACE command.
  5554.  
  5555. Example
  5556.           STORE 0 TO a,b,c    && initialize a, b, c to zero
  5557.           name = "Smith" && STORES 'Smith' to variable name
  5558.  
  5559. See Also  PRIVATE, PUBLIC
  5560.  
  5561. STR()
  5562. Function  The STR() function converts a number into a character string
  5563.  
  5564. Syntax    STR(<expN1> [,<expN2>] [ ,<expN3>])
  5565.  
  5566. Returns   CHARACTER
  5567.  
  5568. Remarks   Returns  a  character representation of <expN1>.  The total length  of
  5569.           the  string  is specified by <expN2>.  The number of decimals  in  the
  5570.           string  is  specified  by <expN3>.  If <expN2> is  not  specified  the
  5571.           string  length  is  10.   If <expN3> is not specified  the  number  is
  5572.           truncated to an integer.
  5573.  
  5574.           The length includes the decimal point, minus sign and any numbers.  If
  5575.           the  number specified  is too large to fit into the length, dB  Online
  5576.           returns asterisks in the string.
  5577.  
  5578. Example
  5579.           ? STR(10.54,5,2)
  5580.           10.54
  5581.           ? STR(10.54)
  5582.           10
  5583.           ? STR(1459,3,0)
  5584.           ***
  5585.  
  5586. See Also  SUBSTR(), VAL()
  5587.  
  5588. STUFF()
  5589. Function  The  STUFF()  function replaces a portion of a character  string  with
  5590.           another character string.
  5591.  
  5592. Syntax    STUFF(<expC1>,<expN1>,<expN2>,<expC2>)
  5593.  
  5594. Returns   CHARACTER
  5595.  
  5596. Remarks   Character  expression <expC1> is the string to be altered.   Character
  5597.           expression <expC2> is to be inserted into <expC1>.
  5598.  
  5599.           The  insertion takes place at the position specified by  <expN1>.   At
  5600.           this  position  <expN2> characters are removed from <expC1>  and  then
  5601.           <expC2> is inserted.
  5602.  
  5603. Example
  5604.           ? STUFF('abc',2,1,'xyz')
  5605.           axyzc
  5606.           ? STUFF('abc',2,1,'')
  5607.           ac
  5608.           ? STUFF('abc',2,0,'xyz')
  5609.           axyzbc
  5610.  
  5611. See Also  LEFT(), RIGHT(), SUBSTR()
  5612.  
  5613. SUBSTR()
  5614. Function  The SUBSTR() function extracts a specified number of characters from a
  5615.           character string.
  5616.  
  5617. Syntax    SUBSTR(<expC> , <expN1> [,<expN2>])
  5618.  
  5619. Returns   CHARACTER
  5620.  
  5621. Remarks   Returns  the  next  <expN2> characters of   <expC>  beginning  at  the
  5622.           <expN1> position.  If <expN2> is not specified, dB Online returns  the
  5623.           remainder of <expC>
  5624.  
  5625. Example
  5626.           ? SUBSTR("Press any key",7,3)
  5627.           any
  5628.  
  5629. See Also  AT(), LEFT(), RIGHT(), STR(), STUFF()
  5630.  
  5631. SUM
  5632. Function  SUM calculates the total of numeric expressions in the active database
  5633.           file.
  5634.  
  5635. Syntax    SUM [<scope>] <expr list> TO <var list>
  5636.               [WHILE <expL1>]
  5637.               [FOR <expL2>]
  5638.  
  5639. Remarks   All  records  in the current database are totaled unless specified  by
  5640.           the  <scope>,  WHILE,  or  FOR clauses.  The <expr  list>  items  must
  5641.           correspond to the memory variables in <var list>.
  5642.  
  5643. Example   To output the total sales by John Smith:
  5644.  
  5645.           USE sales
  5646.           SUM quantity * price TO total FOR salesman = "JS"
  5647.           ? total
  5648.  
  5649. See Also  AVERAGE, COUNT
  5650.  
  5651. TAG()
  5652. Function  The  TAG()  function  returns the TAG names in the currently  selected
  5653.           database.
  5654.  
  5655. Syntax    TAG(<expN> [,<expN1> | <alias>])
  5656.  
  5657. Returns   CHARACTER
  5658.  
  5659. Remarks   Returns  the  name of an index file (.ndx, .ntx) or a tag name  (.cdx,
  5660.           .mdx)  of the currently selected database.  In dBASE III+ and  Clipper
  5661.           file  formats,  <expN1> identifies the index file in the  position  as
  5662.           specified in the SET INDEX TO, or USE INDEX command.  In dBASE IV  and
  5663.           FoxPro  file formats, <expN1> identifies the tag number of all  opened
  5664.           multiple index files.
  5665.  
  5666.           The second parameter is used to identify tags in other work areas.
  5667.  
  5668. Example   To identify the second tag of cust.mdx
  5669.  
  5670.           USE cust  omer.dbf INDEX cust.mdx
  5671.           ? TAG(2)
  5672.           PHONE
  5673.  
  5674. See Also  CDX(), DBF(), MDX(), NDX(), SET INDEX, SET ORDER, USE
  5675.  
  5676. TEXT
  5677. Function  TEXT is used to output blocks of text to the screen.
  5678.  
  5679. Syntax    TEXT
  5680.                <text>
  5681.                <text>
  5682.                ...
  5683.           ENDTEXT
  5684.  
  5685. Remarks   The  text  is  output exactly as it appears in the source  file.   The
  5686.           first  text  line that begins with ENDTEXT will terminate  the  output
  5687.           text.
  5688.  
  5689. Example   To output a short menu to the screen.
  5690.  
  5691.           CLEAR
  5692.           TEXT
  5693.                [S]     Search
  5694.                [L]     List
  5695.                [Q]     Quit
  5696.                [?]     Help
  5697.  
  5698.                Please enter your selection:
  5699.           ENDTEXT
  5700.  
  5701. See Also  ?|??, @...SAY, DISPLAY, LIST
  5702.  
  5703. TIME()
  5704. Function  The TIME() function return the current system time.
  5705.  
  5706. Syntax    TIME()
  5707.  
  5708. Returns   CHARACTER
  5709.  
  5710. Remarks   Returns the current system time in the format hh:mm:ss
  5711.  
  5712. Example
  5713.           ? TIME()
  5714.           12:36:55
  5715.  
  5716. See Also  DATE()
  5717.  
  5718. TIMELEFT()
  5719. Function  The TIMELEFT() function returns the user's time left in minutes.
  5720.  
  5721.  
  5722. Syntax    TIMELEFT( [ <expN>])
  5723.  
  5724. Returns   NUMERIC
  5725.  
  5726. Remarks   A  timeout  occurs when dB Online has been running for the  number  of
  5727.           minutes initially passed by the BBS drop files.  If no BBS drop  files
  5728.           are specified (i.e. Local or Stand Alone operation), the initial value
  5729.           for TIMELEFT() is 999 minutes.
  5730.  
  5731.           TIMELEFT()  will accept an optional numeric expression  to  allow  the
  5732.           value to be changed.
  5733.           This can be done using the new EQUALS command. eg:
  5734.                = TIMELEFT(23)
  5735.  
  5736. Valid With     pcboard.sys, door.sys, dorinfox.def, chain.txt, callinfo.bbs
  5737.  
  5738. See Also  TIME()
  5739.  
  5740. TRANSFORM()
  5741. Function  The  TRANSFORM()  function allows PICTURE formatting of  data  without
  5742.           using the @...SAY command.
  5743.  
  5744. Syntax    TRANSORM(<expr>,<expC>)
  5745.  
  5746. Returns   CHARACTER
  5747.  
  5748. Remarks   Returns  the  data in <expr> in the format specified  by  the  PICTURE
  5749.           format  <expC>.   <expr> can be any of the four data types:   NUMERIC,
  5750.           CHARACTER,  LOGICAL,  DATE.  For information  about  PICTURE  formats,
  5751.           refer to the @ command.
  5752.  
  5753. Example
  5754.           ? TRANSFORM('john','!XXX')
  5755.           John
  5756.           ? TRANSFORM(4123.5,'999,999.99')
  5757.              4,123.50
  5758.  
  5759. See Also  @...SAY...GET
  5760.  
  5761. TRIM()
  5762. Function  The  TRIM()  function  is identical to the RTRIM()  function.   Please
  5763.           refer to RTRIM() in this section.
  5764.  
  5765. Syntax    TRIM(<expC>)
  5766.  
  5767. Returns   CHARACTER
  5768.  
  5769. See Also  LTRIM(), RTRIM()
  5770.  
  5771. TYPE
  5772. Function  Displays a file.
  5773.  
  5774. Syntax    TYPE <expc>
  5775.  
  5776. Remarks   TYPE  will generate a "-More-  [C]ontinue, [S]top, [N]onstop ?" prompt
  5777.           when  displaying large file listings.  The number of  lines  displayed
  5778.           is determined by the PAGELEN() variable given by the BBS drop files.
  5779.  
  5780. Example
  5781.           TYPE menu.ans
  5782.  
  5783. UNLOCK
  5784. Function  UNLOCK  removes  locks previously placed on a datafile using  FLOCK(),
  5785.           LOCK(), or RLOCK().
  5786.  
  5787. Syntax    UNLOCK
  5788.  
  5789. Remarks   UNLOCK  will unlock the file in the current work area.  UNLOCK  allows
  5790.           other  users  to  access all the information in a database  file.   It
  5791.           should be used after the commands that required file or record locking
  5792.           are completed.
  5793.  
  5794. Example
  5795.           USE customer.dbf
  5796.           IF FLOCK()     && if lock is successful
  5797.             PACK
  5798.             UNLOCK  && unlock file after PACKing.
  5799.           ELSE
  5800.             ? "Unable to lock file"
  5801.             QUIT
  5802.           ENDIF
  5803.  
  5804. See Also  FLOCK(), LOCK(), RLOCK(), SET EXCLUSIVE, SET LOCK, SET REPROCESS
  5805.  
  5806. UPPER()
  5807. Function  The UPPER() function converts a character expression to upper case.
  5808.  
  5809. Syntax    UPPER(<expC>)
  5810.  
  5811. Returns   CHARACTER:
  5812.  
  5813. Remarks   Returns a string in which all lowercase characters in <expC> have been
  5814.           converted to uppercase.
  5815.  
  5816. Example
  5817.           ? UPPER("Hello")
  5818.           HELLO
  5819.  
  5820. See Also  LOWER()
  5821.  
  5822. USE
  5823. Function  USE opens an existing database file and any specified index files.  If
  5824.           the database includes memo fields, then the corresponding memo file is
  5825.           opened.
  5826.  
  5827. Syntax    USE
  5828.               [<filename>]
  5829.               [INDEX  <index file list>]
  5830.               [ALIAS <alias>]
  5831.               [IN <expN>]
  5832.  
  5833. Remarks   Unless otherwise specified dB Online assumes a .DBF extension for  the
  5834.           database  file while the default index file extension is dependent  on
  5835.           the file compatibility in use.
  5836.  
  5837.           All  index files in the <index file list> are opened with the database
  5838.           file.   In  dBASE  IV  and FoxPro file compatibility  if  there  is  a
  5839.           production index file associated with the database file it  is  opened
  5840.           automatically.
  5841.  
  5842.           USE  R  will  close  the  database and index files  in  the  currently
  5843.           selected work area.
  5844.  
  5845.           If  the  ALIAS option is omitted, then dB Online will use the database
  5846.           filename minus the extension for the ALIAS.
  5847.  
  5848.           The  files are opened in the currently selected work area.  If the  IN
  5849.           command  is used, then dB Online switches to the specified  work  area
  5850.           before  attempting to open any files.  If you specify  0  for  <expN>,
  5851.           then the next available area is used.
  5852.  
  5853. Example
  5854.           SELECT 1
  5855.           USE customer   && open customer.dbf in work area 1
  5856.           USE sales INDEX part_no IN 2  && open sales in work area 2
  5857.           SELECT customer     && select customer.dbf using alias
  5858.  
  5859. See Also  CLOSE, SELECT, SET EXCLUSIVE, SET INDEX
  5860.  
  5861. USERNAME()
  5862. Function  The USERNAME() function returns the user's full name.
  5863.  
  5864. Syntax    USERNAME()
  5865.  
  5866. Returns   CHARACTER
  5867.  
  5868. Remarks   The  USERNAME() function returns the name as the BBS stores it.   This
  5869.           is usually in full capitals.
  5870.  
  5871. Valid With       pcboard.sys,  exitinfo.bbs, door.sys, dorinfo1.def,  users.sys,
  5872.           chain.txt, callinfo.bbs
  5873.  
  5874. See Also  FIRSTNAME()
  5875.  
  5876. VAL()
  5877. Function  The  VAL()  function converts a character representation of  a  number
  5878.           into a numeric expression.
  5879.  
  5880. Syntax    VAL(<expC>)
  5881.  
  5882. Returns   NUMERIC
  5883.  
  5884. Remarks   Returns  the  value  of  <expC>.  Any leading blanks  are  ignored  in
  5885.           <expC>.   Once numeric digits are found, VAL() proceeds left to  right
  5886.           until  a  non  numeric character is encountered.  If  <expC>  is  non-
  5887.           numeric,  VAL()  returns zero.  The decimal portion  of  the  returned
  5888.           number is determined by SET DECIMALS.
  5889.  
  5890. Example
  5891.           ? VAL("   555")
  5892.           555.00
  5893.           ? VAL("Hello")
  5894.           0.00
  5895.  
  5896. See Also  SET DECIMALS, STR()
  5897.  
  5898. VERSION()
  5899. Function  The VERSION() function returns the version number of dB Online in use.
  5900.  
  5901. Syntax    VERSION()
  5902.  
  5903. Returns   CHARACTER
  5904.  
  5905. Example
  5906.           ?VERSION()
  5907.           dB Online 1.20
  5908.  
  5909. See Also  DISKSPACE(), GETENV(), OS()
  5910.  
  5911. VOICEPHONE()
  5912. Function  The VOICEPHONE() function returns the user's voice phone number.
  5913.  
  5914. Syntax    VOICEPHONE()
  5915.  
  5916. Returns   CHARACTER
  5917.  
  5918. Valid With     exitinfo.bbs, door.sys, users.sys, callinfo.bbs
  5919.  
  5920. See Also  DATAPHONE()
  5921.  
  5922. WAIT
  5923. Function  WAIT  pauses until a single key in input on either the remote or local
  5924.           terminals.
  5925.  
  5926. Syntax    WAIT
  5927.               [<expC>]
  5928.               [TO <var>]
  5929.               [TIMEOUT x]
  5930.  
  5931. Remarks   WAIT  displays the optional prompt <expC> before waiting  for  a  user
  5932.           keypress.   If  no  prompt  is  specified  then  "Press  any  key   to
  5933.           continue..." is displayed.
  5934.  
  5935.           If  the optional <var> is specified then the character input is placed
  5936.           into  <var>.  If R or other non-printable character is entered, a null
  5937.           string is assigned to <var>.
  5938.  
  5939.           If  the  TIMEOUT keyword is used, then the prompt will  timeout  in  x
  5940.           seconds.
  5941.  
  5942. Example
  5943.           WAIT 'Do you wish to continue (Y/N)' TO answer
  5944.           IF UPPER(answer) = 'N'
  5945.             QUIT
  5946.           ENDIF
  5947.  
  5948. See Also  ON ESCAPE
  5949.  
  5950. YEAR()
  5951. Function  The YEAR() function returns a number representing the year from a date
  5952.           expression.
  5953.  
  5954. Syntax    YEAR(<expD>)
  5955.  
  5956. Returns   NUMERIC
  5957.  
  5958. Example   Assume the system date is 10/21/93
  5959.  
  5960.           ? YEAR(DATE())
  5961.           1993
  5962.  
  5963. See Also  DATE(), DAY(), MONTH()
  5964.  
  5965. ZAP
  5966. Function  Deleted and packes all records in the current database.
  5967.  
  5968. Syntax    ZAP
  5969.  
  5970. Remarks   ZAP is equivalent to DELETE ALL followed by a PACK command, except  it
  5971.           executes faster.
  5972.  
  5973.  
  5974.  
  5975.                                                                      Appendices
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981. Appendix 1:  Errorlevels
  5982.  
  5983.          Program Execution Errors
  5984.  
  5985.          The   following  values  are  returned  to  the  DOS  errorlevel  upon
  5986.          termination  of dB Online.  These errors below 100 are  returned  when
  5987.          execution  is  halted during .PRG execution.  The error  message  will
  5988.          appear on the dB Online exit screen.
  5989.  
  5990.           Errorlevel  Error           Description
  5991.  
  5992.               0       Normal          The .PRG application completed execution
  5993.                       Termination     and terminated correctly.
  5994.  
  5995.  
  5996.               1       Runtime Error   A runtime error occurred in the .PRG
  5997.                                       application.  Before program termination
  5998.                                       the source .PRG filename and line number
  5999.                                       of the error is indicated to assist the
  6000.                                       debugging process.  Runtime errors can be
  6001.                                       trapped with the ON ERROR command.
  6002.  
  6003.  
  6004.               10      Auto Timeout    The user time provided to dB Online from
  6005.                                       the BBS info functions has expired during
  6006.                                       program execution.  dB Online terminates
  6007.                                       and returns control to the calling
  6008.                                       application.
  6009.  
  6010.  
  6011.               11      Lost Carrier    The carrier was lost during program
  6012.                                       execution.  dB Online terminates and
  6013.                                       returns control to the calling
  6014.                                       application.
  6015.  
  6016.  
  6017.               12      Terminated      The user pressed the E key when SET
  6018.                       Escape          ESCAPE was set to ON.  This causes dB
  6019.                                       Online to terminate and return control to
  6020.                                       the calling application.
  6021.  
  6022.  
  6023.               13      Unexpected      An internal error has occurred within dB
  6024.                       Runtime         Online.  Your .DBX file may be corrupt.
  6025.                                       Re-compile the source .PRG file and then
  6026.                                       execute dB Online.  If this does not
  6027.                                       solve the problem please contact Merlin
  6028.                                       Systems Inc.
  6029.  
  6030.  
  6031.               14      Run Stack       An attempt was made to nest procedure
  6032.                       Overflow        calls too deep.  dB Online is able to
  6033.                                       nest procedure call up to 20 levels deep.
  6034.                                       If parameters are passed with procedure
  6035.                                       calls then this limit is reduced.  If
  6036.                                       this error persists please contact Merlin
  6037.                                       Systems Inc.
  6038.  
  6039.  
  6040.               15      Run Stack       An internal error has occurred within dB
  6041.                       Underflow       Online.  Your .DBX file may be corrupt.
  6042.                                       Re-compile the source .PRG file and then
  6043.                                       execute dB Online.  If this does not
  6044.                                       solve the problem please contact Merlin
  6045.                                       Systems Inc.
  6046.  
  6047.  
  6048.               16      Evaluation      An attempt was made to evaluate an
  6049.                       Stack Overflow  expression too complex for the dB Online
  6050.                                       evaluator.  This can be fixed by
  6051.                                       splitting the complex expression onto two
  6052.                                       command lines.  Please contact Merlin
  6053.                                       System Inc. if you receive this error.
  6054.  
  6055.  
  6056.               17      Evaluation      An internal error has occurred within dB
  6057.                       Stack           Online.  Your .DBX file may be corrupt.
  6058.                       Underflow       Re-compile the source .PRG file and then
  6059.                                       execute dB Online.  If this does not
  6060.                                       solve the problem please contact Merlin
  6061.                                       Systems Inc.
  6062.  
  6063.  
  6064.          Start Up Errors
  6065.  
  6066.          The   following  values  are  returned  to  the  DOS  errorlevel  upon
  6067.          termination  of dB Online.  These errors above 100 are  returned  when
  6068.          execution is halted during setup prior to .DBX execution.  This  error
  6069.          message will appear on the DOS screen upon exit.
  6070.  
  6071.          Errorlevel  Error          Description
  6072.  
  6073.              100     Syntax         dB   Online   was   executed   without   any
  6074.                      Explanation    parameters.  This displays the command  line
  6075.                                     syntax information.
  6076.  
  6077.  
  6078.              101     Cannot Open    dB  Online  could not open the  source  .DBX
  6079.                      DBX            file.  Ensure that your source .PRG file  is
  6080.                                     compiled and the resultant .DBX file's  path
  6081.                                     is fully specified in the command line.
  6082.  
  6083.  
  6084.              102     Not a Valid    The .DBX file is not a valid dB Online file.
  6085.                      DBX            Ensure   that  your  source  .PRG  file   is
  6086.                                     compiled   with  the  current   version   of
  6087.                                     COMPILE.EXE
  6088.  
  6089.  
  6090.              103     CanÆt Find USERS.SYS File
  6091.  
  6092.  
  6093.              104     Cannot Find PCBOARD.SYS File
  6094.  
  6095.  
  6096.              105     Cannot Find EXITINFO.BBS File
  6097.  
  6098.  
  6099.              106     Cannot Find DORINFO1.DEF File
  6100.  
  6101.  
  6102.              107     Cannot Find DOOR.SYS File
  6103.  
  6104.  
  6105.              108     Cannot Find CALLINFO.BBS File
  6106.  
  6107.  
  6108.              109     Invalid Command Line Argument
  6109.  
  6110.  
  6111.              110     Corrupted             The DBONLINE.KEY file has been
  6112.                      DBONLINE.KEY File     corrupted.  Copy your backup
  6113.                                            DBONLINE.KEY file to your DBONLINE
  6114.                                            directory.  If this does not solve
  6115.                                            the problem please contact Merlin
  6116.                                            Systems.
  6117.  
  6118.  
  6119.              111     Expired Beta KEY      The DBONLINE.KEY file that was issued
  6120.                      File                  to the beta testers has expired.
  6121.  
  6122.  
  6123.              112     Unable to Open COMM   dB Online was unable to open the comm
  6124.                      Port                  port that was specified in one of the
  6125.                                            BBS information files or in the PORT:
  6126.                                            command line parameter.
  6127.  
  6128.  
  6129.              113     Port Information Not  There was no port information
  6130.                      Specified             specified in any of the BBS
  6131.                                            information files and the PORT:
  6132.                                            command line parameter was not found.
  6133.                                            This error only occurs with the -SA
  6134.                                            option for Stand Alone operation.
  6135.  
  6136.  
  6137.              114     Stand Alone           The sysop on the host pressed E on
  6138.                      Interrupt             the call waiting screen of the Stand
  6139.                                            Alone option.  This causes dB Online
  6140.                                            to terminate and return control back
  6141.                                            to the calling program.
  6142.  
  6143.  
  6144.              115     Stand Alone           An attempt was made to execute dB
  6145.                      Unavailable           Online with the Stand Alone option
  6146.                                            without having the PRO version of dB
  6147.                                            Online.  Please contact your
  6148.                                            distributor if you wish to upgrade.
  6149.  
  6150.  
  6151.  
  6152. Appendix 2:  Compiler Messages
  6153.  
  6154.          Error Messages
  6155.          The following is a list of error messages displayed by the compiler
  6156.  
  6157.             o    Alias name required.
  6158.             o    Character literal required.
  6159.             o    Exponent too large.
  6160.             o    Field identifier required.
  6161.             o    Illegal number of arguments.
  6162.             o    Misplaced parameters list.
  6163.             o    Misplaced set procedure command.
  6164.             o    Missing endcase.
  6165.             o    Missing enddo.
  6166.             o    Missing endif.
  6167.             o    Not a function.
  6168.             o    On Error only supports procedure calls.
  6169.             o    Picture clause expected.
  6170.             o    Procedure name expected.
  6171.             o    Procedure redeclaration.
  6172.             o    Right brace expected.
  6173.             o    Source line too long.
  6174.             o    Syntax Error.
  6175.             o    Too Many errors.
  6176.             o    Unable to open source file.
  6177.             o    Unexpected command.
  6178.             o    Unexpected end of line.
  6179.             o    Unmatched case statement.
  6180.             o    Unmatched else statement.
  6181.             o    Unmatched endcase statement.
  6182.             o    Unmatched enddo statement.
  6183.             o    Unmatched endif statement.
  6184.             o    Unmatched number of parameters.
  6185.             o    Unmatched otherwise statement.
  6186.             o    Unmatched variable list.
  6187.             o    Unrecognized command verb.
  6188.             o    Variable identifier expected.
  6189.             o    Work area out of range.
  6190.  
  6191.          Warning Messages
  6192.  
  6193.          The following is a list of warning messages displayed by the compiler.
  6194.          These  indicate  xBase commands that are not valid in  the  dB  Online
  6195.          environment and will not affect program execution.
  6196.  
  6197.             o    CLOSE PROCEDURE ignored
  6198.             o    SET CATALOG not supported
  6199.             o    SET DATE not supported
  6200.             o    SET HEADING not supported
  6201.             o    SET HELP not supported
  6202.             o    SET HISTORY not supported
  6203.             o    SET ODOMETER not supported
  6204.             o    SET PRINTER not implemented
  6205.             o    SET PROCEDURE TO ignored
  6206.             o    SET SAFETY not supported
  6207.             o    SET SCOREBOARD not supported
  6208.             o    SET STATUS not supported
  6209.             o    SET TALK not supported
  6210.             o    TO PRINT not implemented
  6211.  
  6212. Appendix 3:  Runtime Errors
  6213.  
  6214.          Below is a list of runtime error message for dB Online.  The number in
  6215.          the parenthesis is the value returned by the ERROR() function in error
  6216.          handling routines.
  6217.  
  6218.            ERROR()                                Error
  6219.               24      ALIAS name already in use
  6220.               13      ALIAS not found
  6221.               38      Beginning of file encountered
  6222.               17      Cannot select requested database
  6223.              111      Cannot write to read-only file
  6224.               42      CONTINUE without LOCATE
  6225.               44      Cyclic relation
  6226.               9       Data type mismatch
  6227.               26      Database is not indexed
  6228.               41      Memo file cannot be opened
  6229.               4       End of file encountered
  6230.               77      Execution error on +: Concatenated string too large
  6231.               76      Execution error on -: Concatenated string too large
  6232.               78      Execution error on ^ or **: Negative base) fractional
  6233.                       exponent
  6234.               57      Execution error on CHR(): Out of range
  6235.               58      Execution error on LOG(): Zero or negative
  6236.               87      Execution error on NDX(): Invalid index number
  6237.               88      Execution error on REPLICATE(): String too large
  6238.               60      Execution error on SPACE(): Negative
  6239.               59      Execution error on SPACE(): Too large
  6240.               61      Execution error on SQRT(): Negative
  6241.               79      Execution error on STORE: String too large
  6242.               63      Execution error on STR(): Out of range
  6243.              102      Execution error on STUFF(): String too large
  6244.               62      Execution error on SUBSTR(): Start point out of range
  6245.               7       File already exists
  6246.               1       File does not exist
  6247.               3       File is already open
  6248.              108      File is in use by another
  6249.               46      Illegal value
  6250.               19      Index file does not match database
  6251.              106      Invalid index number
  6252.              107      Invalid operator
  6253.              123      Invalid printer port
  6254.               55      Memory Variable file is invalid
  6255.               52      No database in use
  6256.               45      Not a character expression
  6257.               15      Not a dBASE database
  6258.               37      Not a Logical expression
  6259.               27      Not a numeric expression
  6260.               39      Numeric overflow (data was lost)
  6261.               90      Operation with Logical field invalid
  6262.               34      Operation with Memo field invalid
  6263.               30      Position is off the screen
  6264.              126      Printer is either not connected or turned off
  6265.              109      Record is in use by another
  6266.               20      Record is not in index
  6267.               5       Record is out of range
  6268.              142      Relation record is in use by others
  6269.              209      TAG not found
  6270.               28      Too many indices
  6271.               92      Unable to load COMMAND.COM
  6272.               0       Unable to open file
  6273.               12      Variable not found
  6274.  
  6275.  
  6276. Appendix 4: Full Screen Entry Keys
  6277.  
  6278.           The following keys are used in full-screen operations.  Keys apply  to
  6279.           both data entry screens and the memo editor.
  6280.  
  6281.        Key  Alternative                        Function
  6282.        Up                 Moves the cursor up one line or field
  6283.        Down               Moves the cursor down one line or field
  6284.        Left               Moves the cursor one space to the left.
  6285.        Right              Moves the cursor one space to the right.
  6286.        ^Left              Moves the cursor a word left in the memo editor
  6287.        ^right             Moves the cursor a word right in the memo editor
  6288.        <-                 Erases the character to the left of the cursor
  6289.        Del                Erases the character at the current cursor position.
  6290.        End                Moves the cursor to the end of the line or field
  6291.        ^End    ^W         Exits and saves changes to memo or entry screens.
  6292.        Enter              Moves the cursor to the next field or line.
  6293.        Esc     ^Q         Exits without saving changes.
  6294.        Home               Moves the cursor to the start of the line or field
  6295.        Ins                Toggles insert mode.
  6296.        PgUp               Moves the cursor up one page.
  6297.        PgDn               Moves the cursor down one page.
  6298.        ^PgDn              Enter full screen memo editor.
  6299.        ^PgUp    ^W        Exit memo screen editor.
  6300.        Tab                Completes field entry and moves to next field.
  6301.        ^Y                 Erases line in memo editor.
  6302.  
  6303.