home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / sri314_b.zip / PART1 < prev    next >
Text File  |  1990-04-22  |  215KB  |  7,083 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                 SR-Info/VP-Info
  22.  
  23.                               Command and Function
  24.  
  25.                                 Reference Manual
  26.  
  27.  
  28.  
  29.  
  30.                     by Sidney L. Bursten and Bernard Melman
  31.  
  32.                                       for
  33.  
  34.                             Sub Rosa Publishing Inc.
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.      1990 Edition
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                                  The next best thing to knowing something
  66.                                  is knowing where to find it.
  67.  
  68.                                  - Dr. Samuel Johnson (1709-1784)
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.      First printing
  78.      April, 1990
  79.  
  80.  
  81.      Copyright (c) 1990 Sub Rosa Publishing Inc.
  82.                         Unit 18-1170 Sheppard Ave. West.
  83.                         Downsview, ON, Canada    M3K 2A3
  84.                              Phone: (416) 398-8414
  85.                              Fax:   (416) 630-7384
  86.  
  87.      Incorporating material previously published in
  88.           MAX and VP-Info manuals, Copyright (c)
  89.           1984, 1985, 1986, 1989 Sub Rosa Inc.
  90.  
  91.      SR-Info/VP-Info Copyright (c) 1984, 1985,
  92.           1986, 1987, 1988, 1989, 1990 Sub Rosa Inc.
  93.  
  94.  
  95.      Trademarks:
  96.  
  97.      SR-Info is a trademark of Sub Rosa Publishing Inc.
  98.      dCOMP and MAX are trademarks of Sub Rosa Inc.
  99.      Sub Rosa Publishing Inc. is an authorized user of
  100.           the VP-Info trademark, a trademark of Paperback
  101.           Software International
  102.      dBASE, dBASE II, dBASE III, dBASE III+ and dBASE IV
  103.           are trademarks of Ashton-Tate
  104.      IBM is a trademark of IBM Corporation
  105.  
  106.      10 9 8 7 6 5 4 3 2 1
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.                                   INTRODUCTION
  115.  
  116.  
  117.  
  118.  
  119.           VP-Info, with its new offspring SR-Info, was the first and, we
  120.      believe, is still the best compiled data base management language
  121.      designed for IBM-compatible DOS computers.
  122.  
  123.           SR-Info/VP-Info (which, for the balance of this manual, will be
  124.      called just Info when referring generally to all versions of the
  125.      language) shares many of the language features and keywords of the
  126.      popular dBASE family of languages, so dBASE users can learn it in a
  127.      matter of hours, but has many novel features resulting in very fast
  128.      program execution and much reduced programming time.
  129.  
  130.           If this is your first exposure to Info, you may wish to put this
  131.      manual aside for a while and take it for a "test drive" with the help
  132.      of the brief instructions in the file FASTART on the distribution
  133.      disk.  But don't forget to come back to the full manual to take
  134.      advantage of the full power and versatility of Info.
  135.  
  136.           This release of the language represents its fifth major revision
  137.      and enhancement since its original publication by Sub Rosa Inc. in
  138.      1984 under the name dCOMP.  Sub Rosa Inc. published a major upgrade
  139.      under the name MAX in 1985, which in turn was followed in 1986 by
  140.      Paperback Software International's publication of a major new version
  141.      of the language under its own name, VP-Info.
  142.  
  143.           Paperback issued a major upgrading in 1988 and a brand new
  144.      version (2.0) in 1989, followed by this enhanced new version by Sub
  145.      Rosa Publishing Inc. in 1990.
  146.  
  147.           Our goal at Sub Rosa Publishing Inc. is to provide you, the user,
  148.      with the finest database management tool . . . one that will continue
  149.      to grow in power and utility through the coming years.  You can help
  150.      us achieve this goal in various ways.
  151.  
  152.           First of all, Info is a rich language with many useful features.
  153.      To make many of these available to you, peruse this Command and
  154.      Function Reference Manual.  Whether you are using Info as an
  155.      interactive data base management tool or as a full programming
  156.      language, periodic rereading of this manual will enable you to get
  157.      more out of Info.
  158.  
  159.           A Reference Manual is like a dictionary and a grammar; it is not
  160.      meant for the first time user.  If you are new to data base management
  161.      languages, start with the tutorial manuals: Conversational
  162.  
  163.  
  164.  
  165.  
  166.  
  167.                                       - i -                                
  168.  
  169.  
  170.  
  171.      SR-Info/VP-Info and Programming SR-Info/VP-Info, also published by Sub
  172.      Rosa Publishing Inc.
  173.  
  174.           Second, we would like to hear from you.  Whether it is errors in
  175.      the program or the manual, or suggestions for improvements, write or
  176.      fax us, or direct comments to us through the conference on your major
  177.      public-access bulletin board.
  178.  
  179.           Third, fill out the SR-Info/VP-Info SOFTWARE LICENSE AGREEMENT
  180.      AND REGISTRATION provided to you and mail it in.  We are unable to
  181.      provide technical assistance and program updates to non-registered
  182.      users.
  183.  
  184.           The language is available in three versions to meet the varying
  185.      needs of individuals, organizations and businesses:
  186.  
  187.           A.   SR-Info is an excellent choice for many individuals,
  188.                corresponding to the original release of VP-Info by
  189.                Paperback Software International, but with many added
  190.                features, more power and complete upward compatibility with
  191.                our more powerful versions.
  192.  
  193.                     SR-Info is widely available through users' groups and
  194.                public bulletin boards as a "shareware" product, giving you
  195.                the opportunity to "try before you buy."  Users who decide
  196.                to upgrade from SR-Info to one of the other versions are
  197.                given full credit for registration fees paid toward their
  198.                purchase of VP-Info Professional or VP-Info Professional
  199.                Network Edition.
  200.  
  201.                     SR-Info may be freely copied and distributed to others
  202.                in the United States and Canada only in its complete,
  203.                unaltered, compressed form only, provided that no fee (other
  204.                than a nominal copying fee) is charged, that no printed
  205.                manual is supplied with the disk(s), and no representation
  206.                is made that the recipient has any right to use the software
  207.                without registration for more than evaluation and study
  208.                purposes.
  209.  
  210.                     Those making use of SR-Info in commercial and other
  211.                serious environments are expected to register their copies,
  212.                thus entitling them to their own bound manuals and the
  213.                opportunity to get telephone support and consultations.
  214.  
  215.           B.   VP-Info Professional is the enhanced, single-user version of
  216.                the language, offering access to many more files, more
  217.                records, more features and more power.
  218.  
  219.                     VP-Info Professional is not available as a "shareware"
  220.                product, and distribution of the software or manuals by
  221.                anyone except authorized VP-Info Professional Resellers is
  222.  
  223.  
  224.  
  225.  
  226.  
  227.                                      - ii -                                
  228.  
  229.  
  230.  
  231.                strictly prohibited.  One registered copy is required for
  232.                each computer on which VP-Info Professional is run.
  233.  
  234.           C.   VP-Info Professional Network Edition is the full network and
  235.                multi-user version of the language, conforming to the file
  236.                sharing and locking conventions of Microsoft DOS, versions
  237.                3.1 and above.
  238.  
  239.                     Unlike most network applications software, VP-Info
  240.                Professional Network Edition comes with a license for all
  241.                users on each server.  If a network includes multiple
  242.                network servers, one copy is required for each server.
  243.  
  244.           If you have any difficulty in meeting your objectives with Info,
  245.      we invite you to call on us for assistance.  All users registered with
  246.      Sub Rosa Publishing Inc. are entitled to obtain technical support and
  247.      advanced consulting by telephone.  Consult your Registration
  248.      Certificate for hours, specific entitlements, and charges for
  249.      additional consultations.
  250.  
  251.           Please remember that Info is not an application program; it's
  252.      actually a rich and powerful computer language that makes looking
  253.      after your data a lot easier that available alternatives.  But putting
  254.      all this power into your hands does carry a price: mistakes can result
  255.      in loss of data or erroneous results.  Sub Rosa Inc. and Sub Rosa
  256.      Publishing Inc. assumes no liability or responsibility for any damages
  257.      whatsoever (including, without limitation, damages for loss of
  258.      business profits, business interruption, loss of business information,
  259.      or other pecuniary loss) arising out of the use of or inability to use
  260.      this software.  Additional information is contained in the limited
  261.      warrantee attached to the license agreement provided to you.
  262.  
  263.           Users who are members of major public bulletin boards may find
  264.      their local BBS carries a conference dealing with Info.  Sub Rosa
  265.      Publishing regularly downloads questions from a number of BBS systems
  266.      and uploads answers, comments and suggestions.  Call our office for
  267.      assistance in locating an appropriate BBS.
  268.  
  269.           In addition, the best of our bulletin-board and other
  270.      correspondence, plus articles and program examples are published on
  271.      our SR-Info/VP-Info Diskozine, our magazine-on-a-disk.  Subscriptions
  272.      are available from our office.
  273.  
  274.           We hope you will find Info useful and fun to use, and get years
  275.      of satisfaction from it.
  276.  
  277.                     Sidney L. Bursten and Bernard Melman
  278.                     Sub Rosa Publishing Inc.
  279.                     Unit 18-1170 Sheppard Ave. West.
  280.                     Downsview, ON, Canada    M3K 2A3
  281.                              Phone: (416) 398-8414
  282.  
  283.  
  284.  
  285.  
  286.  
  287.                                      - iii -                               
  288.  
  289.  
  290.  
  291.                              Fax:   (416) 630-7384
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.                                      - iv -                                
  348.  
  349.      SR-Info/VP-Info Reference Manual        Page v       Table of Contents
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.                                     TABLE OF CONTENTS
  362.  
  363.  
  364.  
  365.           SECTION 1. USING Info
  366.              1.1. Setting up Info
  367.              1.2. Conversational Info
  368.              1.3. Running Programs with Info
  369.              1.4. Compiling with Info
  370.              1.5. The Configuration File
  371.              1.6. The SET File
  372.  
  373.  
  374.           SECTION 2. Info FILES AND VARIABLES
  375.              2.1. Files
  376.              2.2. Selecting Data Files
  377.              2.3. Variables
  378.              2.4. Variable Look-Up Rules
  379.              2.5. Matrix Variables
  380.              2.6. System Variables
  381.                 Function keys
  382.                 :DATE and :TIME
  383.                 :PICTURE
  384.                 Other system variables
  385.  
  386.  
  387.           SECTION 3. Info FUNCTIONS
  388.              3.1. Constants
  389.              3.2. Operations
  390.              3.3. Relations
  391.              3.4. Functions
  392.              3.5. Expressions
  393.              3.6. Rules of Precedence
  394.  
  395.  
  396.           SECTION 4. Info COMMANDS
  397.              4.1. The Form of the Commands
  398.              4.2. Symbols
  399.              4.3. Command List
  400.  
  401.  
  402.  
  403.      SR-Info/VP-Info Reference Manual       Page vi       Table of Contents
  404.  
  405.  
  406.           APPENDIX A. THE Info COMPILER
  407.              A.1. What Happens at Compilation
  408.              A.2. Info Environment
  409.              A.3. Info Memory Use
  410.                 64K data space
  411.                 Data file headers
  412.                 Other buffers
  413.                 The memory variable header table
  414.                 The memory variable storage table
  415.                 Stacks
  416.                 Program space
  417.                 High memory
  418.              A.4. Modules and Environment
  419.              A.5. The Compilation Process
  420.              A.6. Compiling and Data Files
  421.              A.7. How Info Reads a Command Line
  422.              A.8. Compiling Multiple Subroutines
  423.              A.9. Data-File Headers
  424.  
  425.  
  426.  
  427.           APPENDIX B. Info KEYWORDS
  428.  
  429.  
  430.           APPENDIX C. Info ERROR MESSAGES
  431.  
  432.  
  433.  
  434.  
  435.  
  436.                              Software Registration
  437.  
  438.  
  439.           By loading the Software on a computer and/or signing this
  440.      Software Registration Form, the User agrees to abide by the terms of
  441.      the Software License Agreement and Limited Warranty which follows.
  442.      Without agreeing to these terms, the User shall have no right to use
  443.      the Software, namely any one of SR-Info, VP-Info Professional, or
  444.      VP-Info Professional Network Edition; furthermore, without this
  445.      registration, the User shall have no right to receive technical and
  446.      consulting support, or to obtain any of the benefits conferred by the
  447.      Limited Warranty below, except that unregistered users may obtain
  448.      telephone advice necessary to load the Software properly on their
  449.      computers.
  450.  
  451.      User's Name___________________________________________________________
  452.  
  453.      Company (if any)______________________________________________________
  454.  
  455.      Address_______________________________________________________________
  456.  
  457.             _______________________________________________________________
  458.  
  459.      City_________________________________________State____________________
  460.  
  461.      Country________________________Zip/Postal Code________________________
  462.  
  463.      Product_________________________Serial Number_________________________
  464.  
  465.      Computer model________________________________________________________
  466.  
  467.      Preferred Floppy Disk Format: 5.25 inch 360K [ ]   5.25 inch 1.2Mg [ ]
  468.                                    3.50 inch 720K [ ]   3.50 inch 1.4Mg [ ]
  469.  
  470.      Authorized Signature__________________________________________________
  471.  
  472.  
  473.  
  474.  
  475.                 Software License Agreement and Limited Warranty
  476.  
  477.  
  478.      I.   User's Rights.  By purchasing and registering one copy of the
  479.           Software, namely any one of SR-Info, VP-Info Professional, or
  480.           VP-Info Professional Network Edition, the user has acquired the
  481.           right to use the Software on a single computer (i.e. a single
  482.           screen attached to a single CPU), and to make copies of the
  483.           Software for archival purposes.  You may not network the Software
  484.           or otherwise use it on more than one computer or computer
  485.           terminal at the same time, except that purchasers of VP-Info
  486.  
  487.  
  488.  
  489.           Professional Network Edition may share one copy of that Software
  490.           across an entire network, provided that a separate, licensed copy
  491.           of the Software resides on each and every dedicated server on
  492.           that network.
  493.  
  494.      II.  Technical Assistance and Consulting.  To assist registered users
  495.           in obtaining maximum benefits from the Software, Sub Rosa
  496.           Publishing Inc. provides technical assistance and consultation
  497.           services every weekday at its offices.  Full registration for the
  498.           Software includes one hour of telephone consultation; additional
  499.           requirements are charged to the user at the then current fee
  500.           schedule.  Users of SR-Info have the option of partial
  501.           registration, which does not include prepaid telephone support.
  502.  
  503.      III. Copyright.  The Software and documentation is owned by Sub Rosa
  504.           Inc. and Sub Rosa Publishing Inc. or its suppliers, and is
  505.           protected by copyright laws of the United States and Canada, and
  506.           other nations under international treaty provisions.  Therefore,
  507.           you must treat the Software like any other copyrighted material
  508.           (such as books, recordings and movies) and make no copies of the
  509.           Software except, that:
  510.  
  511.                1.   You may make copies of the Software for archival or
  512.                     backup purposes
  513.  
  514.                2.   You may transfer the Software to a hard disk, provided
  515.                     that only one copy of the Software is used at any one
  516.                     time (except for users of VP-Info Professional Network
  517.                     Edition governed by the special provisions of
  518.                     Paragraph I.
  519.  
  520.                3.   You may not copy the written manuals accompanying the
  521.                     Software, nor print more than one copy for personal use
  522.                     of any manual or documentation provided on the
  523.                     distribution disk with the Software.
  524.  
  525.                4.   You may not rent or lease the Software, but you may
  526.                     transfer the Software and its accompanying written
  527.                     manuals on a permanent basis, provided you retain no
  528.                     copies, and the recipient agrees to the terms of this
  529.                     Agreement.
  530.  
  531.                5.   A special exemption to the restrictions in this
  532.                     paragraph apply to SR-Info, which is distributed as a
  533.                     "shareware" or "try before you buy" product: SR-Info
  534.                     may be freely copied and distributed to others in the
  535.                     United States and Canada only in its complete,
  536.                     unaltered, compressed form only, provided that no fee
  537.                     (other than a nominal copying fee) is charged, that no
  538.                     printed manual is supplied with the disk(s), and no
  539.                     representation is made that the recipient has any right
  540.  
  541.  
  542.  
  543.                     to use the Software without registration for more than
  544.                     evaluation and study purposes.
  545.  
  546.      IV.  Limited Warranty.  Sub Rosa Publishing Inc. warrants that the
  547.           Software will perform substantially in accordance with the
  548.           accompanying written manuals for a period of 90 days from the
  549.           date of receipt.  Any implied warranties on the Software are
  550.           limited to 90 days.  Some jurisdictions do not permit a limit on
  551.           the duration of an implied warranty, so this limitation may not
  552.           apply to you.
  553.  
  554.      V.   Your Remedies.  The entire liability of Sub Rosa Inc. and Sub
  555.           Rosa Publishing Inc., and your exclusive remedy, shall be, at the
  556.           option of Sub Rosa Publishing Inc., either (a) the return of the
  557.           price paid for the Software, or (b) replacement of the Software.
  558.           This Limited Warranty is void if failure of the Software resulted
  559.           from accident, abuse, or misapplication.  Any replacement
  560.           Software will be warranted for the remainder of the original
  561.           warranty period or 30 days, whichever is longer.
  562.  
  563.      VI.  No Other Warranties.  Sub Rosa Publishing Inc. and Sub Rosa Inc.
  564.           disclaim all other warranties, either expressed or implied,
  565.           including but not limited to implied warranties of
  566.           merchantability and fitness for a particular purpose, with
  567.           respect to the Software and any accompanying written manuals.
  568.  
  569.      VII. No Liability for Consequential Damages.  In no event shall Sub
  570.           Rosa Publishing Inc. or Sub Rosa Inc. or their suppliers be
  571.           liable for any damages whatsoever (including, without limitation,
  572.           damages for loss of business profits, business interruption, loss
  573.           of business information, or other pecuniary loss) arising out of
  574.           the use of or inability to use the Software, even if Sub Rosa
  575.           Publishing Inc. or Sub Rosa Inc. has been advised of the
  576.           possibility of such damages.
  577.  
  578.                         Sub Rosa Publishing Inc.
  579.                         Unit 18-1170 Sheppard Ave. West.
  580.                         Downsview, ON, Canada    M3K 2A3
  581.  
  582.                              Phone: (416) 398-8414
  583.                              Fax:   (416) 630-7384
  584.  
  585.  
  586.  
  587.      SR-Info/VP-Info Reference Manual             Page 1  SECTION 1
  588.  
  589.                       SECTION 1. USING SR-Info AND VP-Info
  590.  
  591.  
  592.  
  593.           Before you can start running SR-Info/VP-Info (which, for the
  594.      balance of this manual, we'll call Info by itself), you should
  595.      familiarize yourself with some basic topics.  These are discussed in
  596.      this section, beginning with "what is a data base anyway?" and
  597.      continuing with getting Info into operation, and using Info without
  598.      and with programs.
  599.  
  600.           This sections also covers installation of Info on your computer,
  601.      and customizing the installation to meet your specific needs.
  602.  
  603.           Finally, some considerations for advanced users are discussed,
  604.      and the several different versions of Info are compared.
  605.  
  606.      SR-Info/VP-Info Reference Manual             Page 2        SECTION 1
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.                       1.1. Basic Concepts and Orientation
  618.  
  619.  
  620.           There are some basic concepts and vocabulary that are fundamental
  621.      to getting maximum results from using Info.
  622.  
  623.           These are discussed here, including records and fields, file
  624.      names and field names, your keyboard and the way we use and refer to
  625.      its various keys.
  626.  
  627.           Records and Fields.  Everybody keeps information on file cards.
  628.      Here is a 3x5 card kept on an employee in a small company:
  629.  
  630.               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”
  631.               โ”‚ Name: Marek, Joe                          โ”‚ 1 โ”‚
  632.               โ”‚ Address: 231 River Drive                  โ””โ”€โ”€โ”€โ”ค
  633.               โ”‚          Broomsdale, MD                       โ”‚
  634.               โ”‚          02110                                โ”‚
  635.               โ”‚ Telephone number: 566-7012                    โ”‚
  636.               โ”‚ Married: Y                                    โ”‚
  637.               โ”‚ Salary: 25,800.00                             โ”‚
  638.               โ”‚ Year employed: 1981                           โ”‚
  639.               โ”‚ Department: Maintenance                       โ”‚
  640.               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  641.  
  642.           Now learn some computer jargon: the electronic version of a
  643.      filing box (containing such cards) is called a data file; a card
  644.      itself is called a record.  The number in the upper-right corner of
  645.      the card identifies the card as card number 1.  The same way, records
  646.      are numbered by record number.
  647.  
  648.           A card has separate areas for the various pieces of information
  649.      you want to collect.  We call these areas fields.  Each field is
  650.      identified by its name.  In this example, for instance, "Department"
  651.      is a field name, while "Maintenance" is the contents of the field.
  652.  
  653.           You identify records by their number, fields by their names.  How
  654.      do you identify data files?  By their names, of course.  For instance,
  655.      all the cards of your employees could be sitting in a box labelled
  656.      "Employee Records."  Unfortunately, the name you can give to a data
  657.      file in your computer is rather restrictive: only 8 letters or numbers
  658.      can be used.  So EMPLOYEE will have to do; EMP1, EMP2 are also good
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      Basic Concepts and Orientation          Basic Concepts and Orientation
  665.  
  666.      SR-Info/VP-Info Reference Manual             Page 3         SECTION 1
  667.  
  668.  
  669.      file names.  (Do not use COMP for the first four letters of a data or
  670.      index file name; Info is unable to open such a file.)
  671.  
  672.           A file is actually identified by its drive designation, its
  673.      directory, its file name,  and its extension.  For example, the full
  674.      designation of our employee file could be C:\DATA\EMPLOYEE.DBF.
  675.  
  676.           File names.  A file name can have at most 8 characters.  You can
  677.      use all the letters of the alphabet, the digits 0 to 9, and the
  678.      underscore character (_).  You can use both capital and lower-case
  679.      letters, but the lower-case letters will be replaced by their
  680.      upper-case version.
  681.  
  682.           The restrictions on a file name are imposed by the operating
  683.      system of your computer.  (Check your Operating System Manual.  In
  684.      this book it is assumed that you have a little familiarity with your
  685.      computer and operating system.  Specifically, you should know the
  686.      drive designations, the operating system prompt, the DIR command, and
  687.      how to handle floppy disks.)  It may allow you to use some other
  688.      characters as well.  However, you cannot go wrong following the rules
  689.      as they were stated above.
  690.  
  691.           Note that the blank (the character you get by pressing the
  692.      spacebar), some punctuation symbols (. , :) , and most special
  693.      characters (< > | + and so on) are always prohibited.  For instance,
  694.      you are never allowed to use as a file name two short words separated
  695.      by a blank, such as CAR NAME.
  696.  
  697.           The data file we mentioned before, EMPLOYEE, also has an
  698.      extension, "DBF".  When you type in the full name, the extension is
  699.      separated from the file name by a period, though when you see it
  700.      listed by DIR, the extension will be separated from the name by one or
  701.      more spaces.  The extension may have at most three characters; all
  702.      Info file extensions have exactly three letters.
  703.  
  704.           The extension DBF stands for Data Base File.  There are many
  705.      other file types used by Info.  The extension always reveals the type
  706.      of the Info file.  Most of the commands do not require the extension.
  707.      For instance, when you create a data file, Info adds the extension DBF
  708.      unless you provide another one specifically.
  709.  
  710.           When you use a data file, just give the file name (with or
  711.      without the drive designation), and Info adds the DBF extension to
  712.      look the file up.  As a rule, when Info asks for a file name, do not
  713.      bother to give the extension.
  714.  
  715.           Field names.  A field name has at most 10 characters (two more
  716.      than file names); you can use all the letters, the digits 0 to 9, the
  717.      colon (:), and the underline (_).  The first character must be a
  718.      letter.  Again, you can use lower-case letters, but Info will convert
  719.      them to upper case.  Just as for file names, blanks cannot be used.
  720.  
  721.  
  722.  
  723.  
  724.      Basic Concepts and Orientation          Basic Concepts and Orientation
  725.  
  726.      SR-Info/VP-Info Reference Manual             Page 4       SECTION 1
  727.  
  728.  
  729.  
  730.           You have just read the formal rules for file and field names.
  731.      The most important rule, however, is the following:
  732.  
  733.                Always use file names and field names that are easy to
  734.           remember, names that remind you of what is in the data file and
  735.           field.
  736.  
  737.           So FILE1, as a rule, is a bad name, EMPLOYEE is good.  NAME1ST is
  738.      good for first name (and so is FNAME), FIELD2 is bad.
  739.  
  740.           How do you test whether a file or a field name is good by this
  741.      rule?  If you do not have to look up the file and field names when you
  742.      use them, they were named well.  If you have to look the names up all
  743.      the time, use better names.
  744.  
  745.           Field Types.  In setting up the data file (our electronic 3x5
  746.      cards), we first chose a name for it: EMPLOYEE.  Next we choose the
  747.      field names.
  748.  
  749.           For the name (Marek, Joe), NAME is fine, but hard to handle.
  750.      Later, we may need reports in which the first name and the family name
  751.      are displayed differently. So we split up the name into two fields:
  752.      NAME for the family name and FNAME for the first name.
  753.  
  754.           The address is in three lines.  Since you cannot put three lines
  755.      in a field (and also to gain flexibility in reporting), we split the
  756.      address up into four fields: ADDR, CITY, STATE, and ZIP.
  757.  
  758.           Telephone number becomes TEL:NO; married can stay MARRIED; Salary
  759.      can stay SALARY; Department is too long, so use DEPT instead.
  760.      Finally, we shorten Year employed to YEAR:EMP. (Note that ":" or "_"
  761.      is used in place of the blank, which is not allowed.)
  762.  
  763.           The fields NAME, FNAME, ADDR, CITY, STATE, ZIP, TEL:NO, DEPT will
  764.      be filled with text; anything that can be typed can go into these
  765.      fields.  You tell this to Info by saying that the field type is
  766.      character, or the field is a character field.  The abbreviation for
  767.      character type is C.
  768.  
  769.           It is not enough to say that NAME is a character field; Info also
  770.      wants to know how many characters you want to allow in the field.
  771.      This number is called the width of the field.  For instance, if we
  772.      specify 15, that means that any text of up to 15 characters can be
  773.      typed into NAME.  We can always type less.  (Info will fill what is
  774.      left of the field with blanks.)
  775.  
  776.           It is not always easy to decide the width of a field.  What is
  777.      the longest family name we'll have to use?  Don't worry, we can make
  778.      changes later.
  779.  
  780.  
  781.  
  782.  
  783.  
  784.      Basic Concepts and Orientation          Basic Concepts and Orientation
  785.  
  786.      SR-Info/VP-Info Reference Manual             Page 5     SECTION 1
  787.  
  788.  
  789.  
  790.           In this example, we use the CREATE command (see Section 4.3):
  791.  
  792.      1>CREATE employee
  793.  
  794.      and enter the following:
  795.  
  796.      Field:         Type:          Width:
  797.  
  798.      NAME           C              15
  799.      FNAME          C              10
  800.      ADDR           C              20
  801.      CITY           C              20
  802.      STATE          C               2
  803.      ZIP            C               5
  804.      TEL:NO         C               8
  805.      DEPT           C              15
  806.  
  807.           SALARY and YEAR:EMP are numbers.  Of course, we could define them
  808.      as character fields, but then we could not do mathematical operations
  809.      on them.  Since they are, by their nature, numbers, it is more natural
  810.      to define them as such, so we define them as numeric fields, type N.
  811.  
  812.           The width of YEAR:EMP is 4; you also have to tell Info how many
  813.      digits are allowed after the decimal point; in this case there is no
  814.      decimal point, so we say 0.
  815.  
  816.           The width of SALARY should be 9 to take salaries over
  817.      $100,000.00.  When counting for the width, we count all the digits and
  818.      the decimal point.  You are not allowed to type in 120000.00 as
  819.      120,000.00, so we do not make room for the comma; the width of SALARY
  820.      is 9, with 2 decimals.
  821.  
  822.      Field:         Type:          Width:         Decimals:
  823.  
  824.      YEAR:EMP       N              4              0
  825.      SALARY         N              9              2
  826.  
  827.           Finally, there is the field MARRIED.  You could define it as a
  828.      character field of width 1.  If you do this, Info will accept any
  829.      character for MARRIED.  You can restrict the characters accepted to
  830.      "Y" (yes) "N" (no) by declaring MARRIED a logical field (L).  In fact,
  831.      you can use any of  "Y", "y", "T", or "t" for true, and any of "N",
  832.      "n", "F", or "f" for false.
  833.  
  834.           A logical field is always of width 1.
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.      Basic Concepts and Orientation          Basic Concepts and Orientation
  845.  
  846.      SR-Info/VP-Info Reference Manual             Page 6   SECTION 1
  847.  
  848.  
  849.  
  850.      Field:         Type:          Width:         Decimals:
  851.  
  852.      MARRIED        L              1
  853.  
  854.           The Keyboard.  The next step is to create the EMPLOYEE file.  But
  855.      before you do that, familiarize yourself with your keyboard (yours may
  856.      have more keys than this representation of the original standard IBM
  857.      PC keyboard, but all these keys are on your keyboard, and these are
  858.      the only ones you need for Info):
  859.  
  860.      โ”Œโ”€โ”€โ”ฌโ”€โ”€โ” โ”Œโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ•ฅโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  861.      โ”‚F1โ”‚F2โ”‚ โ”‚Esโ”‚1 โ”‚2 โ”‚3 โ”‚4 โ”‚5 โ”‚6 โ”‚7 โ”‚8 โ”‚9 โ”‚0 โ”‚- โ”‚= โ”‚ <- โ•‘NumLockโ”‚ Break โ”‚
  862.      โ”œโ”€โ”€โ”ผโ”€โ”€โ”ค โ”œโ”€โ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”€โ”ฌโ”€โ”€โ•ซโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ค
  863.      โ”‚F3โ”‚F4โ”‚ โ”‚Tabโ”‚q โ”‚w โ”‚e โ”‚r โ”‚t โ”‚y โ”‚u โ”‚i โ”‚o โ”‚p โ”‚[ โ”‚]  โ”‚` โ•‘Homโ”‚Up โ”‚PgUโ”‚ - โ”‚
  864.      โ”œโ”€โ”€โ”ผโ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”€โ”ดโ”€โ”€โ•ซโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ค
  865.      โ”‚F5โ”‚F6โ”‚ โ”‚Ctrlโ”‚a โ”‚s โ”‚d โ”‚f โ”‚g โ”‚h โ”‚j โ”‚k โ”‚l โ”‚; โ”‚' โ”‚ <โ”€โ”˜ โ•‘<--โ”‚   โ”‚-->โ”‚   โ”‚
  866.      โ”œโ”€โ”€โ”ผโ”€โ”€โ”ค โ”œโ”€โ”€โ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”ฌโ”€โ”ดโ”€โ”€โ”ฌโ”€โ”€โ•ซโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ค   โ”‚
  867.      โ”‚F7โ”‚F8โ”‚ โ”‚\ โ”‚Shโ”‚z โ”‚x โ”‚c โ”‚v โ”‚b โ”‚n โ”‚m โ”‚, โ”‚. โ”‚/ โ”‚Shftโ”‚* โ•‘Endโ”‚ Dnโ”‚PgDโ”‚ + โ”‚
  868.      โ”œโ”€โ”€โ”ผโ”€โ”€โ”ค โ”œโ”€โ”€โ”ดโ”ฌโ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”ดโ”ฌโ”€โ”ดโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ•จโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ค   โ”‚
  869.      โ”‚F9โ”‚F0โ”‚ โ”‚Altโ”‚          Space Bar          โ”‚CpsLckโ”‚ Ins  โ”‚  Del  โ”‚   โ”‚
  870.      โ””โ”€โ”€โ”ดโ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”˜
  871.      Function            Typewriter Keyboard              Cursor Keypad &
  872.       Keys                                                 Numeric Keypad
  873.  
  874.           There are a few special keys you have to know.  <ENTER> refers to
  875.      the key usually called ENTER or RETURN, marked on some computers with
  876.      a hooked backarrow:  <โ”€โ”˜.  Some keyboards have both a RETURN and an
  877.      ENTER key; they are interchangeable.
  878.  
  879.           At the right is a set of keys called the numeric keypad and/or
  880.      the cursor keypad.  With the <Num Lock> key switched on or with the
  881.      <Shift> key depressed, these keys output numbers; otherwise they
  882.      control the cursor (the flashing rectangle that indicates where the
  883.      next character we press will appear on the screen) and other actions.
  884.  
  885.           The key <End> is used to indicate the end of a Info procedure,
  886.                such as APPEND, BROWSE, CREATE, EDIT, WRITE.
  887.  
  888.           The four arrow keys are referred to as <Up>, <Dn>, <Left>, and
  889.                <Right>.  They are used to move the cursor around the
  890.                screen.  The keys <Home>, <PgUp>, and <PgDn> are used for
  891.                some commands, such as EDIT, BROWSE, READ, and WRITE.
  892.  
  893.           The left arrow on your cursor pad, <Left>, should not be confused
  894.                with the fat back arrow,  <-,  at the top of the keyboard,
  895.                called <Backspace>. <Left> moves left without affecting the
  896.                characters under it, <Backspace> "swallows up" each
  897.                character it moves over.
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.      Basic Concepts and Orientation          Basic Concepts and Orientation
  905.  
  906.      SR-Info/VP-Info Reference Manual             Page 7     SECTION 1
  907.  
  908.  
  909.           The delete key <Del>, and the insert key <Ins>, are used to
  910.                delete and insert characters on the command line and during
  911.                data entry and editing.  Each time <Del> is pressed, one
  912.                character is removed at the cursor, and anything to the
  913.                right moves over to take its place.  The <Ins> key is a
  914.                "toggle," meaning that if insert mode is on, pressing <Ins>
  915.                turns it off, and vice versa.
  916.  
  917.           Your keyboard also has ten or more function keys at the left or
  918.      along the top; the ten marked <F1> to <F10> have pre-assigned roles
  919.      which can be changed by the user.
  920.  
  921.           The escape key, <Esc>, can be used to escape from a command.
  922.  
  923.           Sometime two keys have to be pressed at the same time.  Ctrl-W
  924.      means press the control key (marked as Ctrl) and the W key at the same
  925.      time (there is no harm done pressing the control key first).  Alt-F10
  926.      means press the <Alt> key and <F10> at the same time.
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.                               1.2. Setting up Info
  938.  
  939.  
  940.           To run Info, you need an IBM PC, XT, AT, or compatible MS-DOS
  941.      computer with two disk drives, at least 512K memory, and DOS 2.0 or
  942.      later.
  943.  
  944.           To use Info, you need the following files, all having a
  945.      three-or-four-character name indication which version it is for, and
  946.      an extension descriptive of its contents.
  947.  
  948.           A.   All required or optional files for SR-Info have the name SRI
  949.  
  950.           B.   All those for VP-Info Professional have the name VPI
  951.  
  952.           C.   All those for all those for VP-Info Professional Network
  953.                Edition have the name VPIN
  954.  
  955.           The extensions for these files are as follows:
  956.  
  957.           A.   The EXE file and the MSG file. Each version of Info has its
  958.                own set of matching executable and message files, both of
  959.  
  960.  
  961.  
  962.  
  963.  
  964.      Setting up Info                                        Setting up Info
  965.  
  966.      SR-Info/VP-Info Reference Manual             Page 8       SECTION 1
  967.  
  968.  
  969.                which must be in the same place, either in the current
  970.                directory or in any directory on the DOS PATH (see your DOS
  971.                manual for details on PATH).  Info cannot be run without
  972.                both of these files.
  973.  
  974.                     In addition, both files are internally matched, so that
  975.                an EXE of one version or date of issue cannot be run without
  976.                the MSG file generated for that version on the same day.
  977.  
  978.                     To avoid errors, there should not be more than one copy
  979.                of each of these files anywhere in your hard disk.
  980.  
  981.                     The EXE file may be renamed if you desire, but the MSG
  982.                and all the following files must retain both their name and
  983.                extension.
  984.  
  985.           B.   The HLP file.  Info has an excellent on-line help system
  986.                that can be run at any time you are in conversational
  987.                (interactive) mode.  It is optional; to run it, the HLP file
  988.                must be in the same directory as the MSG file.  If it is not
  989.                present, the HELP command does not work.
  990.  
  991.           C.   The CNF file. An optional configuration file generated by
  992.                the user.  This is a regular Info program file (uncompiled),
  993.                residing in the subdirectory where Info is executed.
  994.  
  995.                     It is typically used to invoke the SET flags to suit
  996.                your needs, to define the function keys and such system
  997.                variables as :COMPANY and :TITLE (see Section 2.6), and to
  998.                establish where Info can expect to find files outside the
  999.                current directors (see FILES ... ENDFILES structure in
  1000.                Section 4.3).
  1001.  
  1002.           D.   The SET file.  (VP-Info Professional and VP-Info
  1003.                Professional Network Edition only.)  An optional file that,
  1004.                if used, must reside in the directory where VP-Info is
  1005.                executed.  The SET file is discussed in detail in Section
  1006.                1.6.
  1007.  
  1008.           E.   The SGN file.  (VP-Info Professional and VP-Info
  1009.                Professional Network Edition only.)   An optional file
  1010.                supplied with the system, providing an attractive sign-on
  1011.                for the user each time VP-Info is executed.
  1012.  
  1013.                     The SGN file normally goes in the same directory as the
  1014.                MSG file, but if you want it to be executed only in some
  1015.                directories and not in others, you will have to put it in
  1016.                each directory from which you want it executed, and make
  1017.                sure it is not in any directory listed in the DOS PATH.
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.      Setting up Info                                        Setting up Info
  1025.  
  1026.      SR-Info/VP-Info Reference Manual             Page 9       SECTION 1
  1027.  
  1028.  
  1029.           In addition, you must have a CONFIG.SYS file (in the root
  1030.      directory of your boot disk, see the DOS Reference Manual) containing
  1031.      the lines:
  1032.  
  1033.      FILES=20
  1034.      BUFFERS=20
  1035.  
  1036.      If you are running VP-Info Professional under DOS 3.3 or above, you
  1037.      may open as many as 65 files at the same time, provided the FILES=
  1038.      command in both your CONFIG.SYS and the SET file is set that high.
  1039.  
  1040.  
  1041.  
  1042.  
  1043.                             1.3. Conversational Info
  1044.  
  1045.  
  1046.           After you start Info, you see the copyright notice, and the Info
  1047.      prompt:
  1048.  
  1049.      1>
  1050.  
  1051.           This prompt is Info's way of asking: What now?  You can issue any
  1052.      commands (as listed in Section 4.3) or you can write and run a Info
  1053.      program.
  1054.  
  1055.           Conversational SR-Info/VP-Info (also called interactive mode) is
  1056.      the use of Info by directly entering commands instead of using
  1057.      programs.
  1058.  
  1059.           Info has a number of features to help you along.  There are a few
  1060.      hints to help you get into Info quickly.
  1061.  
  1062.           Type in a command line; pressing <ENTER> executes the command:
  1063.  
  1064.      1>DIR
  1065.  
  1066.           The command line can be fully edited.  Use the cursor keys
  1067.      described in the keyboard section above, or the full list of editing
  1068.      keys listed under the WRITE command in Section 4.3.
  1069.  
  1070.           If there is an error in the command, the command line is
  1071.      redisplayed; the cursor is placed on the first word after the word
  1072.      that is the likely cause of the trouble.  Use the editing keys to
  1073.      change the command line; then press <ENTER> to try executing it again.
  1074.  
  1075.           There are 78 characters on the command line available for a
  1076.      command.  If you type in a longer command line, these 78 characters
  1077.      will act as a window, with some characters disappearing off the left
  1078.      or right edge of the screen.  You always see 78 characters of the long
  1079.      command line.
  1080.  
  1081.  
  1082.  
  1083.  
  1084.      Conversational VP-Info                          Conversational VP-Info
  1085.  
  1086.      SR-Info/VP-Info Reference Manual             Page 10       SECTION 1
  1087.  
  1088.  
  1089.  
  1090.           Info stores away the last five command lines (up to 75 characters
  1091.      each).  You can get the previous command line back by pressing <Up> or
  1092.      Ctrl-E.  If you press the key twice, you get back the second last
  1093.      command line, and so on.  You can execute the recalled command by
  1094.      pressing <ENTER>; you can edit the command before executing it just as
  1095.      though you had typed it yourself.
  1096.  
  1097.           Pressing a function key is the same as typing in a command line
  1098.      or lines stored in a matching system variable.  For example, :F1
  1099.      usually contains the string "HELP ", so pressing the <F1> key is
  1100.      exactly the same as typing in "HELP " (see Section 2.6).
  1101.  
  1102.           Two special characters are used in defining the function keys:
  1103.      semicolon (;) causes Info to issues an <ENTER> code and execute
  1104.      everything already put into the command line, and the caret (^) stands
  1105.      for "hold down the control key while pressing the next character in
  1106.      the string".  Examples:
  1107.  
  1108.                <F2> usually contains "LIST STRU;", which means: enter the
  1109.                          string LIST STRU into the command line and
  1110.                          execute.  This command lists the structure of the
  1111.                          selected data file
  1112.                <F10> usually contains "EDIT;", which means: enter the
  1113.                          string EDIT into the command line and execute.
  1114.                          This command begins to edit the selected data file
  1115.  
  1116.            To redefine the function key <F7> to contain a string causing
  1117.      Info to go to the nearest record after an unsuccessful FIND and
  1118.      immediately start to edit that record:
  1119.  
  1120.      1>:F7='GOTO :near;edit;'
  1121.  
  1122.      (see Section 2.3 and the = and FIND commands in Section 4.3).  You may
  1123.      also redefine a function key on the fly: if the command is already
  1124.      typed in, just place your cursor at the end of the command line and
  1125.      press Alt-F7 to capture everything to the left of the cursor into :F7.
  1126.  
  1127.           Short programs (with no loops) can be stored in the function
  1128.      keys, and executed by pressing the function keys.
  1129.  
  1130.           The most important commands for a beginner becoming familiar with
  1131.      Info are (see the alphabetical command reference in Section 4.3):
  1132.  
  1133.           CREATE    - create a new data file
  1134.           MODIFY    - change the structure on an existing data file
  1135.           APPEND    - add records to a data file
  1136.           EDIT      - view and change fields in a data file
  1137.           BROWSE    - view and change some fields in many records of a data
  1138.                         file
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.      Conversational VP-Info                          Conversational VP-Info
  1145.  
  1146.      SR-Info/VP-Info Reference Manual             Page 11       SECTION 1
  1147.  
  1148.  
  1149.           LOCATE FOR - goto a record that meets some condition
  1150.           CONTINUE  - goto the next record that meets the same condition
  1151.           LIST      - list the fields of all or some records in a data file
  1152.           DISPLAY   - list the fields in the current record of a data file
  1153.           COUNT     - count the records in a data file
  1154.           SUM       - add up the values of a numeric field in a data file
  1155.           SORT      - sort a data file into a new file with a new order
  1156.           INDEX     - create a separate file that maintains the apparent
  1157.                         order of a data file without sorting the file
  1158.           FIND      - find a record in an indexed file by the value of its
  1159.                         "key"
  1160.           REPORT    - produce a formatted list of a data file with optional
  1161.                         headings, subtotals, and totals
  1162.           STATUS    - check what files are open, the setting of SET
  1163.                         commands, and the value of memory variables
  1164.           LIST STRUCTURE - check the structure of the current data file
  1165.           WRITE     - create or edit a text file or program
  1166.  
  1167.           The forthcoming Sub Rosa Publishing Inc. manual Conversational
  1168.      SR-Info/VP-Info explains use of these commands and many of the
  1169.      interactive features in greater detail.
  1170.  
  1171.  
  1172.  
  1173.  
  1174.                         1.4. Running Programs with Info
  1175.  
  1176.  
  1177.           When you see the operating system prompt (A> or C> for example),
  1178.      you can run the Info program MENU by typing
  1179.  
  1180.      C>VPI menu
  1181.  
  1182.      (or SRI menu, or VPIN menu as the case may be).  Info will load itself
  1183.      into memory, execute the CNF file if found, and then run MENU.
  1184.  
  1185.           From within Info, that is, when you see the Info 1> prompt (or
  1186.      2>,...,10>), run a program with the DO command:
  1187.  
  1188.      1>DO menu
  1189.  
  1190.           In either case, Info will first look for a compiled program:
  1191.      MENU.CPL; if it is found, Info will run it.  If there is no MENU.CPL,
  1192.      Info will look for an uncompiled program, MENU.PRG, which it will
  1193.      compile on-the-fly and immediately execute.  The program name may not
  1194.      have an extension in the command line.
  1195.  
  1196.           There are two other types of program which can be run by Info:
  1197.      standard EXE, COM, and BAT programs with the RUN command, and (in
  1198.      VP-Info only) binary file (assembly language) programs with the CALL
  1199.      command.  See RUN and CALL in the command reference section.
  1200.  
  1201.  
  1202.  
  1203.  
  1204.      Running Programs                                      Running Programs
  1205.  
  1206.      SR-Info/VP-Info Reference Manual             Page 12       SECTION 1
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.                             1.5. Compiling with Info
  1213.  
  1214.  
  1215.           There are two ways to compile a program.  The first is on the
  1216.      command line itself:
  1217.  
  1218.      1>COMPILE menu
  1219.  
  1220.           Alternately, you can compile many programs in one step by
  1221.      creating and running a program containing a set of COMPILE commands.
  1222.      For example, PROJ.PRG may consist of the following commands:
  1223.  
  1224.      COMPILE prog1
  1225.      COMPILE prog2
  1226.      COMPILE prog3
  1227.      CHAIN proj1
  1228.  
  1229.           Then
  1230.  
  1231.      1>DO proj
  1232.  
  1233.      will compile PROG1, PROG2, and PROG3, and immediately execute PROJ1.
  1234.      (The command DO issued at the command line is equivalent to CHAIN;
  1235.      inside a program, its meaning is different.)
  1236.  
  1237.  
  1238.  
  1239.  
  1240.                     1.6. The Configuration and Setting Files
  1241.  
  1242.  
  1243.           When Info is invoked, it first looks for some special files that
  1244.      are used to customize its installation to meet the user's special
  1245.      needs.
  1246.  
  1247.           The SET file.  VP-Info Professional and VP-Info Professional
  1248.      Network Edition allow a settings file with the extension SET, used by
  1249.      Info primarily to allocate memory during loading.  The five commands
  1250.      supported by the SET file permit the user to:
  1251.  
  1252.                1.   Set the maximum amount of memory to be used by VP-Info
  1253.                     (see MEMORY= command in Section 4.3)
  1254.  
  1255.                2.   Set the maximum amount of memory to be allocated for
  1256.                     loading binary files (assembly-language routines) that
  1257.                     can be executed from within VP-Info (see BINSPACE=
  1258.                     command in Section 4.3)
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.      Configuration File                                  Configuration File
  1265.  
  1266.      SR-Info/VP-Info Reference Manual             Page 13       SECTION 1
  1267.  
  1268.  
  1269.  
  1270.                3.   Set the maximum number of files that can be opened at
  1271.                     one time by VP-Info (see the FILES= command in
  1272.                     Section 4.3)
  1273.  
  1274.                4.   Set the maximum number of fields there can be in all
  1275.                     data files opened at any one time (see FIELDS= command
  1276.                     in Section 4.3)
  1277.  
  1278.                5.   Suppress special screen and sound effects accessed
  1279.                     through the SCREEN, SOUND and RING commands (see
  1280.                     NOEFFECTS command in Section 4.3)
  1281.  
  1282.           The SET file is completely optional, but users of certain
  1283.      computers not 100% compatible with the IBM AT, or using certain
  1284.      operating systems, may find it necessary to suppress the special
  1285.      effects with the NOEFFECTS command.  See NOEFFECTS in the command
  1286.      reference section of this manual for more details.
  1287.  
  1288.           SR-Info does not support binary programs or the special screen
  1289.      and sound effects, and uses default settings for all the other
  1290.      commands used in the SET files of VP-Info Professional and VP-Info
  1291.      Professional Network Edition.  No SET file is used with SR-Info.
  1292.  
  1293.           The CNF file.  SR-Info and all versions of VP-Info allow a
  1294.      configuration file with the extension CNF.  The CNF file is a regular
  1295.      Info program file (uncompiled), residing in the subdirectory where
  1296.      Info is executed.
  1297.  
  1298.           The CNF file is completely optional, but it is extremely useful
  1299.      to define the SET flags to suit your needs, to define the function
  1300.      keys and such system variables as :COMPANY and :TITLE (see Section
  1301.      2.6), and to establish where Info can expect to find files outside the
  1302.      current directors (see FILES ... ENDFILES structure in Section 4.3).
  1303.  
  1304.           Any command can be used in the CNF file, but since it is compiled
  1305.      anew every time you enter Info, it should be kept as short as
  1306.      possible.
  1307.  
  1308.           If the last line of the file is a CHAIN command, the program
  1309.      chained to will be executed immediately, even if the DOS command that
  1310.      started Info names another program (see Section 1.4).
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      Configuration File                                  Configuration File
  1325.  
  1326.      SR-Info/VP-Info Reference Manual             Page 14       SECTION 1
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.                   1.7. Some Considerations For Advanced Users
  1333.  
  1334.  
  1335.           How to have different versions of Info coexist with one another.
  1336.      There are actually several different situations, all of which have to
  1337.      be discussed separately:
  1338.  
  1339.           A.   Running two or more of the following -- SR-Info, VP-Info
  1340.                Professional, and  VP-Info Professional Network Edition --
  1341.                on the same computer:
  1342.  
  1343.                1.   If no two versions access the same data or programs,
  1344.                     there is no problem.  Just load all of the appropriate
  1345.                     files into the proper directories as shown in
  1346.                     Section 1.2.
  1347.  
  1348.                2.   If no network is involved, and the same programs are to
  1349.                     be executed two or more different versions of the
  1350.                     above, it is only necessary to provide a different
  1351.                     directory for each version's CPL files, and use the
  1352.                     FILES ... ENDFILES structure in each version's CNF file
  1353.                     to direct Info to the correct set of compiled programs.
  1354.  
  1355.                          If programs for the different versions are not
  1356.                     limited to the commands and functions available to the
  1357.                     lowest-power version, separate directories for the
  1358.                     programs may also be necessary.
  1359.  
  1360.                3.   There is no safe way to allow single-user versions to
  1361.                     operate in a network environment; do not try it except
  1362.                     in a completely private directory, and do not access
  1363.                     any files of any type which may also be accessed by
  1364.                     VP-Info Professional Network Edition.
  1365.  
  1366.           B.   Running VP-Info Version 1 together with one or more of the
  1367.                following -- SR-Info, VP-Info Professional, and  VP-Info
  1368.                Professional Network Edition -- on the same computer:
  1369.  
  1370.                1.   The only files compatible between Version 1 and the
  1371.                     current versions are text files and libraries, report
  1372.                     form files, and data files.  All other files must be
  1373.                     segregated into separate directories for each version
  1374.                     if they are to be shared by the two versions.
  1375.  
  1376.                2.   Running Version 1 and VP-Info Professional is more
  1377.                     difficult than other combinations, since the main file
  1378.                     name is the same in both cases, VPI.EXE, and both look
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.      For Advanced Users                                  For Advanced Users
  1385.  
  1386.      SR-Info/VP-Info Reference Manual             Page 15       SECTION 1
  1387.  
  1388.  
  1389.                     for VPI.CNF.  Therefore, these two versions must be
  1390.                     started in separate directories, and access to the
  1391.                     shared files coordinated through the FILES ... ENDFILES
  1392.                     structures in their respective CNF files.
  1393.  
  1394.           C.   Networking under Version 1 and VP-Info Professional Network
  1395.                Edition is incompatible and can cause catastrophic failure
  1396.                and data corruption if an attempt is made to share data
  1397.                files between them.
  1398.  
  1399.           Differences between the various versions of the language.  There
  1400.      are five versions to consider; in increasing level of power they are:
  1401.  
  1402.           A.   VP-Info Version 1.  Main technical specifications:
  1403.  
  1404.                Maximum 65,536 records in a data file
  1405.                Maximum 6 open data files
  1406.                Maximum 20 files open at one time, including DOS files
  1407.                Index structure incompatible with other four versions
  1408.                Included network facilities
  1409.                Temporary files (those with extension starting with $)
  1410.                     cannot be redirected with FILES ... ENDFILES structure
  1411.                     to ramdisk or disk with more space
  1412.                Expression lists could be separated either by commas or
  1413.                     spaces in many commands; now only commas are allowed
  1414.                Following functions substantially modified or not carried
  1415.                     forward to newer versions:
  1416.                        CONVERT(    split into two new functions, CTONUM(
  1417.                                      and NUMTOC(
  1418.                        DBF(        split into DBF( and FLD(
  1419.                        DIR(        split into DIR( and DIRX(
  1420.                Following commands substantially modified or not carried
  1421.                     forward to new versions:
  1422.                        :TERMINAL=  terminals no longer supported
  1423.                        SET ANSI    no longer supported
  1424.                        SET COLON   now use SET DELIMITER
  1425.                        SET FIELDS  now use FIELD= in SET file
  1426.                        SET MEMORY  now use MEMORY= in SET file
  1427.  
  1428.           B.   SR-Info:
  1429.  
  1430.                Same number of files and records as Version 1
  1431.                Creates index files compatible with products C, D and E
  1432.                No network facilities
  1433.                EDIT allows appending records, and APPEND allows editing
  1434.                     existing records
  1435.                EDIT and BROWSE allow editing with a user-designed screen,
  1436.                     even from command line
  1437.                INDEX FROM allows a new index file, with same or different
  1438.                     name, to be created using expression of existing Info,
  1439.                     dBASE or Clipper index file
  1440.  
  1441.  
  1442.  
  1443.  
  1444.      For Advanced Users                                  For Advanced Users
  1445.  
  1446.      SR-Info/VP-Info Reference Manual             Page 16       SECTION 1
  1447.  
  1448.  
  1449.                New scanning commands: MAXIMUM, MINIMUM
  1450.                Other new commands include:
  1451.                        LIMIT
  1452.                        SET CARRY
  1453.                        SET DIR
  1454.                        SET HEADING
  1455.                new functions implemented include:
  1456.  
  1457.                        ASC(
  1458.                        AT(
  1459.                        DELETED(
  1460.                        EOF(
  1461.                        IFF(
  1462.                        MAX(
  1463.                        MENU(
  1464.                        MIN(
  1465.                        NUMTOC(
  1466.                        SUBSTR(
  1467.                        UPPER(
  1468.                Some advanced functions, commands and options present in C,
  1469.                     D and E are not implemented in this version
  1470.  
  1471.           C.   VP-Info Version 2.  All features of SR-Info plus:
  1472.  
  1473.                Unlimited number of records
  1474.                Maximum index size 32Mb; large enough for over 1,000,000
  1475.                     records with 15-character key
  1476.                Up to 10 data files open at one time
  1477.                EDIT and BROWSE allow editing with both a user-designed
  1478.                     screen and an ON FIELDS structure in programs
  1479.                SET file gives user control over how Info is loaded into
  1480.                     memory, including:
  1481.                        Up to 65 files open at one time
  1482.                        Up to 1000 fields in all data files open at one time
  1483.                        Special screen and sound effects implemented
  1484.                        Loading and running binary programs
  1485.                New commands implemented include:
  1486.                        New FIND variants: NEAREST, LAST, SEEK
  1487.                        MAXIMUM
  1488.                        MINIMUM
  1489.                        SET DIVZERO
  1490.                New functions implemented include:
  1491.                        CTONUM(
  1492.                        DBFX(
  1493.                        DIRX(
  1494.                        NDX(
  1495.                        RAND(
  1496.                        RECNO(
  1497.  
  1498.           D.   VP-Info Professional
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.      For Advanced Users                                  For Advanced Users
  1505.  
  1506.      SR-Info/VP-Info Reference Manual             Page 16.1       SECTION 1
  1507.  
  1508.  
  1509.                Allow even larger index files
  1510.                New command:
  1511.                        OVERWRITE to
  1512.                New function:
  1513.                        IFKEY(
  1514.  
  1515.           E.   VP-Info Professional Network Edition
  1516.                Full support for DOS 3.1 and above network facilities,
  1517.                     including data and index files opened in LOCK, WRITE,
  1518.                     SHARE, and READ modes
  1519.                FILES and FILES ... ENDFILES structure enhanced to support
  1520.                     file modes and well as file redirection
  1521.                Commands implemented include:
  1522.                        LOCK
  1523.                        LOCK INDEXES
  1524.                        SET LOCK
  1525.                        SET NETWORK
  1526.                        UNLOCK
  1527.                        UNLOCK INDEXES
  1528.  
  1529.  
  1530.                  SECTION 2. SR-Info/VP-Info FILES AND VARIABLES
  1531.  
  1532.  
  1533.  
  1534.           In Conversational SR-Info/VP-Info (interactive) and in
  1535.      SR-Info/VP-Info programming, you deal with various file and variable
  1536.      types.  These are discussed in this section.
  1537.  
  1538.  
  1539.  
  1540.                                    2.1. Files
  1541.  
  1542.  
  1543.           SR-Info/VP-Info uses different types of files; the type of the
  1544.      file is shown by the extension of the file name (this is the default
  1545.      extension; the commands allow the user to change the extensions with
  1546.      two exceptions: PRG and CPL).
  1547.  
  1548.           Data files (also called the database files) contain the data of
  1549.      the database.  The default extension is DBF.  Data files are created
  1550.      with the COPY, CREATE, and COPY STRUCTURE TO commands.  (See also
  1551.      MODIFY.)
  1552.  
  1553.           A data file contains a header describing the structure of the
  1554.      data file: the number of records, the number of fields in a record,
  1555.      and a description of each field (name, type, width, and for numerical
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.      Files                          VPI  VPIN                         Files
  1562.           SR-Info/VP-Info Reference Manual         Page 17        SECTION 2
  1563.  
  1564.  
  1565.      fields, the number of decimals).  The header is followed by the
  1566.      records.
  1567.  
  1568.           There are three types of data files used by SR-Info/VP-Info: Type
  1569.      1, Type 2, and Type 3.  From the user's point of view, it very seldom
  1570.      matters which type is used, and the type is "transparent."
  1571.  
  1572.           Type 1 data files can have up to 256 fields per record.  The size
  1573.      of the header is commensurate with the number of fields.  To create
  1574.      and use such data files, the SET FIELDS TO command has to be used.
  1575.  
  1576.           Type 2 data files are restricted to 32 fields per record.  The
  1577.      size of the header is fixed, it does not depend on the number of
  1578.      fields actually used.  Type 2 data files are identical with dBASE II
  1579.      data files.
  1580.  
  1581.           Type 3 data files can have up to 300 fields per record.  The size
  1582.      of the header is commensurate with the number of fields (but much
  1583.      larger than the header of a Type 1 data file with the same number of
  1584.      fields.  Type 3 data files are identical with dBASE III and IV data
  1585.      files without memo fields, although VP-Info permits more fields in a
  1586.      file than dBASE.
  1587.  
  1588.           The command CREATE can create data files of Types I and 2,
  1589.      although the default is Type 3.  The type can be changed in MODIFY,
  1590.      but the default is to leave type unchanged.  All commands can use data
  1591.      files of all three types.
  1592.  
  1593.           Index files are used to facilitate rapid access to the data in
  1594.      data files in a predetermined order for processing and reporting.  The
  1595.      default extension is NDX.  Index files are created with the INDEX
  1596.      command.
  1597.  
  1598.           Program files contain the programs.  There are two kinds: the
  1599.      source program (a text file with SR-Info/VP-Info commands as text)
  1600.      with extension PRG and compiled program with extension CPL.  These
  1601.      extensions are compulsory!  (There is one exception, the CNF
  1602.      configuration file; see Section 1.5.)
  1603.  
  1604.           Report form files contain the specifications of a report.  The
  1605.      default extension is FRM.  These files are used by the REPORT command.
  1606.  
  1607.           Memory variable files contain the memory variables saved by the
  1608.      SAVE TO command.  The default extension is MEM.
  1609.  
  1610.           Sequential files (also called text files) contain "lines"; the
  1611.      end of line is marked by carriage return (ASCII code 13) and line feed
  1612.      (ASCII code 10).  A line can contain at most 254 characters.  The end
  1613.      of the file is marked by EOF (26).
  1614.  
  1615.           A set of functions -- ROPEN(, WOPEN(, READ(, WRITE(, IN(, OUT(,
  1616.      SSEEK(, and CLOSE( -- is provided to create, read, and write
  1617.  
  1618.  
  1619.  
  1620.  
  1621.      Files                          VPI  VPIN                         Files
  1622.           SR-Info/VP-Info Reference Manual         Page 18        SECTION 2
  1623.  
  1624.  
  1625.      sequential files in SR-Info/VP-Info programs  Most word processors
  1626.      create (or have an option to create) sequential files.  Such files can
  1627.      then be utilized by SR-Info/VP-Info programs.
  1628.  
  1629.           The WRITE command of SR-Info/VP-Info creates and edits sequential
  1630.      files.  Since it is used primarily to work with program files, the
  1631.      default extension is PRG.
  1632.  
  1633.           There are text files with default extension TXT used by the SET
  1634.      ALTERNATE TO <file> command.
  1635.  
  1636.           Finally, SR-Info/VP-Info can manipulate arbitrary DOS files with
  1637.      another set of functions -- ROPEN(, WOPEN(, GET(, PUT(, SEEK(, and
  1638.      CLOSE(.  A typical application of the use of DOS files is the
  1639.      conversion of a data file from one type to another.
  1640.  
  1641.           File names are requested by <file> in the command descriptions.
  1642.      <file> is the file name, usually, without extension.  If no extension
  1643.      is given, then the default extension is added by SR-Info/VP-Info.
  1644.      However, if the user types in an extension, this overrules the
  1645.      SR-Info/VP-Info default extension (exceptions: PRG, CPL, and CNF are
  1646.      compulsory).
  1647.  
  1648.           The file name has to follow the rules set out by the operating
  1649.      system: there are at most 8 characters in a file name.  You cannot go
  1650.      wrong if the first character is a letter and the other characters are
  1651.      letters and numbers; spaces are never permitted.
  1652.  
  1653.           DOS devices include such names as PRN, CON, AUX, LPT1, COM2, etc.
  1654.      Any sequential or arbitrary file function, and most of the copy and
  1655.      spool commands, allow you to specify either an actual file or a
  1656.      device.
  1657.  
  1658.           Technically, input/output involving files is buffered, while
  1659.      input/output involving devices is not.  In SR-Info/VP-Info you may
  1660.      choose to treat any device as either buffered or unbuffered, merely by
  1661.      adding a colon to the end of the name to have DOS treat it as an
  1662.      unbuffered device, and without a colon to designate a buffered file.
  1663.  
  1664.           In most cases it makes little difference how you treat a device;
  1665.      rules for when one technique is better than another is outside the
  1666.      scope of this manual.
  1667.  
  1668.           See your DOS manual for a complete list of DOS device names.
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.      Files                          VPI  VPIN                         Files
  1682.           SR-Info/VP-Info Reference Manual         Page 19        SECTION 2
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.                            2.2. Selecting Data Files
  1689.  
  1690.  
  1691.           SR-Info can use up to 6 data files at the same time, while both
  1692.      VP-Info Professional and VP-Info Professional Network Edition can use
  1693.      up to 10 at a time.  Each data file used is assigned a file number by
  1694.      which the data file can be referenced.  File number may be assigned in
  1695.      an arbitrary manner, subject to the cautions contained in Appendix A.
  1696.  
  1697.           Before activating a file, select a file number with the SELECT
  1698.      command.  To activate the first file as the data file CUST, and third
  1699.      file as the data file TRANS:
  1700.  
  1701.      1>SELECT 1
  1702.      1>USE cust
  1703.      1>SELECT 3
  1704.      3>USE trans
  1705.  
  1706.      Note how the SR-Info/VP-Info prompt shows the file number selected.
  1707.  
  1708.           There are three ways to indicate which file in use is referenced:
  1709.  
  1710.           a. Choose the file number.  The choice remains in effect until
  1711.      otherwise specified.  This is done with the SELECT command.
  1712.  
  1713.      1>SELECT 2
  1714.  
  1715.      selects file 2.  All commands refer to it, all field names are checked
  1716.      in it.
  1717.  
  1718.           b. Choose a file number for one command only.  This is done by
  1719.      following the first word of the command by # and the file number.  For
  1720.      instance,
  1721.  
  1722.      1>LIST#2
  1723.  
  1724.      lists file 2, regardless of which one is presently selected.  (Note:
  1725.      there is no space before or after the # sign.)  Even if the command
  1726.      requires two or more words (e.g., COPY STRUCTURE TO), the first-word
  1727.      rule applies: COPY#2 STRUCTURE TO temp.
  1728.  
  1729.           This technique, called command redirection, can even be used to
  1730.      open the data files themselves, as follows:
  1731.  
  1732.      1>USE#1 cust
  1733.      1>USE#2 inven
  1734.      1>USE#3 trans
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.      Selecting Data Files           VPI  VPIN          Selecting Data Files
  1742.           SR-Info/VP-Info Reference Manual         Page 20        SECTION 2
  1743.  
  1744.  
  1745.           c. Refer to one field in a file.  This is done by field
  1746.      redirection, following the field with # and the file number.  For
  1747.      instance,
  1748.  
  1749.      DAVID#4
  1750.  
  1751.      refers to the field DAVID in file 4.
  1752.  
  1753.           In this manual, "the selected file" refers to the data file
  1754.      currently selected.  In the last series of commands, at the start,
  1755.      CUST is the selected file.  After the command:
  1756.  
  1757.      1>SELECT 3
  1758.  
  1759.      TRANS is the selected file.  Note that a SELECT command only selects a
  1760.      new file number; there may be no file used under that file number.
  1761.  
  1762.  
  1763.  
  1764.                                  2.3. Variables
  1765.  
  1766.  
  1767.           A SR-Info/VP-Info variable is a storage area in which changing
  1768.      values can be stored.  If the storage is in a data file, the variable
  1769.      is called a field; if the storage is temporary, in the memory only,
  1770.      the variable is called a memory variable.
  1771.  
  1772.           SR-Info/VP-Info also has a special type of variable called a
  1773.      system variable, including the contents of the ten function keys, date
  1774.      and time, default report title, and so on.  System variables are
  1775.      discussed in Section 2.6.  The name of a system variable starts with a
  1776.      colon.
  1777.  
  1778.           There can be only 128 active memory variables.  Since any one of
  1779.      these can be a matrix variable (see Section 2.5), only the available
  1780.      memory limits the number of memory variables.
  1781.  
  1782.           A variable is identified by its name.  A name is 1 to 10
  1783.      characters long; the first character must be a letter; the other
  1784.      characters are letters (converted to upper case), digits, :, and _
  1785.      (underline).
  1786.  
  1787.           Here are some examples of valid variable names:
  1788.  
  1789.      cost
  1790.      cost2
  1791.      m:cost
  1792.      first_name
  1793.  
  1794.           But note:
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.      Variables                      VPI  VPIN                     Variables
  1802.           SR-Info/VP-Info Reference Manual         Page 21        SECTION 2
  1803.  
  1804.  
  1805.      prof 2          invalid; space is not allowed in a name
  1806.      2cost           invalid; the first character must not be 2
  1807.      profitcenter    invalid; more than 10 characters
  1808.  
  1809.           If the variable name is too long, only the first 10 characters
  1810.      are used (so PROFITCENTER1 and PROFITCENTER2 are the same for
  1811.      SR-Info/VP-Info, and will be stored as PROFITCENT).
  1812.  
  1813.           SR-Info/VP-Info uses a number of words in its vocabulary, the so
  1814.      called SR-Info/VP-Info keywords (see Appendix B).  It is suggested
  1815.      that keywords not be used as variable names.  In fact, the first four
  1816.      letters of a variable name should be different from the first four
  1817.      letters of a SR-Info/VP-Info keyword, since SR-Info/VP-Info identifies
  1818.      a keyword by its first four letters.  See, however, Section A.
  1819.  
  1820.           A variable has a type: character, numeric, or logical.
  1821.  
  1822.           A.   A variable of character type is also called a string
  1823.                variable.  A string variable contains a string (a text
  1824.                line); it has a width, the number of characters it contains.
  1825.  
  1826.           B.   A numeric variable contains a number; it has a width (the
  1827.                number of digits and, optionally, a decimal point), and the
  1828.                number of decimals.
  1829.  
  1830.           C.   A logical variable contains a logical value: T (true, also
  1831.                t, Y, y) or F (false, also f, N, n).
  1832.  
  1833.           For a field, the type and the width (and for numeric fields, the
  1834.      decimals) are fixed by the structure of the data file.  For a memory
  1835.      variable, all these may change any time a new value is stored to the
  1836.      variable.
  1837.  
  1838.           Fields are defined with the CREATE command, when the data file is
  1839.      set up, or with the MODIFY STRUCTURE command when the structure of the
  1840.      data file is modified.  The value of fields may be changed by a number
  1841.      of commands: REPLACE, EDIT, BROWSE, @ GET, and so on.
  1842.  
  1843.           Fields can also be referenced with the file name: MENU[2] is the
  1844.      second field of the data file MENU; TEST[210] is field 210 of the data
  1845.      file TEST.  Thus fields can be referenced as elements of a matrix.
  1846.  
  1847.           Memory variables are defined (and redefined) with the commands:
  1848.      =, STORE, ACCEPT, AVERAGE, COUNT, INPUT, READ(), SUM, WAIT.  WRAP()
  1849.      redefines the value of a memory variable.  @ GET redefines the value
  1850.      of a memory variable but does not change its characteristics.
  1851.  
  1852.           Matrix variables are handled somewhat differently; see
  1853.      Section 2.5.
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.      Variables                      VPI  VPIN                     Variables
  1862.           SR-Info/VP-Info Reference Manual         Page 22        SECTION 2
  1863.  
  1864.  
  1865.           A memory variable can be declared GLOBAL.  This means that when a
  1866.      program is chained to another, GLOBAL variables are passed to the new
  1867.      program.  See the commands GLOBAL and CHAIN in Section 4.3.
  1868.  
  1869.  
  1870.  
  1871.                           2.4. Variable Look-Up Rules
  1872.  
  1873.  
  1874.           When SR-Info/VP-Info finds an expression in a command, it has to
  1875.      work out its value.  It follows a strict order as follows to determine
  1876.      what the item is:
  1877.  
  1878.                1.   Is it a function?
  1879.                2.   Is it a numeric constant?
  1880.                3.   Is it a string constant?
  1881.                4.   Is it a system variable?
  1882.                5.   Is it a matrix variable?
  1883.                6.   Is it a redirected field (e.g. name#3)?
  1884.                7.   Is it a field in the selected data file?
  1885.                8.   Is it a memory variable?
  1886.                9.   Is it a logical constant?
  1887.  
  1888.      If still not found, SR-Info/VP-Info gives up and issues a Variable not
  1889.      found" error message.
  1890.  
  1891.           Note that a variable should not have the same name as a field,
  1892.      and neither variables nor fields should have the same name as one of
  1893.      the logical constants Y, N, T, or F.  The potential for puzzling
  1894.      behavior is obvious.
  1895.  
  1896.  
  1897.  
  1898.                              2.5. Matrix Variables
  1899.  
  1900.  
  1901.           A memory variable can be defined as a matrix with the DIM
  1902.      command.  A matrix variable is counted as only one memory variable
  1903.      within the 128 limit on the number of memory variables.
  1904.  
  1905.           Any one matrix variable can occupy up to 64K memory in high
  1906.      memory.  The available high memory is shown by the STATUS command.
  1907.      See the command DIM on how to compute the memory requirement, and
  1908.      Appendix 1 (Section A.1) on how SR-Info/VP-Info uses memory.
  1909.  
  1910.           Here is an example on how to define a matrix:
  1911.  
  1912.      1>DIM NUM a[2,5]
  1913.      1>a[1,1]=34.78
  1914.      1>a[1,2]=45.7
  1915.      1>a[2,2]=1234.71
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.      Matrix Variables               VPI  VPIN              Matrix Variables
  1922.           SR-Info/VP-Info Reference Manual         Page 23        SECTION 2
  1923.  
  1924.  
  1925.      1>a[1,1]=34.78
  1926.      1>a[1,2]=45.7
  1927.      1>a[2,2]=1234.71
  1928.      1>a[2,4]=1000
  1929.      1>? a
  1930.          34.78     45.70      0.00      0.00      0.00
  1931.           0.00   1234.71      0.00   1000.00      0.00
  1932.  
  1933.           The SET WIDTH TO command can be used to influence how many items
  1934.      from the matrix are displayed in a line.
  1935.  
  1936.           Matrix variables can be assigned values only with the = and STORE
  1937.      commands.  Instead of
  1938.  
  1939.      ok=READ(a[5])
  1940.  
  1941.      write
  1942.  
  1943.      ok=READ(temp)
  1944.      a[5]=temp
  1945.  
  1946.           There is no limitation on the use of matrix variables in
  1947.      expressions.  A matrix variable may occur at any place where a
  1948.      function may occur.  You may think of a matrix variable as a special
  1949.      type of function that can store values.
  1950.  
  1951.           The REPEAT loop is convenient to manipulate matrix variables.
  1952.  
  1953.  
  1954.                              2.6. System Variables
  1955.  
  1956.  
  1957.           System variables carry information necessary for the running of
  1958.      SR-Info/VP-Info.  The command LIST SYSTEM lists the system variables
  1959.      (with the exception of :TERMINAL):
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.      System Variables               VPI  VPIN              System Variables
  1982.           SR-Info/VP-Info Reference Manual         Page 24        SECTION 2
  1983.  
  1984.  
  1985.  
  1986.      1>LIST SYSTEM
  1987.  
  1988.      Name          Type    Width    Contents
  1989.      :F1             C       5      HELP
  1990.      :F2             C      10      LIST STRU;
  1991.      :F3             C       6      WRITE
  1992.      :F4             C      10      LIST MEMO;
  1993.      :F5             C       7      BROWSE;
  1994.      :F6             C       5      STAT;
  1995.      :F7             C      12      ^wCONT;EDIT;
  1996.      :F8             C      11      LOCATE FOR
  1997.      :F9             C       5      FIND
  1998.      :F10            C       5      EDIT;
  1999.      :TIME           C       8      16:45:20
  2000.      :DATE           C      21      Monday, July 30, 1990
  2001.      :VERSION        C       4      510
  2002.      :SERIAL         C      10      2934906400
  2003.      :COMPANY        C      14      D&G Book Store
  2004.      :PICTURE        C      10      9999999.99
  2005.      :TITLE          C       1
  2006.      :UNDOC          C       1
  2007.      :KEY            N       8      13
  2008.      :AVAIL          N       8      0
  2009.      :FIELD          N       8      0
  2010.      :ERROR          N       8      0
  2011.      :MESSAGE        C       1
  2012.      :RETRY          N       8      25
  2013.      :USER           N       8      1
  2014.      :DIR            C       6      C:\TMP
  2015.      :NEAR           N       8      0
  2016.      :COLOR          N       8      48
  2017.      ** Total ** 28  variables... 216  bytes
  2018.  
  2019.  
  2020.           Function keys.  :F1 to :F10 are the system variables activated by
  2021.      pressing the keys <F1> to <F10>.  They can be assigned values with the
  2022.      commands =:
  2023.  
  2024.      :F1='street'
  2025.  
  2026.      or with the combination of Alt and function key.  For instance, Alt-
  2027.      F10 assigns the contents of the command line or editing field from the
  2028.      beginning to the cursor to <F10>.  See Section 1.2.
  2029.  
  2030.           :DATE and :TIME.  SR-Info/VP-Info stores the date and time
  2031.      internally.  When SR-Info/VP-Info is started, it reads the system date
  2032.      and time.  If you have a calendar card, the system date and time is
  2033.      the current date and time; otherwise, the date is 01/01/80 (or later)
  2034.      and the time is 00:00:00 at the time the computer was started.  (You
  2035.      can reset the system date and time with the operating system DATE and
  2036.      TIME commands.)
  2037.  
  2038.  
  2039.  
  2040.  
  2041.      System Variables               VPI  VPIN              System Variables
  2042.           SR-Info/VP-Info Reference Manual         Page 25        SECTION 2
  2043.  
  2044.  
  2045.  
  2046.           You can set SR-Info/VP-Info's date and time:
  2047.  
  2048.      1>:DATE='04/05/84'
  2049.      1>:TIME='08:12:56'
  2050.  
  2051.      (mm/dd/yy and hh:mm:ss format).
  2052.  
  2053.           The function TIME( returns the system time and sets :TIME to the
  2054.      system time.  The function DATE( with one parameter (the format)
  2055.      returns the date from :DATE in a specific format and rewrites :DATE to
  2056.      this format.  (See Section 3.4.)
  2057.  
  2058.           For instance,
  2059.  
  2060.      1>stamp=TIME()
  2061.  
  2062.      stores current system time to the memory variable STAMP, and resets
  2063.      :TIME.  The command
  2064.  
  2065.      1>REPLACE stamp WITH TIME()
  2066.  
  2067.      does the same for the field STAMP.
  2068.  
  2069.           :PICTURE. The :PICTURE system variable is a format for numbers
  2070.      (see Formatting numbers under the @ command).  This formats the
  2071.      display of all numeric memory variables and numeric expressions.  This
  2072.      format can be overridden by a format clause in TEXT or an @ command,
  2073.      or with the PIC( function.
  2074.  
  2075.           The system comes with :PICTURE as '999999.99'.  If you want
  2076.      higher precision, say three decimals:
  2077.  
  2078.      1>:PICTURE='999999.999'
  2079.  
  2080.           If you do not want fractions, but want millions:
  2081.  
  2082.      1>:PICTURE='9999999'
  2083.  
  2084.           The :PICTURE variable can contain format clauses with up to 12
  2085.      9s, with at many as 6 on the right side of the decimal point.
  2086.  
  2087.           It should be emphasized that the :PICTURE does not influence how
  2088.      SR-Info/VP-Info stores or computes numbers; it only tells the language
  2089.      how to display them.
  2090.  
  2091.           Other system variables.  :VERSION contains the current version
  2092.      number of SR-Info/VP-Info.
  2093.  
  2094.           :SERIAL may contain the serial number.  Once SR-Info/VP-Info is
  2095.      loaded, you may use this as a variable that survives a CLEAR command.
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.      System Variables               VPI  VPIN              System Variables
  2102.           SR-Info/VP-Info Reference Manual         Page 26        SECTION 2
  2103.  
  2104.  
  2105.  
  2106.           :COMPANY contains the company name.  This is used by the REPORT
  2107.      command.  (It can be changed to the name of the company you are
  2108.      reporting on.)
  2109.  
  2110.           :TITLE is the default title of a report.  See the REPORT command.
  2111.  
  2112.           :KEY is a numeric variable.  It contains the number generated by
  2113.      the last keystroke used to exit a process or execute a command.  See
  2114.      the function INKEY( for the definition of this number.  :KEY is used
  2115.      in SR-Info/VP-Info programming to find out which key was pressed to
  2116.      abort or interrupt a procedure.
  2117.  
  2118.           :AVAIL contains the number of the next available volume in the
  2119.      current library file.  See SET LIBRARY command.
  2120.  
  2121.           :FIELD contains the number of the Get Table entry currently being
  2122.      processed. See ON FIELD command; VP-Info Professional only.
  2123.  
  2124.           :ERROR The current value of SR-Info/VP-Info's internal error
  2125.      variable.  Shows why execution of the last command failed.
  2126.  
  2127.           :MESSAGE The message from the MSG file associated with the error
  2128.      number contained in :ERROR
  2129.  
  2130.           :RETRY Controls what happens during network operations under VP-
  2131.      Info Professional Network Edition; has no meaning under other
  2132.      versions.
  2133.  
  2134.           :USER A number between 1 and 999 assigned to each user on a
  2135.      network under VP-Info Professional Network Edition.
  2136.  
  2137.           :DIR The user's current drive letter and directory.
  2138.  
  2139.           :NEAR The number of the record containing a key equal to or
  2140.      greater than the last FIND's FIND string.  See FIND command.
  2141.  
  2142.           :COLOR The current value of the color attribute written into the
  2143.      screen memory for every byte of screen display; set with SET COLOR TO
  2144.      or :COLOR= command.
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.      System Variables               VPI  VPIN              System Variables
  2162.  
  2163.      SR-Info/VP-Info Reference Manual           Page 27           SECTION 3
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.               SECTION 3. SR-Info/VP-Info FUNCTIONS AND EXPRESSIONS
  2170.  
  2171.  
  2172.           In SR-Info/VP-Info, expressions are formed from variables and
  2173.      constants using operations, relations, and functions.  Section 2.3
  2174.      introduced variables.  In this section, you will find the other
  2175.      ingredients of expressions: constants, operations, relations, and
  2176.      functions.  Finally, the expressions themselves are discussed.
  2177.  
  2178.  
  2179.  
  2180.                                  3.1. Constants
  2181.  
  2182.  
  2183.           There are three types of constants: numeric, logical, and string.
  2184.  
  2185.           A numeric constant is a number (the minus sign is a part of it):
  2186.  
  2187.      12.78
  2188.      0.00064
  2189.      -3.14
  2190.  
  2191.           There are only two logical constants:  T (true, also written as
  2192.      t, Y, and y) and F (false, also written as f, N, and n).
  2193.  
  2194.           A string constant is a string in quotation marks:
  2195.  
  2196.      "This is a character constant."
  2197.      'This is another one, delimited with single quotation marks.'
  2198.      "Here's another one, enclosing a single quotation mark (apostrophe)
  2199.           within double quotes."
  2200.      "This is incorrect because the quotation marks do not match.'
  2201.  
  2202.  
  2203.  
  2204.                                 3.2. Operations
  2205.  
  2206.  
  2207.           There are three types of operations: numeric, logical, and
  2208.      string.   Each works with constants and variables of that type, and
  2209.      yields a value of that type.
  2210.  
  2211.           The numeric operations are
  2212.  
  2213.      +     addition
  2214.      -     subtraction
  2215.      *     multiplication
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.      Operations                                                  Operations
  2222.  
  2223.      SR-Info/VP-Info Reference Manual           Page 28           SECTION 3
  2224.  
  2225.  
  2226.      /     division
  2227.  
  2228.      2+3.2          yields 5.2
  2229.      10/4           yields 2.5
  2230.  
  2231.           All numeric operations require two numbers to act on.  - is also
  2232.      used to indicate that a number is negative: -2, -3.14.  Instead of
  2233.       -QTY, write 0-QTY or -1*QTY.
  2234.  
  2235.           There are three logical operations:
  2236.  
  2237.      .AND.
  2238.      .OR.
  2239.      .NOT.
  2240.  
  2241.           .AND. and .OR. take two logical values and yield a logical value:
  2242.  
  2243.      T.AND.T        yields:  T
  2244.      T.AND.F        yields:  F
  2245.      F.AND.T        yields:  F
  2246.      F.AND.F        yields:  F
  2247.  
  2248.      T.OR.T         yields:  T
  2249.      T.OR.F         yields:  T
  2250.      F.OR.T         yields:  T
  2251.      F.OR.F         yields:  F
  2252.  
  2253.           .NOT. takes a logical value and yields a logical value (the
  2254.      opposite):
  2255.  
  2256.      .NOT.T         yields:  F
  2257.      .NOT.F         yields:  T
  2258.  
  2259.           There is only one string operation:
  2260.  
  2261.      +     concatenation (placing one string after another)
  2262.  
  2263.      'This is a'+' sentence.'
  2264.  
  2265.      yields the value:
  2266.  
  2267.      This is a sentence.
  2268.  
  2269.           Note that one cannot mix numbers and strings:
  2270.  
  2271.      2+'string'
  2272.  
  2273.      will give a syntax error message (Error 1, see Appendix C).
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.      Operations                                                  Operations
  2282.  
  2283.      SR-Info/VP-Info Reference Manual           Page 29           SECTION 3
  2284.  
  2285.  
  2286.  
  2287.                                  3.3. Relations
  2288.  
  2289.  
  2290.           A relation takes two numbers or two strings (compares them), and
  2291.      yields a logical value (true or false).
  2292.  
  2293.           There are six relations that compare numbers or strings:
  2294.  
  2295.      =     equal
  2296.      <     less than
  2297.      <=    less than or equal to
  2298.      >     greater than
  2299.      >=    greater than or equal to
  2300.      <>    not equal
  2301.  
  2302.           For numbers, these have their usual meaning:
  2303.  
  2304.      1<2            is true
  2305.      2<1            is false
  2306.      1.2<>5         is true
  2307.      1.2>=1         is true
  2308.  
  2309.           You should be careful when using = for numbers.  Two numbers may
  2310.      be displayed as equal while, in fact, they differ in the third or
  2311.      fourth decimal place.  Instead of
  2312.  
  2313.      num1=num2
  2314.  
  2315.      in many instances you could use
  2316.  
  2317.      ABS(num1-num2) < 0.01
  2318.  
  2319.      or
  2320.  
  2321.      (PIC(num1-num2,'9999.99'))=0
  2322.  
  2323.           For strings, string1=string2 is true if string2 is of the same
  2324.      length as string1, and the characters of string1 equal the
  2325.      corresponding characters of string2; if string2 has more characters,
  2326.      string1=string2 is always false.
  2327.  
  2328.           However, the result of comparing strings of unequal length, in
  2329.      which all of string2 is exactly the same as the beginning of string1,
  2330.      is affected by the setting of the "exact switch."  If SET EXACT OFF,
  2331.      then such string1=string2 is true,; with SET EXACT ON, it is false.
  2332.  
  2333.      Examples:
  2334.  
  2335.                            SET EXACT OFF       SET EXACT ON
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.      Relations                                                    Relations
  2342.  
  2343.      SR-Info/VP-Info Reference Manual           Page 30           SECTION 3
  2344.  
  2345.  
  2346.  
  2347.           'abc'='abc'         true                true
  2348.           'abc '='abc'        true                false
  2349.           'abc'='abc '        false               false
  2350.           'abc'='ab'          true                false
  2351.           'ab'='abc'          false               false
  2352.  
  2353.           To make sure that two strings are really equal, write
  2354.  
  2355.      (string1=string2) .AND. (string2=string1)
  2356.  
  2357.      or SET EXACT ON.
  2358.  
  2359.           One way of remembering the above rule, is that string1=string2 if
  2360.      FIND with string2 finds string1.
  2361.  
  2362.           Although this definition of string1=string2 may at first sight
  2363.      seem awkward, it may really be quite useful both in Conversational
  2364.      SR-Info/VP-Info and in SR-Info/VP-Info programs.  For instance, the
  2365.      condition to select all customers (field: CUST) whose name starts with
  2366.      P:
  2367.  
  2368.      LEFT(cust,1)='P'         (or less efficiently SUBSTR(cust,1,1)='P')
  2369.  
  2370.      or
  2371.  
  2372.      cust='P'
  2373.  
  2374.      if SET EXACT OFF.
  2375.  
  2376.           For strings, string1 < string2 means: in a dictionary, string1
  2377.      would come before string2.  Single characters are compared by their
  2378.      ASCII value, see the functions CHR( and RANK(.  string1 is compared to
  2379.      string2 by comparing their first characters; if the first character of
  2380.      string1 is less than the first character of string2, then string1 <
  2381.      string2;  if they are equal, then the second character of string1 is
  2382.      compared to the second character of string 2, and so on.  Examples:
  2383.  
  2384.      'I am smaller' < 'I am bigger'    is false
  2385.      'David' < 'david'                 is true
  2386.      '122' > '17'                      is false
  2387.      '122' > '017'                     is true
  2388.      'seven' > '7'                     is true
  2389.  
  2390.           Note that in the ASCII sequence, all digits, 0 to 9, come before
  2391.      all upper-case letters, A to Z, which, in turn, come before all lower-
  2392.      case letters, a to z.
  2393.  
  2394.           Note that strings and numbers cannot be mixed in these relations:
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.      Relations                                                    Relations
  2402.  
  2403.      SR-Info/VP-Info Reference Manual           Page 31           SECTION 3
  2404.  
  2405.  
  2406.      2 < '123'
  2407.  
  2408.      gives a syntax error message (Error 1, see list of error messages in
  2409.      Appendix).
  2410.  
  2411.  
  2412.  
  2413.                                  3.4. Functions
  2414.  
  2415.  
  2416.           A function is just like an operation; the addition operation (+)
  2417.      requires two arguments (numbers) and returns their sum; a function
  2418.      requires some arguments (0 to 3) and returns some value.
  2419.  
  2420.           Every function has a type: numeric, string, or logical, depending
  2421.      on the values it returns.
  2422.  
  2423.           A function has arguments; the values put into the function
  2424.      between the parentheses, separated by commas.  SR-Info/VP-Info
  2425.      functions have at most three arguments; a few have none.  Some
  2426.      arguments may be optional.
  2427.  
  2428.           The arguments can be variables or expressions of type string:
  2429.      <str var> or <str exp>, or of type numeric: <num var> or <num exp>.
  2430.      (Expressions are discussed in Section 3.5.)
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.      Functions                                                    Functions
  2462.  
  2463.      SR-Info/VP-Info Reference Manual           Page 32           SECTION 3
  2464.  
  2465.  
  2466.  
  2467.                                        !(
  2468.  
  2469.      Converts a string to upper case.
  2470.  
  2471.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2472.      โ•‘ !(<str exp>)                                                       โ•‘
  2473.      โ•‘                                                                    โ•‘
  2474.      โ•‘ <str exp>    the text to be converted to upper case                โ•‘
  2475.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  2476.      โ•‘ Type: character โ”‚                                                  โ•‘
  2477.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2478.  
  2479.           All lower-case letters in the <str exp> are converted into upper
  2480.      case by the !( function.  See also the LOWER( function.
  2481.  
  2482.           Examples:
  2483.  
  2484.      1>a='Aa12b'
  2485.      1>? !(a)
  2486.      AA12B
  2487.      1>? !('David!')
  2488.      DAVID!
  2489.  
  2490.           Note that only the lower-case letters are changed.
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.      !(                          SRI  VPI  VPIN                          !(
  2522.  
  2523.      SR-Info/VP-Info Reference Manual           Page 33           SECTION 3
  2524.  
  2525.  
  2526.  
  2527.                                        #
  2528.  
  2529.      Gets the current record number.
  2530.  
  2531.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2532.      โ•‘ #                                                                  โ•‘
  2533.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  2534.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  2535.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2536.  
  2537.           This function returns the record number of the current record of
  2538.      the selected file.  Note that ? # displays the current record number
  2539.      in the form specified by the system variable :PICTURE (see Section
  2540.      2.7).  SR-Info/VP-Info also has a more general form of this function,
  2541.      RECNO(, which allows the user to specify file other than the selected
  2542.      file.
  2543.  
  2544.           When used with the option RECNO(filenum), it gives the record
  2545.      number of the current record in file filenum.
  2546.  
  2547.           Examples:
  2548.  
  2549.      1>USE employee
  2550.      1>? #
  2551.           1.00
  2552.      1>GO BOTTOM
  2553.      1>? #
  2554.           6.00
  2555.      1>GO TOP
  2556.      1>? #
  2557.           1.00
  2558.      1>SKIP 2
  2559.      1>? #
  2560.           3.00
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.                                  SRI  VPI  VPIN                           #
  2582.  
  2583.      SR-Info/VP-Info Reference Manual           Page 34           SECTION 3
  2584.  
  2585.  
  2586.  
  2587.                                        $(
  2588.  
  2589.      Gets a substring of a string.
  2590.  
  2591.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2592.      โ•‘ $(<str exp>, <start num exp>, <width num exp>)                     โ•‘
  2593.      โ•‘                                                                    โ•‘
  2594.      โ•‘ <str exp>         the string from which the new string is formed   โ•‘
  2595.      โ•‘ <start num exp>   the position from which the new string is        โ•‘
  2596.      โ•‘                     taken                                          โ•‘
  2597.      โ•‘ <width num exp>   the number of characters to place in the         โ•‘
  2598.      โ•‘                     new string                                     โ•‘
  2599.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  2600.      โ•‘ Type: character โ”‚                                                  โ•‘
  2601.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2602.  
  2603.           This function takes the string in <str exp> from position <start
  2604.      num exp> (fractions are thrown away); the number of characters taken
  2605.      is <width num exp>.  (In both numeric expressions, the fractions are
  2606.      disregarded).
  2607.  
  2608.           Examples:
  2609.  
  2610.      1>name='David Barberr'
  2611.      1>? $(name, 7,3)
  2612.      Bar
  2613.      1>? $(name, 7,12)
  2614.      Barberr
  2615.      1>? LEN($(name,7,12))
  2616.            7.00
  2617.  
  2618.           Note that $(name,7,12) is of width 7, not 12; there are only 7
  2619.      letters left in name from position 7.
  2620.  
  2621.      1>s=3
  2622.      1>t=1
  2623.      1>? $(name+name, (s+t)/2, 1.9)
  2624.      a
  2625.  
  2626.           Note that 1.9 was taken as 1.
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.      $(                          SRI  VPI  VPIN                          $(
  2642.  
  2643.      SR-Info/VP-Info Reference Manual           Page 35           SECTION 3
  2644.  
  2645.  
  2646.  
  2647.                                        *
  2648.  
  2649.      Determines whether a record is deleted.
  2650.  
  2651.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2652.      โ•‘ *                                                                  โ•‘
  2653.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  2654.      โ•‘ Type: logical โ”‚                                                    โ•‘
  2655.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2656.  
  2657.           In the selected file, the current record pointer points at a
  2658.      record.  If this record has been marked for deletion (in BROWSE or
  2659.      EDIT, or with the DELETE command), then * gives the value T;
  2660.      otherwise, it is false.
  2661.  
  2662.           Example:
  2663.  
  2664.  
  2665.      1>USE employee
  2666.      1>DELETE RECORD 2
  2667.            1 DELETE(S)
  2668.      1>GO 2
  2669.      1>? *
  2670.      T
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.      *                           SRI  VPI  VPIN                           *
  2702.  
  2703.      SR-Info/VP-Info Reference Manual           Page 36           SECTION 3
  2704.  
  2705.  
  2706.  
  2707.                                        @(
  2708.  
  2709.      Gets the location of a substring.
  2710.      
  2711.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2712.      โ•‘ @(<find str exp>, <str exp>)                                       โ•‘
  2713.      โ•‘                                                                    โ•‘
  2714.      โ•‘ <find str exp>    the string searched for                          โ•‘
  2715.      โ•‘ <str exp>         the text to be searched                          โ•‘
  2716.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  2717.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  2718.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2719.  
  2720.           This function finds out whether a string: <find str exp> occurs
  2721.      in the string: <str exp>.  If it occurs, the function returns the
  2722.      character position of the first (left-most) substring of <str exp>
  2723.      which is the same as <find str exp>; if it does not occur, the
  2724.      function returns a 0.
  2725.  
  2726.           Examples:
  2727.  
  2728.      1>greeting='Good morning'
  2729.      1>? @('oo', greeting)
  2730.            2.00
  2731.      1>? @('good',greeting)
  2732.            0.00
  2733.  
  2734.      In a program:
  2735.  
  2736.      IF @(answer,'YNQynq')=0
  2737.  
  2738.      checks whether the user response is correct.
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.      @(                          SRI  VPI  VPIN                          @(
  2762.  
  2763.      SR-Info/VP-Info Reference Manual           Page 37           SECTION 3
  2764.  
  2765.  
  2766.  
  2767.                                       ASC(
  2768.  
  2769.      Converts a character to its ASCII number.
  2770.  
  2771.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2772.      โ•‘ ASC(<str exp>)                                                     โ•‘
  2773.      โ•‘                                                                    โ•‘
  2774.      โ•‘ <str exp>         the first character of this string is converted  โ•‘
  2775.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  2776.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  2777.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2778.  
  2779.           The characters in the character set used by the computer are
  2780.      numbered from 0 to 255.  For the first character of the string
  2781.      <str exp>, ASC( returns the corresponding number.  RANK( is a synonym
  2782.      for ASC(.  See also the functions CHR(, CTONUM(, and NUMTOC(.
  2783.  
  2784.           Examples:
  2785.  
  2786.      1>? ASC('x')
  2787.         120.00
  2788.      1>? ASC('xyz')
  2789.         120.00
  2790.  
  2791.           Note that only the first character of the string matters.
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.      ASC(                        SRI  VPI  VPIN                        ASC(
  2822.  
  2823.      SR-Info/VP-Info Reference Manual           Page 38           SECTION 3
  2824.  
  2825.  
  2826.  
  2827.                                       AT(
  2828.  
  2829.      Gets the location of a substring . . . a synonym for @(
  2830.  
  2831.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2832.      โ•‘ AT(<find str exp>, <str exp>)                                      โ•‘
  2833.      โ•‘                                                                    โ•‘
  2834.      โ•‘ <str exp>         the text to be searched                          โ•‘
  2835.      โ•‘ <find str exp>    the string searched for                          โ•‘
  2836.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  2837.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  2838.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2839.  
  2840.           This function is merely a synonym for @(. See @(.
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.      AT(                         SRI  VPI  VPIN                         AT(
  2882.  
  2883.      SR-Info/VP-Info Reference Manual           Page 39           SECTION 3
  2884.  
  2885.  
  2886.  
  2887.                                       BIT(
  2888.  
  2889.      Bit-set function determines if a given bit is 0 or 1
  2890.  
  2891.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  2892.      โ•‘ BIT(<string>,<bit position>)                                       โ•‘
  2893.      โ•‘                                                                    โ•‘
  2894.      โ•‘ <string>          a string or string variable to test              โ•‘
  2895.      โ•‘ <bit position>    a numeric expression; position of a given bit    โ•‘
  2896.      โ•‘                      within <string>                               โ•‘
  2897.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  2898.      โ•‘ Type: logical   โ”‚                                                  โ•‘
  2899.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2900.  
  2901.           Each character in the ASCII character set is identified by an
  2902.      eight-bit binary number from 0 to 255 inclusive.  Each bit may be
  2903.      either 0 or 1; for example, the letter A has a decimal value of 65 and
  2904.      a binary value of 01000001.
  2905.  
  2906.           When used with the SET( and RESET( functions, which turn specific
  2907.      bits to 1 or 0 respectively, the BIT( function can be used to access
  2908.      large amounts of logical data much more compactly than in a set of
  2909.      logical variables.  BIT( returns T (true) if the specified bit is set
  2910.      (0), F (false) if not set (0).
  2911.  
  2912.           Note: Bit positions are counted differently than in some other
  2913.      schemes. In these functions, all bits are counted from the left of the
  2914.      string starting at 1, so that each character contains bits numbered as
  2915.      follows:
  2916.  
  2917.           1.   Bits 1 to 8.
  2918.           2.   Bits 9 to 16.
  2919.           3.   Bits 17 to 24.
  2920.           . . . and so on
  2921.  
  2922.           Example in a program:
  2923.  
  2924.           To print the binary value of each character in an input string:
  2925.  
  2926.      SET RAW ON         ;eliminates spaces between listed output
  2927.      DO WHILE t
  2928.         ACCEPT 'Enter a short string for binary representation: ' TO string
  2929.         IF string=' '
  2930.            BREAK
  2931.         ENDIF
  2932.         ?
  2933.         REPEAT LEN(string)*8 TIMES VARYING position
  2934.            ?? IFF(BIT(string,position),'1','0')
  2935.            IF MOD(position,8)=0
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.      BIT(                        SRI  VPI  VPIN                        BIT(
  2942.  
  2943.      SR-Info/VP-Info Reference Manual           Page 40           SECTION 3
  2944.  
  2945.  
  2946.               ?? ' '
  2947.            ENDIF
  2948.         ENDREPEAT
  2949.      ENDDO
  2950.  
  2951.           Now run the program:
  2952.  
  2953.      Enter a short string for binary representation: Bit
  2954.      01000010 01101001 01110100
  2955.      Enter a short string for binary representation:
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.      BIT(                        SRI  VPI  VPIN                        BIT(
  3002.  
  3003.      SR-Info/VP-Info Reference Manual           Page 41           SECTION 3
  3004.  
  3005.  
  3006.  
  3007.                                      BLANK(
  3008.  
  3009.      Creates a string of blanks or other specified characters.
  3010.  
  3011.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3012.      โ•‘ BLANK(<num exp>[,<charnum>])                                       โ•‘
  3013.      โ•‘                                                                    โ•‘
  3014.      โ•‘ <num exp>    a number from 0 to 255                                โ•‘
  3015.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  3016.      โ•‘ Option:                                                            โ•‘
  3017.      โ•‘ <charnum>    the ASCII number of the character used to fill the    โ•‘
  3018.      โ•‘                blank string; default is 32, the blank character    โ•‘
  3019.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  3020.      โ•‘ Type: character โ”‚                                                  โ•‘
  3021.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3022.  
  3023.           This function creates a string of <num exp> blanks or other
  3024.      specified characters.
  3025.  
  3026.           When charnum is specified, many interesting effects can be
  3027.      created, particularly by using the special pattern characters in the
  3028.      IBM screen character set, 176-178, and the solid block character, 219.
  3029.  
  3030.           Examples:
  3031.  
  3032.      1>name='DAVID'
  3033.      1>? name+BLANK(15)+name
  3034.      DAVID               DAVID
  3035.      1>num=23
  3036.      1>? name+BLANK(num+5)+name
  3037.      DAVID                            DAVID
  3038.      1>? BLANK(20,65)
  3039.      AAAAAAAAAAAAAAAAAAAA
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.      BLANK(                      SRI  VPI  VPIN                      BLANK(
  3062.  
  3063.      SR-Info/VP-Info Reference Manual           Page 42           SECTION 3
  3064.  
  3065.  
  3066.  
  3067.                                       CEN(
  3068.  
  3069.      Centers a line of text.
  3070.  
  3071.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3072.      โ•‘ CEN(<str exp>,<num exp>)                                           โ•‘
  3073.      โ•‘                                                                    โ•‘
  3074.      โ•‘ <str exp>    the text to be centered                               โ•‘
  3075.      โ•‘ <num exp>    the line width                                        โ•‘
  3076.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  3077.      โ•‘ Type: character โ”‚                                                  โ•‘
  3078.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3079.  
  3080.           This function centers (from the present position) the text
  3081.      <str exp> in a line (column) with <num exp> characters.
  3082.  
  3083.           Examples:
  3084.  
  3085.      1>compiler='SR-Info/VP-Info'
  3086.      1>? CEN(compiler,40)
  3087.                SR-Info/VP-Info
  3088.      1>@ 10,20 SAY CEN('Center this',40)
  3089.  
  3090.           Note: the last command centers the text between columns 20 and
  3091.      60.
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.      CEN(                        SRI  VPI  VPIN                        CEN(
  3122.  
  3123.      SR-Info/VP-Info Reference Manual           Page 43           SECTION 3
  3124.  
  3125.  
  3126.  
  3127.                                       CHR(
  3128.  
  3129.      Converts an ASCII number to character.
  3130.  
  3131.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3132.      โ•‘ CHR(<num exp>)                                                     โ•‘
  3133.      โ•‘                                                                    โ•‘
  3134.      โ•‘ <num exp>    a number from 0 to 255                                โ•‘
  3135.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  3136.      โ•‘ Type: character โ”‚                                                  โ•‘
  3137.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3138.  
  3139.           The characters in the character set used by the computer are
  3140.      numbered from 0 to 255; this number for a character is called the
  3141.      ASCII number.  For a given <num exp> in this range, CHR(<num exp>) is
  3142.      the corresponding character.
  3143.  
  3144.           This function is useful to send control codes to the printer.
  3145.      For instance,
  3146.  
  3147.      1>? CHR(27)+CHR(120)+CHR(1)
  3148.  
  3149.      puts the Epson LQ-1500 printer into letter quality mode.
  3150.  
  3151.           The functions ASC( and RANK( do the reverse.  These functions
  3152.      combine nicely.  If the memory variable LETTER contains a letter of
  3153.      the alphabet (other than z or Z), then
  3154.  
  3155.      LETTER=CHR(ASC(LETTER)+1)
  3156.  
  3157.      places in LETTER the next letter of the alphabet.
  3158.  
  3159.           Examples:
  3160.  
  3161.           1.
  3162.  
  3163.      1>? CHR(120)
  3164.      x
  3165.      1>letter='C'
  3166.      1>? CHR(RANK(letter)+1)
  3167.      D
  3168.  
  3169.           2. To set a standard IBM or Epson printer into double-wide mode:
  3170.  
  3171.      1>SET PRINT ON
  3172.      1>? CHR(14)+'First line.'
  3173.  
  3174.      prints:
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.      CHR(                        SRI  VPI  VPIN                        CHR(
  3182.  
  3183.      SR-Info/VP-Info Reference Manual           Page 44           SECTION 3
  3184.  
  3185.  
  3186.      First line.                    in double-wide characters
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.      CHR(                        SRI  VPI  VPIN                        CHR(
  3242.  
  3243.      SR-Info/VP-Info Reference Manual           Page 45           SECTION 3
  3244.  
  3245.  
  3246.  
  3247.                                      CLOSE(
  3248.  
  3249.      Closes a DOS file.
  3250.  
  3251.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3252.      โ•‘ CLOSE([filenum])                                                   โ•‘
  3253.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  3254.      โ•‘ Option:                                                            โ•‘
  3255.      โ•‘                                                                    โ•‘
  3256.      โ•‘ <filenum>      the DOS file number (between 1 and 4)               โ•‘
  3257.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  3258.      โ•‘ Type: logical โ”‚                                                    โ•‘
  3259.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3260.  
  3261.           This function closes the DOS file (in particular, the sequential
  3262.      file) opened with the ROPEN( or WOPEN( function.  It returns T if
  3263.      successful, F otherwise.  See the functions ROPEN(, WOPEN(, SEEK(,
  3264.      SSEEK(, READ(, WRITE(, GET(, PUT(, IN(, OUT(, and CLOSE).
  3265.  
  3266.           If filenum is not specified, filenum=1 is the default.
  3267.  
  3268.           Example:
  3269.  
  3270.      1>ok=ROPEN('a:label.prg',3)
  3271.      1>? ok
  3272.      T
  3273.      1>ok=CLOSE(3)
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.      CLOSE(                      SRI  VPI  VPIN                      CLOSE(
  3302.  
  3303.      SR-Info/VP-Info Reference Manual           Page 46           SECTION 3
  3304.  
  3305.  
  3306.  
  3307.                                       COL(
  3308.  
  3309.      Gets print column position.
  3310.  
  3311.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3312.      โ•‘ COL()                                                              โ•‘
  3313.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  3314.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  3315.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3316.  
  3317.           This function gives the current column position of the cursor; if
  3318.      the printer is on, it returns the column position of the printer head.
  3319.      See the commands SET PRINT ON and SET FORMAT TO PRINT, and the
  3320.      function ROW(.
  3321.  
  3322.           Example:
  3323.  
  3324.      @ ROW(),COL()+3 SAY 'Hello'
  3325.  
  3326.      prints 'Hello' starting three characters to the right of the end of
  3327.      the last printing.
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.      COL(                        SRI  VPI  VPIN                        COL(
  3362.  
  3363.      SR-Info/VP-Info Reference Manual           Page 47           SECTION 3
  3364.  
  3365.  
  3366.  
  3367.                                     CTONUM(
  3368.  
  3369.      Convert a hexadecimal string into a decimal number.
  3370.  
  3371.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3372.      โ•‘ CTONUM(<type>,<string exp>)                                        โ•‘
  3373.      โ•‘                                  VP-Info Professional only         โ•‘
  3374.      โ•‘ <type>         the length of the numeric value to be returned      โ•‘
  3375.      โ•‘ <string exp>   the string to be evaluated as a hexadecimal value   โ•‘
  3376.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  3377.      โ•‘ Type: numeric   โ”‚                                                  โ•‘
  3378.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3379.  
  3380.           A general conversion function for converting hexadecimal values
  3381.      into decimal numbers.  Input can be any length string or string
  3382.      variable up to eight characters as follows:
  3383.  
  3384.            Type     String Length  Returns
  3385.  
  3386.              1      1 byte         integer 0 to 255
  3387.              2      2 bytes        integer -32768 to 32767
  3388.              4      4 bytes        integer +/- 2 billion
  3389.              8      8 bytes        a floating point number
  3390.  
  3391.           If string is shorter, conversion still assumes the string is the
  3392.      format of the given width.  When <type> is 1, this function is
  3393.      equivalent to RANK( or ASC(.
  3394.  
  3395.           The NUMTOC( and CHR( functions convert numbers into strings.
  3396.  
  3397.           Do not confuse these function with STR( and VAL(, which convert
  3398.      decimal numbers into their string representations, and vice versa.
  3399.  
  3400.           Examples:
  3401.  
  3402.      1>? CTONUM(1,'a')
  3403.           97.00
  3404.      1>? CTONUM(2,'ab')
  3405.        25185.00
  3406.      1>? CTONUM(4,'abc')
  3407.      6513249.00
  3408.      1>? CTONUM(4,'abcd')        ;number too large for format in :PICTURE
  3409.      **********
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.      CTONUM(                        VPI  VPIN                       CTONUM(
  3422.  
  3423.      SR-Info/VP-Info Reference Manual           Page 48           SECTION 3
  3424.  
  3425.  
  3426.           Note to users of VP-Info Version 1:
  3427.  
  3428.            Though not in the original Version 1 documentation, a function
  3429.      called CONVERT( was added and documented in a disk file supplied to
  3430.      later purchasers.  This function was broken into two separate
  3431.      functions, CTONUM( and NUMTOC(, in the current version.  Existing
  3432.      programs that use CONVERT( will have to be modified to work as
  3433.      expected under the current versions.
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.      CTONUM(                        VPI  VPIN                       CTONUM(
  3482.  
  3483.      SR-Info/VP-Info Reference Manual           Page 49           SECTION 3
  3484.  
  3485.  
  3486.  
  3487.                                      DATE(
  3488.  
  3489.      Displays a date in a specific format.
  3490.  
  3491.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3492.      โ•‘ DATE(<type>[,<str exp>])                                           โ•‘
  3493.      โ•‘                                                                    โ•‘
  3494.      โ•‘ <type>           one of 9 type basic date-output formats           โ•‘
  3495.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  3496.      โ•‘ Option:                                                            โ•‘
  3497.      โ•‘                                                                    โ•‘
  3498.      โ•‘ <str exp>        the date to be converted                          โ•‘
  3499.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  3500.      โ•‘ Type: character โ”‚                                                  โ•‘
  3501.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3502.  
  3503.           This function with only <type> specified rewrites the current
  3504.      system date in :DATE in the format specified by the <type>, and
  3505.      displays the result.
  3506.  
  3507.           This function with two parameters  (the format and the date)
  3508.      returns the given date in the specified format.  :DATE is not
  3509.      effected.
  3510.  
  3511.           The <type> can be given in either of two forms, a name or number
  3512.      (numeric expression) as follows:
  3513.  
  3514.           Type           Date-output format
  3515.  
  3516.           1 or YMD       6-character format without slashes: yymmdd
  3517.           2 or MDY       8-character format with slashes: mm/dd/yy
  3518.           3 or Char      Spelled out: Month dd, yyyy
  3519.           4 or Full      Spelled out: Weekday, Month dd, yyyy; valid only
  3520.                             for years 1980-2079
  3521.           5 or Lchar     Last day of month spelled out in format 3 (Char)
  3522.           6 or DMY       11-byte string in format dd-MMM-yyyy (example
  3523.                             03-NOV-1990)
  3524.           7 or Variable  formatted without slashes according to SET DATE TO
  3525.                             command (See SET DATE TO)
  3526.           8 or Long      8-character format without slashes: yyyymmdd
  3527.           9 or Last      Last day of month in format 1 (YMD) or 8 (Long),
  3528.                             depending on whether SET DATE TO command set
  3529.                             year to YY or YYYY
  3530.  
  3531.           Shortcut: When specifying type by name, only the first character
  3532.           is usually required. The exception is for Lchar, Long and Last,
  3533.           which require two characters to resolve ambiguity. If only one is
  3534.           given, Lchar is assumed.
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.      DATE(                       SRI  VPI  VPIN                       DATE(
  3542.  
  3543.      SR-Info/VP-Info Reference Manual           Page 50           SECTION 3
  3544.  
  3545.  
  3546.           <str exp> must contain the date in one of the following formats:
  3547.                mmddyy     ddmmyy     yymmdd
  3548.                mmddyyyy   ddmmyyyy   yyyymmdd
  3549.  
  3550.           Optionally, a slash, a hyphen, or a space may be used to separate
  3551.      the elements of these formats.  For example, YY/MM/DD, YY-MM-DD,
  3552.      DD MM YYYY are all equally valid.
  3553.  
  3554.           There should be two digits each for month and the day, and two or
  3555.      four digits for the year.  01 3 92 is not acceptable.  If <str exp> is
  3556.      not acceptable, then DATE( returns a string of blanks.
  3557.  
  3558.           In the event of ambiguity, dates will be decoded in accordance
  3559.      with the format set in the SET DATE TO command.  For example:
  3560.  
  3561.           SET DATE TO      date          is interpreted as  Comment
  3562.  
  3563.           'ddmmyy'         11/03/90      March 11, 1990
  3564.           'mmddyy'         11/03/90      November 3, 1990
  3565.           'mmddyy'         11/03/60      November 3, 2060   all dates
  3566.                                                             converted to
  3567.                                                             range 1980-2079
  3568.  
  3569.           See also the system variable :DATE in Section 2 and the command
  3570.      SET DATE TO.
  3571.  
  3572.           Examples:
  3573.  
  3574.      1>:DATE= '10/05/90'
  3575.      1>? :DATE
  3576.      10/05/90
  3577.      1>? DATE()
  3578.      19901005
  3579.      1>? :DATE
  3580.      19901005
  3581.      1>? DATE(1)
  3582.      901005
  3583.      1>? :DATE
  3584.      901005
  3585.      1>? DATE(2)
  3586.      10/05/90
  3587.      1>? :DATE
  3588.      10/05/90
  3589.      1>? DATE(3)
  3590.      October 5, 1990
  3591.      1>? :DATE
  3592.      October 5, 1990
  3593.      1>? DATE(4)
  3594.      Saturday, October 5, 1990
  3595.      1>? :DATE
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.      DATE(                       SRI  VPI  VPIN                       DATE(
  3602.  
  3603.      SR-Info/VP-Info Reference Manual           Page 51           SECTION 3
  3604.  
  3605.  
  3606.      Saturday, October 5, 1990
  3607.      1>? DATE(4,'12/08/90')
  3608.      Sunday, December 8, 1990
  3609.      1>? :DATE
  3610.      Saturday, October 5, 1990
  3611.      1>? DATE(5,'90-30-27')
  3612.      March 31, 1990
  3613.      1>? DATE(6,'03  27 90')
  3614.      27-Mar-1990
  3615.      1>? :DATE
  3616.      Saturday, October 5, 1990
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.      DATE(                       SRI  VPI  VPIN                       DATE(
  3662.  
  3663.      SR-Info/VP-Info Reference Manual           Page 52           SECTION 3
  3664.  
  3665.  
  3666.  
  3667.                                      DAYS(
  3668.  
  3669.      Computes dates and date differences in days.
  3670.  
  3671.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3672.      โ•‘ DAYS(<str exp1>,<str exp2>)                                        โ•‘
  3673.      โ•‘ DAYS(<str exp>,<num exp>)                                          โ•‘
  3674.      โ•‘                                                                    โ•‘
  3675.      โ•‘ In the first form:                                                 โ•‘
  3676.      โ•‘      <str exp1> and <str exp2> are dates                           โ•‘
  3677.      โ•‘ In the second form:                                                โ•‘
  3678.      โ•‘      <str exp> is a date and <num exp> is a number                 โ•‘
  3679.      โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                          โ•‘
  3680.      โ•‘ Type: numeric/character โ”‚                                          โ•‘
  3681.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3682.  
  3683.           In the first form, DAYS( returns the number of days between the
  3684.      two dates.  The result is an integer.
  3685.  
  3686.           In the second form, DAYS( returns the date (as a string) which is
  3687.      <num exp> days past or before the date <str exp>.
  3688.  
  3689.           The string expressions containing dates can be of many different
  3690.      formats (see the DATE( function for more examples):
  3691.  
  3692.                     yy/mm/dd    yy-mm-dd    yyyy mm dd
  3693.                     mm/dd/yy    mm-dd-yy    mm dd yy
  3694.  
  3695.           There should be two digits each for yy, mm, and dd, and four
  3696.      digits for yyyy.  01 3 90 is not acceptable.
  3697.  
  3698.           In the second form, the date is returned in the format set with
  3699.      the SET DATE TO command (default: mmddyyyy).  If you wish a different
  3700.      format, use the DATE( function.  See also MONTHS( and SET DATE TO.
  3701.  
  3702.           Examples:
  3703.  
  3704.      1>? DAYS('04 06 90','04 29 90')
  3705.           23.00
  3706.      1>? DAYS('01/01/88','01 23 90')
  3707.          753.00
  3708.      1>? DAYS('01/01/90','01 23 88')
  3709.         -708.00
  3710.      1>? DAYS('01/01/91','01 02 91')
  3711.            1.00
  3712.      1>? DAYS('01/02/91','01 01 91')
  3713.           -1.00
  3714.      1>? DAYS('02/28/88','03 01 88')    ;leap year
  3715.            2.00
  3716.  
  3717.  
  3718.  
  3719.  
  3720.  
  3721.      DAYS(                       SRI  VPI  VPIN                       DAYS(
  3722.  
  3723.      SR-Info/VP-Info Reference Manual           Page 53           SECTION 3
  3724.  
  3725.  
  3726.      1>? DAYS('02/28/90','03 01 90')    ;not a leap year
  3727.            1.00
  3728.      1>? DAYS('04 03 90',30)
  3729.      050290
  3730.      1>? DAYS('02 03 90',30)
  3731.      030590
  3732.      1>? DAYS('02 03 90',-3)
  3733.      010490
  3734.      1>? DAYS('020390',-30)
  3735.      010490
  3736.      1>monthday='0203'
  3737.      1>offset=30
  3738.      1>? DAYS(monthday+'90',offset+1)
  3739.      030690
  3740.  
  3741.           DAYS( and DATE( may be combined to form complex expressions.  For
  3742.      instance, the end of the month closest to today in the form set in the
  3743.      SET DATE TO command:
  3744.  
  3745.      DATE(7,DAYS(DATE(2),-15))
  3746.  
  3747.           See DATE( and MONTHS( functions, and SET DATE TO command.
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.      DAYS(                       SRI  VPI  VPIN                       DAYS(
  3782.  
  3783.      SR-Info/VP-Info Reference Manual           Page 54           SECTION 3
  3784.  
  3785.  
  3786.  
  3787.                                       DBF(
  3788.  
  3789.      Allows access to data-file attributes of a file in use.
  3790.  
  3791.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3792.      โ•‘ DBF(<type>[,<filenum>])                                            โ•‘
  3793.      โ•‘                                                                    โ•‘
  3794.      โ•‘ <type>      the information required from the data file header     โ•‘
  3795.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  3796.      โ•‘ Option:                                                            โ•‘
  3797.      โ•‘                                                                    โ•‘
  3798.      โ•‘ <filenum>   the data file number; default is the currently         โ•‘
  3799.      โ•‘               selected data file                                   โ•‘
  3800.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                          โ•‘
  3801.      โ•‘ Type: character/numeric โ”‚                                          โ•‘
  3802.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3803.  
  3804.           Each data file has a file head which contains information about
  3805.      its structure, most of which is displayed with the LIST STRUCTURE
  3806.      command.
  3807.  
  3808.           Using the DBF(, DBFX( and FLD( functions provides users access to
  3809.      this information in a programmable form suitable for display and use
  3810.      in expressions.
  3811.  
  3812.           The <type> can be given in either of two forms, a name or number
  3813.      (numeric expression) as follows:
  3814.  
  3815.           Type           Explanation                        Result
  3816.  
  3817.           1 or Type      file type ("1", "2" or "3")        string
  3818.           2 or Name      data file name                     string
  3819.           3 or Fields    number of fields in structure      integer
  3820.           4 or Records   number of records in file          integer
  3821.           5 or Indexes   number of indexes currently open   integer
  3822.           6 or Master    index number of master index       integer
  3823.  
  3824.           Shortcut: When specifying type by name, only the first character
  3825.           is required.
  3826.  
  3827.           Example:
  3828.  
  3829.      1>? DBF(type),DBF(n),DBF(fields),DBF(recs),DBF(indexes),DBF(master)
  3830.      1 CUSTOMER.DBF       9.00       4.00       2.00       1.00
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.      DBF(                        SRI  VPI  VPIN                        DBF(
  3842.  
  3843.      SR-Info/VP-Info Reference Manual           Page 55           SECTION 3
  3844.  
  3845.  
  3846.           Note to users of VP-Info Version 1:
  3847.  
  3848.           The DBF( function, though not in the original Version 1
  3849.      documentation, was added and documented in a disk file supplied to
  3850.      later purchasers.  Types 1 to 3 remain unchanged, but types 4 to 7 in
  3851.      the original DBF( function are now types 1 to 4 of the FLD( function.
  3852.      Existing programs that use DBF( may have to be modified to work as
  3853.      expected under the current versions.
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.      DBF(                        SRI  VPI  VPIN                        DBF(
  3902.  
  3903.      SR-Info/VP-Info Reference Manual           Page 56           SECTION 3
  3904.  
  3905.  
  3906.  
  3907.                                      DBFX(
  3908.  
  3909.      Gives additional information about an open data file; an extension to
  3910.      the DBF( function.
  3911.  
  3912.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3913.      โ•‘ DBFX(<type> [,<filenum>])                                          โ•‘
  3914.      โ•‘                                  VP-Info Professional only         โ•‘
  3915.      โ•‘ <type>      one of three types of information as listed below      โ•‘
  3916.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  3917.      โ•‘ Option:                                                            โ•‘
  3918.      โ•‘                                                                    โ•‘
  3919.      โ•‘ <filenum>   the data file number; default is the currently         โ•‘
  3920.      โ•‘               selected data file                                   โ•‘
  3921.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  3922.      โ•‘ Type: logical   โ”‚                                                  โ•‘
  3923.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3924.  
  3925.           The DBF( and FLD( functions, available in both SR-Info and
  3926.      VP-Info, provide information contained in the data file headers.
  3927.  
  3928.           VP-Info Professional provides this extended function to give
  3929.      three additional types of information in a programmable form suitable
  3930.      for display and use in expressions.
  3931.  
  3932.           The <type> can be given in either of two forms, a name or number
  3933.      (numeric expression) as follows:
  3934.  
  3935.           Type           Explanation                       
  3936.  
  3937.           1 or Filter    TRUE if a FILTER is in effect
  3938.           2 or Limit     TRUE if a LIMIT is in effect
  3939.           3 or Relation  TRUE if file is related to another
  3940.  
  3941.           Shortcut: When specifying type by name, only the first character
  3942.           is required.
  3943.  
  3944.  
  3945.           Examples:
  3946.  
  3947.      1>SET FILTER TO state='CA'
  3948.      1>? DBFX(filter)
  3949.      T
  3950.      1>? DBFX(r)
  3951.      F
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.      DBFX(                          VPI  VPIN                         DBFX(
  3962.  
  3963.      SR-Info/VP-Info Reference Manual           Page 57           SECTION 3
  3964.  
  3965.  
  3966.  
  3967.                                     DELETED(
  3968.  
  3969.      Determines whether a record is deleted.
  3970.  
  3971.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  3972.      โ•‘ DELETED(<filenum>)                                                 โ•‘
  3973.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  3974.      โ•‘ Option:                                                            โ•‘
  3975.      โ•‘                                                                    โ•‘
  3976.      โ•‘ <filenum>    the number of the data file to be checked             โ•‘
  3977.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  3978.      โ•‘ Type: logical โ”‚                                                    โ•‘
  3979.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  3980.  
  3981.           In a specified data file, the current record pointer points at a
  3982.      record.  If this record has been marked for deletion (in BROWSE or
  3983.      EDIT, or with the DELETE command), then DELETED( gives the value T;
  3984.      otherwise, it is false.
  3985.  
  3986.           This is a more general firm of the * function, which operates the
  3987.      same way as DELETED( but, because it allows no parameter, works only
  3988.      with the currently selected data file.
  3989.  
  3990.           Examples:
  3991.  
  3992.      1>? DELETED(4)
  3993.      T
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.      DELETED(                    SRI  VPI  VPIN                    DELETED(
  4022.  
  4023.      SR-Info/VP-Info Reference Manual           Page 58           SECTION 3
  4024.  
  4025.  
  4026.  
  4027.                                       DIR(
  4028.  
  4029.      Get file information from disk directory.
  4030.  
  4031.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4032.      โ•‘ DIR([<filespec>])                                                  โ•‘
  4033.      โ•‘                                                                    โ•‘
  4034.      โ•‘ Option:                                                            โ•‘
  4035.      โ•‘                                                                    โ•‘
  4036.      โ•‘ <filespec>    a string or string expression containing a file name โ•‘
  4037.      โ•‘                 (or skeleton using ? and/or * wildcards), with     โ•‘
  4038.      โ•‘                 optional drive and/or path specification           โ•‘
  4039.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4040.      โ•‘ Type: character โ”‚                                                  โ•‘
  4041.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4042.  
  4043.           Searches for specific files specified by the drive path,
  4044.      subdirectory and/or filename and provides specific information on
  4045.      files found.
  4046.  
  4047.           If an argument is given, it must be a string or string expression
  4048.      naming a file, with * and ? wildcards optional). Returns the first
  4049.      file name found matching <filespec>. If no match was found, blank is
  4050.      returned.
  4051.  
  4052.           If no argument is given, the previous <filespec> is used to find
  4053.      the next matching file. If no more matching file names are found,
  4054.      blank is returned.
  4055.  
  4056.           Examples:
  4057.  
  4058.      DIR('c:\path\*.bak')
  4059.  
  4060.      locates the first file with extension BAK in the subdirectory \PATH,
  4061.      while
  4062.  
  4063.      DIR('*.bak')
  4064.  
  4065.      locates the first file with extension BAK in the current directory.
  4066.  
  4067.           If a file is found with Form 1, entering DIR() with no parameters
  4068.      will locate the next file meeting the <filespec>.  This will continue
  4069.      until the response is a blank, indicating there are no more files
  4070.      meeting the <filespec>.
  4071.  
  4072.  
  4073.           Note to users of VP-Info Version 1:
  4074.  
  4075.           The DIR( function, though not in the original Version 1
  4076.      documentation, was added and documented in a disk file supplied to
  4077.  
  4078.  
  4079.  
  4080.  
  4081.      DIR(                        SRI  VPI  VPIN                        DIR(
  4082.  
  4083.      SR-Info/VP-Info Reference Manual           Page 59           SECTION 3
  4084.  
  4085.  
  4086.      later purchasers.  One of the forms of the original DIR( function has
  4087.      been made into a separate function, DIRX(.  Existing programs that use
  4088.      DBF( may have to be modified to work as expected under the current
  4089.      versions.
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.      DIR(                        SRI  VPI  VPIN                        DIR(
  4142.  
  4143.      SR-Info/VP-Info Reference Manual           Page 60           SECTION 3
  4144.  
  4145.  
  4146.  
  4147.                                      DIRX(
  4148.  
  4149.      Obtain additional information about file located with the DIR(
  4150.      function.
  4151.  
  4152.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4153.      โ•‘ DIRX(<type>)                                                       โ•‘
  4154.      โ•‘                                  VP-Info Professional only         โ•‘
  4155.      โ•‘ <type>    the name or number of the information required about     โ•‘
  4156.      โ•‘             a file                                                 โ•‘
  4157.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                          โ•‘
  4158.      โ•‘ Type: character/numeric โ”‚                                          โ•‘
  4159.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4160.  
  4161.           Once a file is identified with DIR(, additional information can
  4162.      be obtained from the DOS directory in a form suitable for use in a
  4163.      program.
  4164.  
  4165.           The <type> can be given in either of two forms, a name or number
  4166.      (numeric expression) as follows:
  4167.  
  4168.           Type           Explanation                         Result
  4169.  
  4170.           1 or Name      last file name found with DIR(      string
  4171.           2 or Size      size in bytes of last name found
  4172.                               with DIR(                      integer
  4173.           3 or Attribute DOS file attribute as follows       integer
  4174.                               1 - directory
  4175.                               2 - system
  4176.                               3 - hidden
  4177.                               4 - read only
  4178.                               5 - normal
  4179.           4 or Time      time file created or last updated   string
  4180.           5 or Date      date file created or last updated   string
  4181.  
  4182.           Shortcut: When specifying type by name, only the first character
  4183.           is required.
  4184.  
  4185.           These functions have many uses. Use them to write a program that
  4186.      backs up recently modified files, a program that lists files so the
  4187.      user can pick one, etc.
  4188.  
  4189.           Examples:
  4190.  
  4191.      DIR(n) returns the filename
  4192.      DIR(a) returns 4 if the file is read only
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.      DIRX(                          VPI  VPIN                         DIRX(
  4202.  
  4203.      SR-Info/VP-Info Reference Manual           Page 61           SECTION 3
  4204.  
  4205.  
  4206.  
  4207.                                       EOF
  4208.  
  4209.      Gives the end-of-file flag for the currently selected data file.
  4210.  
  4211.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4212.      โ•‘ EOF                                                                โ•‘
  4213.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  4214.      โ•‘ Type: logical โ”‚                                                    โ•‘
  4215.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4216.  
  4217.           If the current record pointer is on the last record of the file
  4218.      in use and a SKIP is issued, EOF returns T (true); otherwise it is F
  4219.      (false).  Since SKIP n is treated as n SKIP commands, EOF returns true
  4220.      if SKIP n goes past the last record.  Also, if a LOCATE or CONTINUE
  4221.      command is unsuccessful, or if NEAREST does not find an index key
  4222.      equal to or greater than the FIND string, EOF returns T.
  4223.  
  4224.           Examples:
  4225.  
  4226.      1>USE employee
  4227.      1>GO 4
  4228.      1>SKIP 2
  4229.      1>? #
  4230.            6.00
  4231.      1>? EOF
  4232.      F
  4233.      1>SKIP
  4234.      1>? EOF
  4235.      T
  4236.      1>GO 4
  4237.      1>SKIP 3
  4238.      1>? #
  4239.            6.00
  4240.      1>? EOF
  4241.      T
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.      EOF                         SRI  VPI  VPIN                         EOF
  4262.  
  4263.      SR-Info/VP-Info Reference Manual           Page 62           SECTION 3
  4264.  
  4265.  
  4266.  
  4267.                                       EOF(
  4268.  
  4269.      Gives the end-of-file flag for a specified data file.
  4270.  
  4271.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4272.      โ•‘ EOF([<filenum>])                                                   โ•‘
  4273.      โ•‘                                                                    โ•‘
  4274.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  4275.      โ•‘ Option:                                                            โ•‘
  4276.      โ•‘                                                                    โ•‘
  4277.      โ•‘ <filenum>    the number of the data file to be checked             โ•‘
  4278.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4279.      โ•‘ Type: logical   โ”‚                                                  โ•‘
  4280.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4281.  
  4282.           For the data file number specified, if the current record pointer
  4283.      is on the last record and a SKIP is issued, EOF( returns T (true);
  4284.      otherwise it is F (false).  Since SKIP n is treated as n SKIP
  4285.      commands, EOF( returns true if SKIP n goes past the last record.
  4286.  
  4287.           Also, if a LOCATE or CONTINUE command is unsuccessful, or if
  4288.      NEAREST does not find an index key equal to or greater than the FIND
  4289.      string, EOF( returns T.
  4290.  
  4291.           An extended form of the EOF( function which, since it takes no
  4292.      parameter, works only on the currently selected data file.  If no
  4293.      <filenum> is specified, the current file is assumed.
  4294.  
  4295.           Examples:
  4296.  
  4297.      1>USE employee
  4298.      1>GO 4
  4299.      1>SKIP 2
  4300.      1>? #
  4301.            6.00
  4302.      1>? EOF()
  4303.      F
  4304.      1>SELECT 2
  4305.      2>SKIP
  4306.      2>? EOF()
  4307.      T
  4308.      2>GO BOTTOM
  4309.      2>SKIP
  4310.      2>? #
  4311.            6.00
  4312.      2>SELECT 1
  4313.      1>? EOF(2)
  4314.      T
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.      EOF(                        SRI  VPI  VPIN                        EOF(
  4322.  
  4323.      SR-Info/VP-Info Reference Manual           Page 63           SECTION 3
  4324.  
  4325.  
  4326.  
  4327.                                      FIELD(
  4328.  
  4329.      Get the number of the Get Table entry corresponding to a variable or
  4330.      field name.
  4331.  
  4332.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4333.      โ•‘ FIELD(<name>)                                                      โ•‘
  4334.      โ•‘                                                                    โ•‘
  4335.      โ•‘ <name>    the name of field or variable in a Get Table             โ•‘
  4336.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4337.      โ•‘ Type: numeric   โ”‚                                                  โ•‘
  4338.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4339.  
  4340.           While in full-screen editing mode (with READ, BROWSE, EDIT,
  4341.      etc.), each input variable and field is put into a Get Table that can
  4342.      be controlled with an ON FIELD structure.
  4343.  
  4344.           FIELD( returns the number from 1 to 64 of any editing field on
  4345.      screens created with @ GET and TEXT macros.  This function is usually
  4346.      used on an ON FIELD structure to redirect the sequence of data entry.
  4347.  
  4348.           See READ and ON FIELD in the Command Reference section.
  4349.  
  4350.           Example in a program:
  4351.  
  4352.      ON FIELD
  4353.      FIELD qty
  4354.         IF qty<0
  4355.            @ 22,0 say CEN('Quantity cannot be negative. Press any key',80)
  4356.            cc=INKEY()
  4357.            ERASE 22,22
  4358.            :FIELD=FIELD(qty)
  4359.         ENDIF
  4360.      ENDON
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.      FIELD(                      SRI  VPI  VPIN                      FIELD(
  4382.  
  4383.      SR-Info/VP-Info Reference Manual           Page 64           SECTION 3
  4384.  
  4385.  
  4386.  
  4387.                                      FILE(
  4388.  
  4389.      Verifies whether a file exists.
  4390.  
  4391.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4392.      โ•‘ FILE(<str exp>)                                                    โ•‘
  4393.      โ•‘                                                                    โ•‘
  4394.      โ•‘ <str exp>         file name                                        โ•‘
  4395.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  4396.      โ•‘ Type: logical โ”‚                                                    โ•‘
  4397.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4398.      
  4399.           This function looks up the file whose name is given by <str exp>;
  4400.      if the file is found, the function returns T, otherwise it returns F.
  4401.  
  4402.           If no extension is given in the file name, DBF is assumed (a data
  4403.      file is looked for).  See also SET DEFAULT TO for the default drive.
  4404.  
  4405.           Examples:
  4406.  
  4407.      1>? FILE('employee')
  4408.      T
  4409.      1>? FILE('a:read.me')
  4410.      T
  4411.      1>mfile='read.me'
  4412.      1>? FILE(mfile)
  4413.      F
  4414.      1>? FILE('a:'+mfile)
  4415.      T
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.      FILE(                       SRI  VPI  VPIN                       FILE(
  4442.  
  4443.      SR-Info/VP-Info Reference Manual           Page 65           SECTION 3
  4444.  
  4445.  
  4446.  
  4447.                                       FLD(
  4448.  
  4449.      Get information about a field in a data file.
  4450.  
  4451.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4452.      โ•‘ FLD(<type>,<fieldnum> [,<filenum>])                                โ•‘
  4453.      โ•‘                                                                    โ•‘
  4454.      โ•‘ <type>       one of the four attributes of a field                 โ•‘
  4455.      โ•‘ <fieldnum>   the number of the field to be checked                 โ•‘
  4456.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  4457.      โ•‘ Option:                                                            โ•‘
  4458.      โ•‘                                                                    โ•‘
  4459.      โ•‘ <filenum>    the number of the data file to be checked             โ•‘
  4460.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                          โ•‘
  4461.      โ•‘ Type: character/numeric โ”‚                                          โ•‘
  4462.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4463.  
  4464.           Each field in a data file has four attributes as shown with the
  4465.      LIST STRUCTURE command: name, type, width and (for numeric variables)
  4466.      number of decimal places.  The FLD( function is often used in
  4467.      conjunction with the DBF( function.
  4468.  
  4469.           These attributes can be retrieved in a form suitable for use in a
  4470.      program with the FLD( function.
  4471.  
  4472.           The <type> can be given in either of two forms, a name or number
  4473.      (numeric expression) as follows:
  4474.  
  4475.           Type           Explanation                              Result
  4476.  
  4477.  
  4478.           1 or Name      string containing field name             string
  4479.           2 or Type      string containing field type             string
  4480.           3 or Width     number containing width of field         integer
  4481.           4 or Decimals  number of decimal places in field        integer
  4482.  
  4483.           Shortcut: When specifying type by name, only the first character
  4484.           is required.
  4485.  
  4486.  
  4487.           Example in a program:
  4488.  
  4489.      REPEAT DBF(records) TIMES varying fldnum
  4490.         REPEAT 4 times VARYING type
  4491.            ?? FLD(type,fldnum)
  4492.         ENDREPEAT
  4493.         ?
  4494.      ENDREPEAT
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.  
  4501.      FLD(                        SRI  VPI  VPIN                        FLD(
  4502.  
  4503.      SR-Info/VP-Info Reference Manual           Page 66           SECTION 3
  4504.  
  4505.  
  4506.  
  4507.                                       GET(
  4508.  
  4509.      Gets a string from a DOS file.
  4510.  
  4511.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4512.      โ•‘ GET(<str var>,<width num exp>[,filenum])                           โ•‘
  4513.      โ•‘                                                                    โ•‘
  4514.      โ•‘ <str var>          stores the string                               โ•‘
  4515.      โ•‘ <width num exp>    the width of the string requested;              โ•‘
  4516.      โ•‘                      must be in range 1 to 254                     โ•‘
  4517.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  4518.      โ•‘ Option:                                                            โ•‘
  4519.      โ•‘                                                                    โ•‘
  4520.      โ•‘ filenum            the DOS file number (between 1 and 4)           โ•‘
  4521.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  4522.      โ•‘ Type: logical โ”‚                                                    โ•‘
  4523.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4524.  
  4525.           This function imports a string of <width num exp> characters from
  4526.      a DOS file opened with the ROPEN( function; the character number
  4527.      pointer is normally positioned with the SEEK( function.
  4528.  
  4529.           If successful in getting all the bytes requested, GET( returns T
  4530.      (true) and sets <str var> to the string imported from the file.  If
  4531.      <str var> does not exist, GET( will create it.
  4532.  
  4533.           If the function is unsuccessful, it returns F (false).  This will
  4534.      be the result if the GET( function tries to get data beyond the end of
  4535.      the file.  Note, however, that even if GET( returns F, one of more
  4536.      characters may still have been imported from the file; it is wise to
  4537.      check the value and width of <str var> to ensure part of a file is not
  4538.      lost.
  4539.  
  4540.           If filenum is not given, filenum=1 is assumed.
  4541.  
  4542.           GET( READ(, IN(, and WRAP( are the only functions that change the
  4543.      contents of the memory variable used as an argument.
  4544.  
  4545.           See also the functions ROPEN(, WOPEN(, CLOSE(, SEEK(, PUT(.
  4546.  
  4547.           Example in a program:
  4548.  
  4549.      IF ROPEN('test',3)
  4550.         DO WHILE GET(string,80,3)
  4551.            ? string
  4552.         ENDDO
  4553.      ENDIF
  4554.      ok=CLOSE(3)
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.      GET(                        SRI  VPI  VPIN                        GET(
  4562.  
  4563.      SR-Info/VP-Info Reference Manual           Page 67           SECTION 3
  4564.  
  4565.  
  4566.  
  4567.                                       IFF(
  4568.  
  4569.      Allows IF...THEN logic in expressions.
  4570.  
  4571.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4572.      โ•‘ IFF(<cond>,<exptrue>,<expfalse>)                                   โ•‘
  4573.      โ•‘                                                                    โ•‘
  4574.      โ•‘ <cond>       a logical expression                                  โ•‘
  4575.      โ•‘ <exptrue>    the expression to be returned if <cond> is TRUE       โ•‘
  4576.      โ•‘ <expfalse>   the expression to be returned if <cond> is FALSE      โ•‘
  4577.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                  โ•‘
  4578.      โ•‘ Type: character/numeric/logical โ”‚                                  โ•‘
  4579.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4580.  
  4581.           This function returns <exptrue> if <cond> is true, <expfalse>
  4582.      otherwise. The type of the value returned is the same as the
  4583.      expression selected by the condition.
  4584.  
  4585.      IFF( is very useful in the FIELDS line of reports or in commands such
  4586.      as SUM, AVERAGE, REPLACE, or LIST.
  4587.  
  4588.           Examples:
  4589.  
  4590.      1>? IFF(married,'Married','Single ')
  4591.      1>SUM IFF(quant>500, quant*price, 0),IFF(state='NY',1,0)
  4592.  
  4593.           The first command prints "Married" or "Single" according to the
  4594.      value of a logical field named MARRIED. The second command will return
  4595.      the sum of all quantities for transactions where quantity is greater
  4596.      than 500, and a count of all records where STATE='NY', thus combining
  4597.      two separate commands (SUM FOR and COUNT FOR) into one.
  4598.  
  4599.                Caution: do not use expressions of different types or widths
  4600.           in reports, since this may cause the REPORT command to fail.
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.      IFF(                        SRI  VPI  VPIN                        IFF(
  4622.  
  4623.      SR-Info/VP-Info Reference Manual           Page 68           SECTION 3
  4624.  
  4625.  
  4626.  
  4627.                                       IN(
  4628.  
  4629.      Inputs a single character from a sequential file.
  4630.  
  4631.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4632.      โ•‘ IN(<str var>[,<filenum>])                                          โ•‘
  4633.      โ•‘                                                                    โ•‘
  4634.      โ•‘ <str var>      stores the character                                โ•‘
  4635.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  4636.      โ•‘ Option:                                                            โ•‘
  4637.      โ•‘                                                                    โ•‘
  4638.      โ•‘ <filenum>      the DOS file number (between 1 and 4)               โ•‘
  4639.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  4640.      โ•‘ Type: logical โ”‚                                                    โ•‘
  4641.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4642.  
  4643.           This function reads the next character of the DOS file (opened
  4644.      with the ROPEN( function) into the string variable <str var>; if
  4645.      <str var> does not exist, it will be created.  <str var> cannot be a
  4646.      matrix variable.
  4647.  
  4648.           If filenum is not given, filenum=1 is assumed.  IN( returns T if
  4649.      successful, F otherwise.
  4650.  
  4651.           This function is especially useful to communicate over the
  4652.      standard COM1, COM2 devices, for conversion of Word Star or other non-
  4653.      standard files to standard ASCII files, to encrypt/decrypt a file
  4654.      through a translation table.
  4655.  
  4656.           IN(, GET(, READ(, and WRAP( are the only functions that change
  4657.      the contents of the memory variable used as an argument.
  4658.  
  4659.           See the functions OUT(, ROPEN(, WOPEN(, SEEK(, SSEEK(, and
  4660.      CLOSE(.
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.      IN(                         SRI  VPI  VPIN                         IN(
  4682.  
  4683.      SR-Info/VP-Info Reference Manual           Page 69           SECTION 3
  4684.  
  4685.  
  4686.  
  4687.                                      IFKEY(
  4688.  
  4689.      Tests if a character is waiting in the keyboard buffer.
  4690.  
  4691.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4692.      โ•‘ IFKEY()                                                            โ•‘
  4693.      โ•‘                                  VP-Info Professional only         โ•‘
  4694.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4695.      โ•‘ Type: logical   โ”‚                                                  โ•‘
  4696.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4697.  
  4698.           It is often useful to test whether a key has been pressed on the
  4699.      keyboard without waiting indefinitely if a key is not pressed.
  4700.  
  4701.           The IFKEY( function returns T (true) if a keystroke is waiting in
  4702.      the keyboard buffer, F (false) if not.  The keyboard buffer is not
  4703.      affected.
  4704.  
  4705.           Example in a program, to create a timing loop that ends as soon
  4706.      as any key is pressed:
  4707.  
  4708.      start=VAL(TIME(seconds))
  4709.      DO WHILE VAL(TIME(seconds))-start<3
  4710.         IF IFKEY()
  4711.            BREAK
  4712.         ENDIF
  4713.      ENDDO
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.      IFKEY(                         VPI  VPIN                        IFKEY(
  4742.  
  4743.      SR-Info/VP-Info Reference Manual           Page 70           SECTION 3
  4744.  
  4745.  
  4746.  
  4747.                                      INKEY(
  4748.  
  4749.      Waits and gets numeric value of keyboard entry.
  4750.  
  4751.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4752.      โ•‘ INKEY()                                                            โ•‘
  4753.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  4754.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  4755.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4756.  
  4757.           This function suspends program execution until a key is pressed.
  4758.      It returns a number identifying the key.  Nothing is displayed on the
  4759.      screen.  Any key can be read (except Alt, Ctrl, and shift which merely
  4760.      affect the characters produced by other keys) including all function
  4761.      keys, editing keys, and alternate keys.  (Function keys F11 and F12
  4762.      are not recognized by many computers' BIOS programs, and are ignored
  4763.      by SR-Info/VP-Info.)
  4764.  
  4765.           Standard keys are identified with their ASCII number; see the
  4766.      functions CHR( and ASC(.  Other keys return values between 256 and
  4767.      511.
  4768.  
  4769.           Examples:
  4770.  
  4771.  
  4772.                     Key                     INKEY()
  4773.  
  4774.                     Ctrl-C                    3
  4775.                     A                        65
  4776.                     Alt-A                   285
  4777.                     <F1>                    315
  4778.                     Shift-<F1>              340
  4779.                     Ctrl-<F1>               350
  4780.                     Alt-<F1>                360
  4781.  
  4782.  
  4783.           To find out the number identifying a key, give the command:
  4784.  
  4785.      1>? INKEY()
  4786.  
  4787.      and press <ENTER>, then the key; the character's number will be
  4788.      displayed.
  4789.  
  4790.           Using INKEY() the user can program his own EDIT, set up cursor
  4791.      controlled menus, and so on.
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.      INKEY(                      SRI  VPI  VPIN                      INKEY(
  4802.  
  4803.      SR-Info/VP-Info Reference Manual           Page 71           SECTION 3
  4804.  
  4805.  
  4806.  
  4807.                                     INSERT(
  4808.  
  4809.      Overwrites a string at a given position with another string.
  4810.  
  4811.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4812.      โ•‘ INSERT(<str expover>,<str exp>,<num exp>)                          โ•‘
  4813.      โ•‘                                                                    โ•‘
  4814.      โ•‘ <str expover>   the string expression to overwrite                 โ•‘
  4815.      โ•‘ <str exp>       the string expression to overwrite with            โ•‘
  4816.      โ•‘ <num exp>       the position                                       โ•‘
  4817.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4818.      โ•‘ Type: character โ”‚                                                  โ•‘
  4819.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4820.  
  4821.           This function takes the string in <str expover> and overwrites
  4822.      the string with <str exp> starting at position <num exp>.
  4823.  
  4824.           Examples:
  4825.  
  4826.      1>line='                              '
  4827.      1>customer='John Smith'
  4828.      1>ponumber='32109'
  4829.      1>amount='910.56'
  4830.      1>line=INSERT(line,customer,1)
  4831.      1>? line
  4832.      John Smith
  4833.      1>line=INSERT(line,ponumber,15)
  4834.      1>? line
  4835.      John Smith    32109
  4836.      1>line=INSERT(line,amount,25)
  4837.      1>? line
  4838.      John Smith    32109     910.56
  4839.      1>line='            c                 '
  4840.      1>newline=INSERT(line,customer,@('c',line))
  4841.      1>? newline
  4842.                  John Smith
  4843.  
  4844.           Note: The last example shows the use of INSERT( with "templates".
  4845.      The line variable is the template.  The character "c" in it designates
  4846.      the place where the customer has to be inserted.  Such templates are
  4847.      useful in report generators or for creating screen displays.
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.      INSERT(                     SRI  VPI  VPIN                     INSERT(
  4862.  
  4863.      SR-Info/VP-Info Reference Manual           Page 72           SECTION 3
  4864.  
  4865.  
  4866.  
  4867.                                      LEFT(
  4868.  
  4869.      Gets the left part of a string.
  4870.  
  4871.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4872.      โ•‘ LEFT(<str exp>, <num exp>)                                         โ•‘
  4873.      โ•‘                                                                    โ•‘
  4874.      โ•‘ <str exp>   the string from which the new string is formed         โ•‘
  4875.      โ•‘ <num exp>   the number of characters to place in the new string    โ•‘
  4876.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4877.      โ•‘ Type: character โ”‚                                                  โ•‘
  4878.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4879.  
  4880.           This function takes the first <num exp> characters from the
  4881.      string <str exp>.  It is equivalent to, but more efficient than,
  4882.      $(<str exp>, 1, <num exp>).
  4883.  
  4884.           If <num exp> is greater than the width of <str exp>, this
  4885.      function returns all of <str exp>.
  4886.  
  4887.           Wherever an expression calls for a substring starting at the
  4888.      beginning, use LEFT instead of $( or SUBSTR(.
  4889.  
  4890.           Example:
  4891.  
  4892.      1>a='David Bark'
  4893.      1>? LEFT(a,5)
  4894.      David
  4895.      1>? LEFT(a,50)
  4896.      David Bark
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.      LEFT(                       SRI  VPI  VPIN                       LEFT(
  4922.  
  4923.      SR-Info/VP-Info Reference Manual           Page 73           SECTION 3
  4924.  
  4925.  
  4926.  
  4927.                                       LEN(
  4928.  
  4929.      Gets the width (length) of a string.
  4930.  
  4931.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4932.      โ•‘ LEN(<str exp>)                                                     โ•‘
  4933.      โ•‘                                                                    โ•‘
  4934.      โ•‘ <str exp>      the string                                          โ•‘
  4935.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  4936.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  4937.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  4938.  
  4939.           This function returns the width (including trailing blanks) of
  4940.      the string <str exp>.
  4941.  
  4942.           Examples:
  4943.  
  4944.      1>name='David Barberr'
  4945.      1>? LEN(name)
  4946.          13.00
  4947.      1>? LEN(name+' is a nice boy')
  4948.          27.00
  4949.  
  4950.           Note that the width of a string is at least 1!
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.      LEN(                        SRI  VPI  VPIN                        LEN(
  4982.  
  4983.      SR-Info/VP-Info Reference Manual           Page 74           SECTION 3
  4984.  
  4985.  
  4986.  
  4987.                                       LOC(
  4988.  
  4989.      Gets the current byte position in a file opened with ROPEN( or WOPEN(.
  4990.  
  4991.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  4992.      โ•‘ LOC([<filenum>])                                                   โ•‘
  4993.      โ•‘                                                                    โ•‘
  4994.      โ•‘ Option:                                                            โ•‘
  4995.      โ•‘                                                                    โ•‘
  4996.      โ•‘ <filenum>    the number of the sequential or random file, 1 to 4   โ•‘
  4997.      โ•‘                (default 1)                                         โ•‘
  4998.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  4999.      โ•‘ Type: numeric   โ”‚                                                  โ•‘
  5000.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5001.  
  5002.           Whenever a file is opened with the ROPEN( or WOPEN( function,
  5003.      SR-Info/VP-Info maintains a pointer at a current position, which is
  5004.      where any PUT( or GET( function would take effect.  The position
  5005.      pointer is set with the SEEK( and SSEEK( functions, and reset every
  5006.      time the IN(, OUT, READ(, WRITE(, PUT(, and GET( function is used.
  5007.  
  5008.           If filenum is not given, filenum=1 is assumed.
  5009.  
  5010.           A common use of LOC( is to get the current position before a
  5011.      SEEK( so that the pointer can be reset to the original position after
  5012.      some operation.
  5013.  
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.      LOC(                        SRI  VPI  VPIN                        LOC(
  5042.  
  5043.      SR-Info/VP-Info Reference Manual           Page 75           SECTION 3
  5044.  
  5045.  
  5046.  
  5047.                                      LOWER(
  5048.  
  5049.      Converts a string to lower case.
  5050.  
  5051.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5052.      โ•‘ LOWER(<str exp>)                                                   โ•‘
  5053.      โ•‘                                                                    โ•‘
  5054.      โ•‘ <str exp>        the text to be converted to lower case            โ•‘
  5055.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  5056.      โ•‘ Type: character โ”‚                                                  โ•‘
  5057.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5058.  
  5059.           All upper-case letters in the <str exp> are converted into lower
  5060.      case by the LOWER( function.  See also the !( and UPPER( functions.
  5061.  
  5062.           Examples:
  5063.  
  5064.      1>a='Aa12b'
  5065.      1>? LOWER(a)
  5066.      aa12b
  5067.      1>? LOWER('David!')
  5068.      david!
  5069.  
  5070.           Note that only the upper-case letters, A-Z, are changed (to a-z).
  5071.      No other characters are affected.
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.      LOWER(                      SRI  VPI  VPIN                      LOWER(
  5102.  
  5103.      SR-Info/VP-Info Reference Manual           Page 76           SECTION 3
  5104.  
  5105.  
  5106.  
  5107.                                      LTRIM(
  5108.  
  5109.      Trims blanks from the left-hand side of a string.
  5110.  
  5111.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5112.      โ•‘ LTRIM(<str exp>)                                                   โ•‘
  5113.      โ•‘                                                                    โ•‘
  5114.      โ•‘ <str exp>        the string to be trimmed                          โ•‘
  5115.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  5116.      โ•‘ Type: character โ”‚                                                  โ•‘
  5117.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5118.  
  5119.           This function gets rid of the blanks on the left of a string.
  5120.      See also TRIM(.
  5121.  
  5122.           Examples:
  5123.  
  5124.      1>a='    David     '
  5125.      1>? a
  5126.          David
  5127.      1>? LEN(a)
  5128.          14.00
  5129.      1>? LTRIM(a)+' is trimmed on the left'
  5130.      David      is trimmed on the left
  5131.      1>? LEN(LTRIM(a))
  5132.           9.00
  5133.      1>blank='     '
  5134.      1>? LEN(LTRIM(blank))
  5135.           1.00
  5136.  
  5137.           Note: LTRIM(blank) is a single blank.
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.      LTRIM(                      SRI  VPI  VPIN                      LTRIM(
  5162.  
  5163.      SR-Info/VP-Info Reference Manual           Page 77           SECTION 3
  5164.  
  5165.  
  5166.  
  5167.                                  Math Functions
  5168.  
  5169.      Mathematical functions package.
  5170.  
  5171.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5172.      โ•‘ Logarithmic functions:                                             โ•‘
  5173.      โ•‘    EXP(            e-th power                                      โ•‘
  5174.      โ•‘    LOG(            natural logarithmic function                    โ•‘
  5175.      โ•‘    LOG10(          base 10 logarithmic function                    โ•‘
  5176.      โ•‘    POW(            power                                           โ•‘
  5177.      โ•‘    SQRT(           square root                                     โ•‘
  5178.      โ•‘                                                                    โ•‘
  5179.      โ•‘ Trigonometric functions:                                           โ•‘
  5180.      โ•‘    SIN(            sine                                            โ•‘
  5181.      โ•‘    COS(            cosine                                          โ•‘
  5182.      โ•‘    TAN(            tangent                                         โ•‘
  5183.      โ•‘    ASIN(           arc sine                                        โ•‘
  5184.      โ•‘    ACOS(           arc cosine                                      โ•‘
  5185.      โ•‘    ATAN(           arc tangent                                     โ•‘
  5186.      โ•‘                                                                    โ•‘
  5187.      โ•‘ Hyperbolic functions:                                              โ•‘
  5188.      โ•‘    SINH(           hyperbolic sine                                 โ•‘
  5189.      โ•‘    COSH(           hyperbolic cosine                               โ•‘
  5190.      โ•‘    TANH(           hyperbolic tangent                              โ•‘
  5191.      โ•‘                                                                    โ•‘
  5192.      โ•‘ Integer valued functions:                                          โ•‘
  5193.      โ•‘                                                                    โ•‘
  5194.      โ•‘    CEIL(           ceiling integer                                 โ•‘
  5195.      โ•‘    FLOOR(          floor integer                                   โ•‘
  5196.      โ•‘    INT(            integer part                                    โ•‘
  5197.      โ•‘                                                                    โ•‘
  5198.      โ•‘  Real valued functions:                                            โ•‘
  5199.      โ•‘    ABS(            absolute value                                  โ•‘
  5200.      โ•‘    MOD(            modulo value                                    โ•‘
  5201.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  5202.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  5203.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5204.  
  5205.           The mathematical functions are divided into five groups:
  5206.  
  5207.      Logarithmic functions:
  5208.  
  5209.         EXP(<num exp>)               e to the power <num exp>
  5210.         LOG(<num exp>)               natural logarithm of <num exp>
  5211.         LOG10(<num exp>)             base 10 logarithm of <num exp>
  5212.         POW(<num exp1>,<num exp2>)   <num exp1> to the power <num exp2>
  5213.         SQRT(<num exp>)              square root of <num exp>
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.      Math Functions              SRI  VPI  VPIN              Math Functions
  5222.  
  5223.      SR-Info/VP-Info Reference Manual           Page 78           SECTION 3
  5224.  
  5225.  
  5226.      Trigonometric functions:
  5227.  
  5228.         SIN(<num exp>)               sine of <num exp> in radians
  5229.         COS(<num exp>)               cosine of <num exp> in radians
  5230.         TAN(<num exp>)               tangent of <num exp> in radians
  5231.         ASIN(<num exp>)              arc sine of <num exp>; returns a value
  5232.                                         in radians between -ฯ€/2 and ฯ€/2
  5233.         ACOS(<num exp>)              arc cosine of <num exp>; returns a
  5234.                                         value in radians between 0 and ฯ€
  5235.         ATAN(<num exp>)              arc tangent of <num exp>; returns a
  5236.                                         value in radians between -ฯ€/2 and
  5237.                                         ฯ€/2
  5238.  
  5239.  
  5240.      Hyperbolic functions:
  5241.  
  5242.         SINH(<num exp>)              hyperbolic sine of <num exp>
  5243.         COSH(<num exp>)              hyperbolic cosine of <num exp>
  5244.         TANH(<num exp>)              hyperbolic tangent of <num exp>
  5245.  
  5246.  
  5247.      Integer-valued functions:
  5248.  
  5249.          CEIL(<num exp>)             ceiling integer: the integer equal to
  5250.                                         or just above <num exp>
  5251.          FLOOR(<num exp>)            floor integer: the integer equal to or
  5252.                                         just below <num exp>
  5253.          INT(<num exp>)              the integer part of <num exp> (the
  5254.                                         fractional part is discarded)
  5255.                          Note that for positive numbers, INT( and FLOOR
  5256.                          return the same result, but for negative numbers,
  5257.                          INT( and CEIL( produce the same result.  This is
  5258.                          because discarding the decimal part of a real
  5259.                          number reduces its distance from zero.
  5260.  
  5261.  
  5262.      Real-valued functions:
  5263.  
  5264.          ABS(<num exp>)              absolute value of <num exp>
  5265.          MOD(<num exp1>,<num exp2>)  <num exp1> modulo <num exp1>: returns
  5266.                                         0 if <num exp2> is 0; returns the
  5267.                                         value num with the same sign as
  5268.                                         <num exp1>, less than <num exp2>,
  5269.                                         satisfying
  5270.  
  5271.                                             <num exp1>=i*<num exp2>+num
  5272.  
  5273.                                         for some integer i.
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.      Math Functions              SRI  VPI  VPIN              Math Functions
  5282.  
  5283.      SR-Info/VP-Info Reference Manual           Page 79           SECTION 3
  5284.  
  5285.  
  5286.           Examples:
  5287.  
  5288.      1>:PICTURE='999.999999'
  5289.      1>? EXP(1)
  5290.        2.718282                      this is the value of e
  5291.      1>? LOG(3)
  5292.        1.098612
  5293.      1>? LOG10(3)
  5294.        0.477121
  5295.      1>? POW(2,4)
  5296.       16.000000
  5297.      1>? POW(2,.5)
  5298.        1.414214
  5299.      1>? SQRT(4)
  5300.        2.000000
  5301.      1>? SQRT(2)
  5302.        1.414214
  5303.      1>? SIN(2)                      2 is in radians
  5304.        0.909297
  5305.      1>? ASIN(1)
  5306.        1.570796
  5307.      1>? 2*ASIN(1)
  5308.        3.141593                      this is, of course, ฯ€; store this to
  5309.                                         a variable if you need ฯ€
  5310.      1>? CEIL(3.14)
  5311.        4.000000
  5312.      1>? FLOOR(3.14)
  5313.        3.000000
  5314.      1>? INT(23.45)
  5315.       23.000000
  5316.      1>? INT(-23.45)
  5317.      -23.000000
  5318.      1>x=23.45
  5319.      1>? INT(10*x)
  5320.      234.000000
  5321.      1>x=23.999
  5322.      1>? INT(x)
  5323.       23.000000
  5324.      1>? INT(3.14)
  5325.        3.000000
  5326.      1>? FLOOR(-3.14)
  5327.       -4.000000
  5328.      1>? INT(-3.14)                  note that for negative numbers, INT(
  5329.       -3.000000                         and FLOOR( give different values
  5330.      1>? MOD(5,2)                    this is the remainder of 5
  5331.        1.000000                         divided by 2
  5332.      1>? MOD(-3.14, .7)
  5333.       -0.340000
  5334.      1>? ABS(-3.14)
  5335.        3.140000
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.      Math Functions              SRI  VPI  VPIN              Math Functions
  5342.  
  5343.      SR-Info/VP-Info Reference Manual           Page 80           SECTION 3
  5344.  
  5345.  
  5346.      1>:PICTURE='9999999.99'
  5347.      1>x=15.689
  5348.      1>? INT(x*100+.5)/100      Note: this is how to round to the
  5349.           15.69                        nearest penny
  5350.      1>x=15.244
  5351.      1>? INT(x*100+.5)/100
  5352.           15.24
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.      Math Functions              SRI  VPI  VPIN              Math Functions
  5402.  
  5403.      SR-Info/VP-Info Reference Manual           Page 81           SECTION 3
  5404.  
  5405.  
  5406.  
  5407.                                       MAX(
  5408.  
  5409.      Compare two expressions of any type and return the larger.
  5410.  
  5411.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5412.      โ•‘ MAX(<exp1>,<exp2>)                                                 โ•‘
  5413.      โ•‘                                                                    โ•‘
  5414.      โ•‘ <exp1>    any expression                                           โ•‘
  5415.      โ•‘ <exp2>    any expression of the same type as <exp1                 โ•‘
  5416.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                  โ•‘
  5417.      โ•‘ type: character/numeric/logical โ”‚                                  โ•‘
  5418.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5419.  
  5420.           Given any two expressions of the same type, MAX( returns the
  5421.      higher value.  It must be remembered that string comparisons are based
  5422.      on the ASCII value of the characters in the two strings.  Comparing
  5423.      two logical expressions has no meaning.
  5424.  
  5425.           Examples:
  5426.  
  5427.      1>? MAX('hello','goodbye')
  5428.      hello
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.      MAX(                        SRI  VPI  VPIN                        MAX(
  5462.  
  5463.      SR-Info/VP-Info Reference Manual           Page 82           SECTION 3
  5464.  
  5465.  
  5466.  
  5467.                                      MENU(
  5468.  
  5469.      Lightbar menu function; allows point-and-shoot selection from an on-
  5470.      screen menu.
  5471.  
  5472.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5473.      โ•‘ MENU(<choices>,<width>)                                            โ•‘
  5474.      โ•‘                                                                    โ•‘
  5475.      โ•‘ <choices>    the number of choices offered by the menu             โ•‘
  5476.      โ•‘ <width>      the width of the menu lightbar                        โ•‘
  5477.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  5478.      โ•‘ Type: numeric   โ”‚                                                  โ•‘
  5479.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5480.  
  5481.           The MENU( function pauses program execution and superimposes a
  5482.      movable lightbar (reverse-video line) over a menu of selections
  5483.      previously written to the screen, usually with TEXT.
  5484.  
  5485.           The menu lightbar is moved up and down with the <Up> and <Dn>
  5486.      keys.  If you press <Dn> while on the bottom, the lightbar cycles
  5487.      automatically to the top.  Similarly, pressing <Up> while on the top
  5488.      cycles to the bottom.
  5489.  
  5490.           The user can select any item by moving the lightbar over it and
  5491.      pressing <ENTER>, or entering its line number as a one-digit number.
  5492.      In either case, the line number selected is returned by the function,
  5493.      and the key pressed stored in the system variable :KEY.  Both the
  5494.      function value and :KEY can be tested in a subsequent DO CASE
  5495.      structure to determine the program's next actions.
  5496.  
  5497.           If the user presses 0 or <Home>, MENU( returns zero, although the
  5498.      first line covered by the lightbar is 1.  Options over 9 can be
  5499.      accessed only by the lightbar.
  5500.  
  5501.           If any cursor key except <Up>, <Dn> and <Home> is pressed, MENU(
  5502.      returns the number of the line highlighted by the lightbar, and :KEY
  5503.      contains the key number that would be returned by the INKEY( function.
  5504.      (If SET FUNCTION OFF, all function keys have the same effect as these
  5505.      cursor keys.)
  5506.  
  5507.           While the MENU( function is active, all other typewriter keys are
  5508.      ignored.
  5509.  
  5510.           Examples:
  5511.  
  5512.           1. This is a program which shows specifically the values returned
  5513.      by Menu( when any key is pressed:
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.      MENU(                       SRI  VPI  VPIN                       MENU(
  5522.  
  5523.      SR-Info/VP-Info Reference Manual           Page 83           SECTION 3
  5524.  
  5525.  
  5526.      CLS
  5527.      @ 19,46 say 'Returns'
  5528.      @ 19,64 say ':KEY'
  5529.      DO WHILE t
  5530.         CURSOR 5,20
  5531.         var=MENU(10,20)
  5532.         @ 20,50 say var
  5533.         @ 20,65 say :KEY
  5534.      ENDDO
  5535.  
  5536.           2. In a real-life program:
  5537.  
  5538.      ERASE
  5539.      WINDOW 1,2,23,77 double            ;draw frame around screen
  5540.      @ 1,3 say DATE(full)
  5541.      @ 3,3 say CEN(:company,74)
  5542.      @ 5,3 say CEN('Payroll Menu',74)
  5543.      WINDOW 8,25,22,75 blank            ;use WINDOW to position TEXT
  5544.      TEXT paymenu                       ;menu text in external file
  5545.      WINDOW
  5546.      CURSOR 10,23
  5547.      ans=MENU(8,35)
  5548.      IF ans=0 .or. :key=335
  5549.         CHAIN MENU
  5550.      ENDIF
  5551.      @ ans+9,23 say CHR(16)             ; character as pointer
  5552.      DO CASE
  5553.      CASE ans=1
  5554.         ... etc.
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.      MENU(                       SRI  VPI  VPIN                       MENU(
  5582.  
  5583.      SR-Info/VP-Info Reference Manual           Page 84           SECTION 3
  5584.  
  5585.  
  5586.  
  5587.                                       MIN(
  5588.  
  5589.      Compare two expressions of any type and return the smaller.
  5590.  
  5591.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5592.      โ•‘ MIN(<exp1>,<exp2>)                                                 โ•‘
  5593.      โ•‘                                                                    โ•‘
  5594.      โ•‘ <exp1>    any expression                                           โ•‘
  5595.      โ•‘ <exp2>    any expression of the same type as <exp1>                โ•‘
  5596.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                  โ•‘
  5597.      โ•‘ Type: character/numeric/logical โ”‚                                  โ•‘
  5598.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5599.  
  5600.           Given any two expressions of the same type, MIN( returns the
  5601.      lower value.  It must be remembered that string comparisons are based
  5602.      on the ASCII value of the characters in the two strings.  Comparing
  5603.      two logical expressions has no meaning.
  5604.  
  5605.           Examples:
  5606.  
  5607.      1>? MIN('Hello','Goodbye')
  5608.      Goodbye
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.  
  5628.  
  5629.  
  5630.  
  5631.  
  5632.  
  5633.  
  5634.  
  5635.  
  5636.  
  5637.  
  5638.  
  5639.  
  5640.  
  5641.      MIN(                        SRI  VPI  VPIN                        MIN(
  5642.  
  5643.      SR-Info/VP-Info Reference Manual           Page 85           SECTION 3
  5644.  
  5645.  
  5646.  
  5647.                                     MONTHS(
  5648.  
  5649.      Computes date differences in months.
  5650.  
  5651.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5652.      โ•‘ MONTHS(<date1>,<date2>/<num exp>)                                  โ•‘
  5653.      โ•‘                                                                    โ•‘
  5654.      โ•‘ <date1>      a string expression containing a valid date           โ•‘
  5655.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  5656.      โ•‘ Options:                                                           โ•‘
  5657.      โ•‘                                                                    โ•‘
  5658.      โ•‘ <date2>      a string expression containing a valid date; when     โ•‘
  5659.      โ•‘                <date2> is specified, MONTHS( returns number of     โ•‘
  5660.      โ•‘                months between the two dates                        โ•‘
  5661.      โ•‘ <num exp>    number of months before or after date1; when          โ•‘
  5662.      โ•‘                specified, MONTHS( returns date that many months    โ•‘
  5663.      โ•‘                away                                                โ•‘
  5664.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                         โ•‘
  5665.      โ•‘ Type: character/numeric  โ”‚                                         โ•‘
  5666.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5667.  
  5668.           MONTHS( computes the difference between the two dates in months,
  5669.      or computes a date a given number of months before or after a
  5670.      specified date.  Fractional parts of months are discarded.
  5671.  
  5672.           If a computed date is after the last date of the month, the date
  5673.      will be adjusted to the last day of the month.  For example,
  5674.      MONTHS('013190',1) results in 022890.
  5675.  
  5676.           Examples:
  5677.  
  5678.      1>? MONTHS('04 06 90','04 29 90')
  5679.            0.00
  5680.      1>? MONTHS('01/01/90','02/01/90')
  5681.            1.00
  5682.      1>? MONTHS('02/01/90','01/01/90')
  5683.           -1.00
  5684.      1>? MONTHS('01/01/90','01/01/92')
  5685.           24.00
  5686.      1>? MONTHS('02/01/90',10)
  5687.      120190
  5688.      1>? MONTHS('01/01/90',-6)
  5689.      070189
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.      MONTHS(                     SRI  VPI  VPIN                     MONTHS(
  5702.  
  5703.      SR-Info/VP-Info Reference Manual           Page 86           SECTION 3
  5704.  
  5705.  
  5706.  
  5707.                                       NDX(
  5708.  
  5709.      Get information on index files in use.
  5710.  
  5711.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5712.      โ•‘ NDX(<type>,<indexnum> [,<filenum>])                                โ•‘
  5713.      โ•‘                                  VP-Info Professional only         โ•‘
  5714.      โ•‘ <type>       the name or number of the information required        โ•‘
  5715.      โ•‘ <indexnum>   the number of the index being checked (1 to 7)        โ•‘
  5716.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  5717.      โ•‘ Option:                                                            โ•‘
  5718.      โ•‘                                                                    โ•‘
  5719.      โ•‘ <filenum>    the number of the data file to be checked             โ•‘
  5720.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                          โ•‘
  5721.      โ•‘ Type: character/logical โ”‚                                          โ•‘
  5722.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5723.  
  5724.           NDX( is used to primarily in programs to get the information on
  5725.      the current environment in a form suitable for use in expressions.
  5726.  
  5727.           The <type> can be given in either of two forms, a name or number
  5728.      (numeric expression) as follows:
  5729.  
  5730.           Type           Explanation                         Result     
  5731.  
  5732.           1 or Name      name of index file                   string
  5733.           2 or Key       key on which index was created       string
  5734.           3 or DBF_Name  name of data file on which index
  5735.                            was created                        string
  5736.           4 or Filter    TRUE if filter or FOR clause was
  5737.                           in effect when index was created    logical
  5738.  
  5739.           Shortcut: When specifying type by name, only the first character
  5740.           is required.
  5741.  
  5742.  
  5743.           Examples:
  5744.  
  5745.      1>? NDX(n),NDX(key),NDX(dbf),NDX(filter)
  5746.      CUST1.NDX CUSTNUM  CUSTOMER.DBF F
  5747.  
  5748.  
  5749.  
  5750.  
  5751.  
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.  
  5761.      NDX(                           VPI  VPIN                          NDX(
  5762.  
  5763.      SR-Info/VP-Info Reference Manual           Page 87           SECTION 3
  5764.  
  5765.  
  5766.  
  5767.                                     NUMTOC(
  5768.  
  5769.      Convert a decimal number to a hexadecimal string.
  5770.  
  5771.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5772.      โ•‘ NUMTOC(<type>,<number>)                                            โ•‘
  5773.      โ•‘                                  VP-Info Professional only         โ•‘
  5774.      โ•‘ <type>      the length of the string to be created                 โ•‘
  5775.      โ•‘ <number>    the number to be converted                             โ•‘
  5776.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  5777.      โ•‘ Type: character โ”‚                                                  โ•‘
  5778.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5779.  
  5780.           A general conversion function for converting decimal numbers into
  5781.      hexadecimal values.  Input can be any number, and the returned string
  5782.      length can be up to eight characters as follows:
  5783.  
  5784.           The <type> can be given in either of two forms, a name or number
  5785.      (numeric expression) as follows:
  5786.  
  5787.            Type      Range of Number            String Length Returned
  5788.  
  5789.              1      integer 0 to 255            1 byte
  5790.              2      integer -32768 to 32767     2 bytes
  5791.              4      integer +/- 2 billion       4 bytes
  5792.              8      a floating point number     8 bytes
  5793.  
  5794.           Shortcut: When specifying type by name, only the first character
  5795.           is required.
  5796.  
  5797.           Types 1, 2 and 4 return hexadecimal integers.  Any fractional
  5798.      parts are ignored.
  5799.  
  5800.           When <type> is 1, this function is equivalent to CHR(.  Values
  5801.      outside the range of 0 to 155 return the modulus of 256 for type 1.
  5802.  
  5803.           The CTONUM(, RANK( and ASC( functions convert strings into
  5804.      numbers.
  5805.  
  5806.           Do not confuse these function with STR( and VAL(, which convert
  5807.      decimal numbers into their string representations, and vice versa.
  5808.  
  5809.           Examples:
  5810.  
  5811.      1>? NUMTOC(1,97)
  5812.      a
  5813.      1>? NUMTOC(2,25185)
  5814.      ab
  5815.      1>? NUMTOC(4,6513249)
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.      NUMTOC(                        VPI  VPIN                       NUMTOC(
  5822.  
  5823.      SR-Info/VP-Info Reference Manual           Page 88           SECTION 3
  5824.  
  5825.  
  5826.      abc
  5827.  
  5828.  
  5829.           Note to users of VP-Info Version 1:
  5830.  
  5831.            Though not in the original Version 1 documentation, a function
  5832.      called CONVERT( was added and documented in a disk file supplied to
  5833.      later purchasers.  This function was broken into two separate
  5834.      functions, CTONUM( and NUMTOC(, in the current version.  Existing
  5835.      programs that use CONVERT( will have to be modified to work as
  5836.      expected under the current versions.
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.      NUMTOC(                        VPI  VPIN                       NUMTOC(
  5882.  
  5883.      SR-Info/VP-Info Reference Manual           Page 89           SECTION 3
  5884.  
  5885.  
  5886.  
  5887.                                       OUT(
  5888.  
  5889.      Outputs a single character to a sequential file.
  5890.  
  5891.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5892.      โ•‘ OUT(<str var> [,<filenum>])                                        โ•‘
  5893.      โ•‘                                                                    โ•‘
  5894.      โ•‘ <str var>      contains the character                              โ•‘
  5895.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  5896.      โ•‘ Option:                                                            โ•‘
  5897.      โ•‘                                                                    โ•‘
  5898.      โ•‘ (filenum>      the DOS file number (between 1 and 4)               โ•‘
  5899.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  5900.      โ•‘ Type: logical โ”‚                                                    โ•‘
  5901.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5902.  
  5903.           This function outputs the character in <str var> to the
  5904.      sequential file (opened with the WOPEN( function).
  5905.  
  5906.           If filenum is not given, filenum=1 is assumed.  OUT( returns T if
  5907.      successful, F otherwise.
  5908.  
  5909.           This function is especially useful to communicate over the
  5910.      standard COM1, COM2 devices, for conversion of Word Star or other non-
  5911.      standard files to standard ASCII files, to encrypt/decrypt a file
  5912.      through a translation table.
  5913.  
  5914.           See the functions IN(, ROPEN(, WOPEN(, CLOSE(, SEEK(, SSEEK(,
  5915.      READ(, and WRITE(.
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.      OUT(                        SRI  VPI  VPIN                        OUT(
  5942.  
  5943.      SR-Info/VP-Info Reference Manual           Page 90           SECTION 3
  5944.  
  5945.  
  5946.  
  5947.                                       PIC(
  5948.  
  5949.      Formats a number or string.
  5950.  
  5951.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  5952.      โ•‘ PIC(<exp>,<format>)                                                โ•‘
  5953.      โ•‘                                                                    โ•‘
  5954.      โ•‘ <exp>                 is the number or string to be formatted      โ•‘
  5955.      โ•‘ <format>              the format clause                            โ•‘
  5956.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  5957.      โ•‘ Type: character โ”‚                                                  โ•‘
  5958.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  5959.  
  5960.           This function returns the <exp> formatted with the format clause
  5961.      <format>.  See the command @ for the description of the format
  5962.      clauses.  PIC( is especially useful in preparing numeric values for
  5963.      printing.
  5964.  
  5965.           PIC( always returns a string, even when a number or numeric
  5966.      expression is being formatted.
  5967.  
  5968.           Examples:
  5969.  
  5970.      1>number=1123.89
  5971.      1>format='9,999.99'
  5972.      1>? PIC(number,format)
  5973.      1,123.89
  5974.      1>format='9999'
  5975.      1>? PIC(number,format)
  5976.      1123
  5977.      1>format='$$$,$$$.99'
  5978.      1>? PIC(number,format)
  5979.       $1,123.89
  5980.      1>format='$$$,$$$.999'
  5981.      1>? PIC(number,format)
  5982.       $1,123.89
  5983.      1>string='abcd'
  5984.      1>format='xX9!'
  5985.      1>? PIC(string,format)
  5986.      abcd
  5987.      1>format='X-X-X-X'
  5988.      1>? PIC(string,format)
  5989.      a-b-c-d
  5990.      1>SET ZERO ON
  5991.      1> ? 0,'|',str(0,5,2),'|',pic(0,'99.99'),'|','0'
  5992.            0.00 |  0.00 |  0.00 | 0
  5993.      1>SET ZERO OFF
  5994.      1> ? 0,'|',str(0,5,2),'|',pic(0,'99.99'),'|','0'
  5995.                 |  0.00 |       | 0
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.      PIC(                        SRI  VPI  VPIN                        PIC(
  6002.  
  6003.      SR-Info/VP-Info Reference Manual           Page 91           SECTION 3
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.  
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.      PIC(                        SRI  VPI  VPIN                        PIC(
  6062.  
  6063.      SR-Info/VP-Info Reference Manual           Page 92           SECTION 3
  6064.  
  6065.  
  6066.  
  6067.                                     PRINTER(
  6068.  
  6069.      Test whether a printer is ready to print.
  6070.  
  6071.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6072.      โ•‘ PRINTER([<printernum>])                                            โ•‘
  6073.      โ•‘                                                                    โ•‘
  6074.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6075.      โ•‘ Option:                                                            โ•‘
  6076.      โ•‘                                                                    โ•‘
  6077.      โ•‘ <printernum>  the number of the LPT port (1 or 2)                  โ•‘
  6078.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  6079.      โ•‘ Type: logical   โ”‚                                                  โ•‘
  6080.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6081.  
  6082.           Whenever a program has to print, it needs a printer turned on and
  6083.      on-line.  When it is unsuccessful in printing, SR-Info/VP-Info
  6084.      intercepts the customary DOS error (the infamous "Abort, Retry,
  6085.      Ignore?") and ends execution.
  6086.  
  6087.           The PRINTER( function gives programmers a way to ensure the
  6088.      printer is correctly set up before sending output to the screen.  This
  6089.      makes it possible to suspend execution under program control, prompt
  6090.      for correction action, or even SPOOL the output to a disk file instead
  6091.      of the printer.
  6092.  
  6093.           Examples in programs:
  6094.  
  6095.      DO WHILE .NOT. PRINTER()
  6096.         WINDOW 10,10,15,69 DOUBLE
  6097.         @ 12,10 SAY CEN('Turn on printer and press any key . . .',60)
  6098.         RING
  6099.         CURSOR 13,39
  6100.         cc=INKEY()
  6101.         WINDOW
  6102.      ENDDO
  6103.  
  6104.      IF .NOT. PRINTER(2)                 ;test LPT2
  6105.         SPOOL printfil
  6106.      ENDIF
  6107.  
  6108.      IF PRINTER()
  6109.         SET PRINT ON
  6110.      ENDIF
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.      PRINTER(                    SRI  VPI  VPIN                    PRINTER(
  6122.  
  6123.      SR-Info/VP-Info Reference Manual           Page 93           SECTION 3
  6124.  
  6125.  
  6126.  
  6127.                                       PUT(
  6128.  
  6129.      Puts a string into a DOS file.
  6130.  
  6131.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6132.      โ•‘ PUT(<str exp>[,filenum])                                           โ•‘
  6133.      โ•‘                                                                    โ•‘
  6134.      โ•‘ <str exp>         the string to overwrite with                     โ•‘
  6135.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6136.      โ•‘ Option:                                                            โ•‘
  6137.      โ•‘                                                                    โ•‘
  6138.      โ•‘ <filenum>         the DOS file number (between 1 and 4)            โ•‘
  6139.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6140.      โ•‘ Type: logical โ”‚                                                    โ•‘
  6141.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6142.  
  6143.           A DOS file was opened with the WOPEN( function; the character
  6144.      number pointer was normally positioned with the SEEK( function.  This
  6145.      function overwrites the file from the character chosen by the
  6146.      character number pointer with the string <str exp>.
  6147.  
  6148.           If filenum is not given, filenum=1 is assumed.  PUT( returns T if
  6149.      successful, F otherwise.
  6150.  
  6151.           See also the functions ROPEN(, WOPEN(, CLOSE(, SEEK(, and GET(.
  6152.  
  6153.           Examples:
  6154.  
  6155.      1>byte=CHR(13)
  6156.      1>ok=WOPEN('test',3)
  6157.      1>ok=SEEK(5221)
  6158.      1>ok=PUT(byte,3)
  6159.  
  6160.  
  6161.  
  6162.  
  6163.  
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.      PUT(                        SRI  VPI  VPIN                        PUT(
  6182.  
  6183.      SR-Info/VP-Info Reference Manual           Page 94           SECTION 3
  6184.  
  6185.  
  6186.  
  6187.                                      RAND(
  6188.  
  6189.      Gives a random number in the range 0<=n<1.
  6190.  
  6191.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6192.      โ•‘ RAND([<seed>])                                                     โ•‘
  6193.      โ•‘                                  VP-Info Professional only         โ•‘
  6194.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6195.      โ•‘ Option:                                                            โ•‘
  6196.      โ•‘                                                                    โ•‘
  6197.      โ•‘ <seed>    a number used to initiate the random series              โ•‘
  6198.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  6199.      โ•‘ Type: numeric   โ”‚                                                  โ•‘
  6200.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6201.  
  6202.           A series of successive calls to the RAND( function will return a
  6203.      uniform distribution of random numbers.
  6204.  
  6205.           The first time RAND( is called, <seed> -- any numeric expression
  6206.      -- may be specified. All subsequent calls should be without the seed.
  6207.      If no initial seed is provided, a random seed is chosen by the
  6208.      program.
  6209.  
  6210.           RAND( always returns a number equal to or greater than 0 and less
  6211.      than 1.  If you need a random series of integers between zero and
  6212.      5000, use 5000*RAND().
  6213.  
  6214.           Note: if you provide the initial seed, every execution of RAND()
  6215.      will return the same series of numbers.
  6216.  
  6217.  
  6218.  
  6219.  
  6220.  
  6221.  
  6222.  
  6223.  
  6224.  
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.      RAND(                          VPI  VPIN                         RAND(
  6242.  
  6243.      SR-Info/VP-Info Reference Manual           Page 95           SECTION 3
  6244.  
  6245.  
  6246.  
  6247.                                      RANK(
  6248.  
  6249.      Converts a character to its ASCII number.
  6250.  
  6251.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6252.      โ•‘ RANK(<str exp>)                                                    โ•‘
  6253.      โ•‘                                                                    โ•‘
  6254.      โ•‘ <str exp>      the first character of this string is converted     โ•‘
  6255.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6256.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  6257.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6258.  
  6259.           The characters in the character set used by the computer are
  6260.      numbered from 0 to 255.  For the first character of the string
  6261.      <str exp>, RANK( returns the corresponding number.  See also the
  6262.      function CHR(.  See also the functions CHR(, CTONUM(, and NUMTOC(.
  6263.  
  6264.           Examples:
  6265.  
  6266.      1>? RANK('x')
  6267.         120.00
  6268.      1>? RANK('xyz')
  6269.         120.00
  6270.  
  6271.           Note that only the first character of the string matters.
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.  
  6282.  
  6283.  
  6284.  
  6285.  
  6286.  
  6287.  
  6288.  
  6289.  
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.      RANK(                       SRI  VPI  VPIN                       RANK(
  6302.  
  6303.      SR-Info/VP-Info Reference Manual           Page 96           SECTION 3
  6304.  
  6305.  
  6306.  
  6307.                                      READ(
  6308.  
  6309.      Reads a line of a sequential file.
  6310.  
  6311.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6312.      โ•‘ READ(<str var>[,<filenum>])                                        โ•‘
  6313.      โ•‘                                                                    โ•‘
  6314.      โ•‘ <str var>      stores the line read in                             โ•‘
  6315.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6316.      โ•‘ Option:                                                            โ•‘
  6317.      โ•‘                                                                    โ•‘
  6318.      โ•‘ <filenum>      the DOS file number (between 1 and 4)               โ•‘
  6319.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6320.      โ•‘ Type: logical โ”‚                                                    โ•‘
  6321.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6322.  
  6323.           This function reads the next line of the sequential file (opened
  6324.      with the ROPEN( function) into the string variable <str var>.  If
  6325.      <str var> does not exist, it will be created;  <str var> cannot be a
  6326.      matrix variable.
  6327.  
  6328.           A line is terminated by the carriage return character (ASCII 13).
  6329.      Since the line is read into a string variable, it cannot be longer
  6330.      than 254 characters.
  6331.  
  6332.           If filenum is not given, filenum=1 is assumed.  READ( returns T
  6333.      if successful, F otherwise.
  6334.  
  6335.           In SR-Info/VP-Info programs, READ( normally appears in an IF or
  6336.      DO WHILE command.
  6337.  
  6338.           READ(, IN(, GET(, and WRAP( are the only functions that change
  6339.      the contents of the memory variable used as an argument.
  6340.  
  6341.           See Programming SR-Info/VP-Info for sequential file handling and
  6342.      examples, and++ the functions WRITE(, ROPEN(, WOPEN(, CLOSE(, IN(,
  6343.      OUT(, and SSEEK(.
  6344.  
  6345.           Examples:
  6346.  
  6347.           1. In Conversational SR-Info/VP-Info:
  6348.  
  6349.      1>ok=ROPEN('a:label.prg')
  6350.      1>ok=READ(line)
  6351.      1>? line
  6352.  
  6353.           2. Two programs to print a text file, TEST (in the second version
  6354.      it is assumed that TEST has no more than 20 lines):
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.      READ(                       SRI  VPI  VPIN                       READ(
  6362.  
  6363.      SR-Info/VP-Info Reference Manual           Page 97           SECTION 3
  6364.  
  6365.  
  6366.      SET WIDTH TO 80
  6367.      SET PRINT ON
  6368.      IF ROPEN('test')
  6369.         DO WHILE READ(line)
  6370.            ? line
  6371.         ENDDO
  6372.         ok=CLOSE()
  6373.      ENDIF
  6374.  
  6375.      DIM CHAR 80 matrix[20]
  6376.      SET WIDTH TO 80
  6377.      SET PRINT ON
  6378.      IF ROPEN('test',1)
  6379.         REPEAT 20 times VARYING num
  6380.            IF READ(input,1)
  6381.               matrix[num]=input,
  6382.            ELSE
  6383.               BREAK
  6384.            ENDIF
  6385.         ENDREPEAT
  6386.         IF CLOSE(1)
  6387.            ? matrix
  6388.         ENDIF
  6389.      ENDIF
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.      READ(                       SRI  VPI  VPIN                       READ(
  6422.  
  6423.      SR-Info/VP-Info Reference Manual           Page 98           SECTION 3
  6424.  
  6425.  
  6426.  
  6427.                                      RECNO(
  6428.  
  6429.      Gets the current record number in any open data file.
  6430.  
  6431.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6432.      โ•‘ RECNO([<filenum>])                                                 โ•‘
  6433.      โ•‘                                                                    โ•‘
  6434.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6435.      โ•‘ Option:                                                            โ•‘
  6436.      โ•‘                                                                    โ•‘
  6437.      โ•‘ <filenum>    the number of any open data file; default is the      โ•‘
  6438.      โ•‘                selected data file                                  โ•‘
  6439.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6440.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  6441.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6442.  
  6443.           This function returns the record number of the current record of
  6444.      any specified data file; if no <filenum> is given, returns the record
  6445.      number the selected file.  Note that ? RECNO() displays the current
  6446.      record number in the form specified by the system variable :PICTURE
  6447.      (see Section 2.7).
  6448.  
  6449.           SR-Info/VP-Info also has a more limited form of this function,
  6450.      RECNO(, which applies only to the selected data file.
  6451.  
  6452.           Examples:
  6453.  
  6454.      1>USE employee
  6455.      1>USE#2 customer
  6456.      1>? RECNO(1)
  6457.           1.00
  6458.      1>GO BOTTOM
  6459.      1>? RECNO(1)
  6460.           6.00
  6461.      1>GO TOP
  6462.      1>? RECNO()
  6463.           1.00
  6464.      1>SKIP#2 2
  6465.      1>? RECNO(2)
  6466.           3.00
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.      RECNO(                      SRI  VPI  VPIN                      RECNO(
  6482.  
  6483.      SR-Info/VP-Info Reference Manual           Page 99           SECTION 3
  6484.  
  6485.  
  6486.  
  6487.                                     REMLIB(
  6488.  
  6489.      Removes a library entry.
  6490.  
  6491.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6492.      โ•‘ REMLIB(<volume>)                                                   โ•‘
  6493.      โ•‘                                                                    โ•‘
  6494.      โ•‘ <volume>        the number of the library entry to be removed.     โ•‘
  6495.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  6496.      โ•‘ Type: logical   โ”‚                                                  โ•‘
  6497.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6498.  
  6499.           This function deletes a library entry.  The function accepts the
  6500.      library volume number you wish to delete as its argument and returns T
  6501.      (true) if the delete operation was successful, F (false) if not.
  6502.  
  6503.           Once a library entry (volume) is deleted, its space in the
  6504.      library is made available for new text.
  6505.  
  6506.           Libraries are created with the SET LIBRARY TO command. See TEXT
  6507.      and WRITE commands.
  6508.  
  6509.           Example:
  6510.  
  6511.      1>? REMLIB(50)
  6512.      T
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.      REMLIB(                     SRI  VPI  VPIN                     REMLIB(
  6542.  
  6543.      SR-Info/VP-Info Reference Manual           Page 100          SECTION 3
  6544.  
  6545.  
  6546.  
  6547.                                     REPLACE(
  6548.  
  6549.      Replaces, in a string expression, all occurrences of a string with
  6550.      another string.
  6551.  
  6552.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6553.      โ•‘ REPLACE(<str exp>,<str exp1>,<str exp2>)                           โ•‘
  6554.      โ•‘                                                                    โ•‘
  6555.      โ•‘ <str exp>      replace in this string expression                   โ•‘
  6556.      โ•‘ <str exp1>     all occurrences of this string                      โ•‘
  6557.      โ•‘ <str exp2>     with this string                                    โ•‘
  6558.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  6559.      โ•‘ Type: character โ”‚                                                  โ•‘
  6560.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6561.  
  6562.           This function looks up the first occurrence of <str exp1> in the
  6563.      string <str exp>.  This occurrence is replaced with <str exp2>.  This
  6564.      process continues as long as <str exp1> occurs in <str exp>.
  6565.  
  6566.           Examples:
  6567.  
  6568.           1. A field contains a number as right justified characters,
  6569.      padded on the left with blanks.  The following REPLACE( changes these
  6570.      numbers to right justified numbers padded on the left with zeros.
  6571.  
  6572.      1>number='     123'
  6573.      1>number=REPLACE(number,' ','0')
  6574.      1>? number
  6575.      00000123
  6576.  
  6577.           2. In writing checks, dollar amounts may be left padded with
  6578.      dollar signs:
  6579.  
  6580.      1>number='     123.11'
  6581.      1>number=REPLACE(number,' ','$')
  6582.      1>? number
  6583.      $$$$$123.11
  6584.  
  6585.           3. Renaming a variable in a program line.  The variable OLDN is
  6586.      renamed FIRSTNUMB.
  6587.  
  6588.      1>line='newn=oldn+oldn+(oldn/3)'
  6589.      1>line=REPLACE(line,'oldn','firstnumb')
  6590.      1>? line
  6591.      newn=firstnumb+firstnumb+(firstnumb/3)
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.      REPLACE(                    SRI  VPI  VPIN                    REPLACE(
  6602.  
  6603.      SR-Info/VP-Info Reference Manual           Page 101          SECTION 3
  6604.  
  6605.  
  6606.  
  6607.                                      RESET(
  6608.  
  6609.      Sets a bit in a string to 0.
  6610.  
  6611.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6612.      โ•‘ RESET(<str exp>,<bit position>)                                    โ•‘
  6613.      โ•‘                                                                    โ•‘
  6614.      โ•‘ <str exp>       the string or string expression on which the       โ•‘
  6615.      โ•‘                   function is to act                               โ•‘
  6616.      โ•‘ <bit position>  the number of the bit, numbered from the left      โ•‘
  6617.      โ•‘                   starting at 1, which is to be set to zero        โ•‘
  6618.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6619.      โ•‘ Type: logical โ”‚                                                    โ•‘
  6620.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6621.  
  6622.           A bit is any of the eight binary digits in a character's ASCII
  6623.      number representation.  Each bit can have only one of two possible
  6624.      values, 0 and 1.
  6625.  
  6626.           The SET( and RESET( functions are used to manipulate the bits
  6627.      within a string or string expression.  SET( makes a bit 1, and RESET(
  6628.      makes a bit 0.  The BIT( function tests the value of a specific bit.
  6629.  
  6630.           Among the chief uses for these functions is compression of
  6631.      logical (true/false) data by using just one bit for each data item
  6632.      instead of an entire byte for a logical field or two bytes for a
  6633.      logical variable.
  6634.  
  6635.           See the BIT( function for programming examples.
  6636.  
  6637.           Examples:
  6638.  
  6639.      1>str='PS'
  6640.      1>? BIT(str,15)
  6641.      T
  6642.      1>str=RESET(str,15)
  6643.      1>? str,BIT(str,15)
  6644.      PQ F
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.      RESET(                      SRI  VPI  VPIN                      RESET(
  6662.  
  6663.      SR-Info/VP-Info Reference Manual           Page 102          SECTION 3
  6664.  
  6665.  
  6666.  
  6667.                                      RIGHT(
  6668.  
  6669.      Gets the right-hand part of a string.
  6670.  
  6671.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6672.      โ•‘ RIGHT(<str exp>, <num exp>)                                        โ•‘
  6673.      โ•‘                                                                    โ•‘
  6674.      โ•‘ <str exp>   the string from which the new string is formed         โ•‘
  6675.      โ•‘ <num exp>   the number of characters to place in the new string    โ•‘
  6676.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                  โ•‘
  6677.      โ•‘ Type: character โ”‚                                                  โ•‘
  6678.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6679.  
  6680.           This function returns the last (that is, the rightmost) <num exp>
  6681.      characters from the string <str exp>.
  6682.  
  6683.           If <num exp> is greater than the width of <str exp>, this
  6684.      function returns all of <str exp>.
  6685.  
  6686.           Example:
  6687.  
  6688.      1>a='David Bark'
  6689.      1>? RIGHT(a,5)
  6690.       Bark
  6691.      1>? RIGHT(a,50)
  6692.      David Bark
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.      RIGHT(                      SRI  VPI  VPIN                      RIGHT(
  6722.  
  6723.      SR-Info/VP-Info Reference Manual           Page 103          SECTION 3
  6724.  
  6725.  
  6726.  
  6727.                                      ROPEN(
  6728.  
  6729.      Opens a DOS file for reading.
  6730.  
  6731.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6732.      โ•‘ ROPEN(<str exp> [,filenum])                                        โ•‘
  6733.      โ•‘                                                                    โ•‘
  6734.      โ•‘ <str exp>      the file name                                       โ•‘
  6735.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6736.      โ•‘ Option:                                                            โ•‘
  6737.      โ•‘                                                                    โ•‘
  6738.      โ•‘ filenum        the DOS file number (between 1 and 4)               โ•‘
  6739.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6740.      โ•‘ Type: logical โ”‚                                                    โ•‘
  6741.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6742.  
  6743.           This function opens <str exp>, a DOS file (in particular, a
  6744.      sequential file or input device, such as COM1), for reading only.  The
  6745.      current position pointer (see the SEEK( function) is set to the
  6746.      beginning of the file.
  6747.  
  6748.           If filenum is not given, filenum=1 is assumed.  If no file
  6749.      extension is given, the extension TXT is used.
  6750.  
  6751.           ROPEN( returns T if successful, F otherwise.
  6752.  
  6753.           See the functions WOPEN(, CLOSE(, READ(, WRITE(, IN(, OUT(, GET(,
  6754.      PUT(, SEEK(, and SSEEK(.
  6755.  
  6756.           Examples:
  6757.  
  6758.      1>? ROPEN('a:label.prg')
  6759.      T
  6760.  
  6761.           In a SR-Info/VP-Info program, ROPEN( normally appears in an IF
  6762.      command:
  6763.  
  6764.      IF ROPEN('file',2)
  6765.         DO WHILE READ(data,2)
  6766.            ? data
  6767.         ENDDO
  6768.         ok=CLOSE(2)
  6769.      ENDIF
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.      ROPEN(                      SRI  VPI  VPIN                      ROPEN(
  6782.  
  6783.      SR-Info/VP-Info Reference Manual           Page 104          SECTION 3
  6784.  
  6785.  
  6786.  
  6787.                                       ROW(
  6788.  
  6789.      Gets print row position.
  6790.  
  6791.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6792.      โ•‘ ROW()                                                              โ•‘
  6793.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6794.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  6795.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6796.  
  6797.           This function gives the current row (line) position of the
  6798.      cursor; if the printer is on, it returns the column position of the
  6799.      printer head.  See the commands SET PRINT ON and SET FORMAT TO PRINT,
  6800.      and the function COL(.
  6801.  
  6802.           Example:
  6803.  
  6804.      @ ROW()+1,COL()+3 SAY 'Hello'
  6805.  
  6806.      prints 'Hello' starting on the next line three characters to the right
  6807.      of the end of the last printing.
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.      ROW(                        SRI  VPI  VPIN                        ROW(
  6842.  
  6843.      SR-Info/VP-Info Reference Manual           Page 105          SECTION 3
  6844.  
  6845.  
  6846.  
  6847.                                      SEEK(
  6848.  
  6849.      Goes to a given character number in a DOS file.
  6850.  
  6851.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6852.      โ•‘ SEEK(<num exp> [,filenum])                                         โ•‘
  6853.      โ•‘                                                                    โ•‘
  6854.      โ•‘ <num exp>      the character number                                โ•‘
  6855.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  6856.      โ•‘ Option:                                                            โ•‘
  6857.      โ•‘                                                                    โ•‘
  6858.      โ•‘ <filenum>      the DOS file number (between 1 and 4)               โ•‘
  6859.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6860.      โ•‘ Type: logical โ”‚                                                    โ•‘
  6861.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6862.  
  6863.           This function repositions the character number pointer in the DOS
  6864.      file (opened with the ROPEN( or WOPEN( function) to the value given by
  6865.      <num exp>.
  6866.  
  6867.           If filenum is not given, filenum=1 is assumed.  If no file
  6868.      extension is given, the extension TXT is used.
  6869.  
  6870.           If SEEK( is successful, it returns T (true); otherwise F (false).
  6871.      In a SR-Info/VP-Info program, SEEK( normally occurs in an IF or DO
  6872.      WHILE command.
  6873.  
  6874.           Once the character pointer is properly positioned, use the GET(
  6875.      and PUT( functions to manipulate the characters.
  6876.  
  6877.           See the functions SSEEK(, ROPEN(, WOPEN(, CLOSE(, GET(, and PUT(.
  6878.  
  6879.           Example:
  6880.  
  6881.      1>ok=ROPEN('a:label.prg',4)
  6882.      1>ok=SEEK(522,4)
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.      SEEK(                       SRI  VPI  VPIN                       SEEK(
  6902.  
  6903.      SR-Info/VP-Info Reference Manual           Page 106          SECTION 3
  6904.  
  6905.  
  6906.  
  6907.                                       SET(
  6908.  
  6909.      Sets a bit in a string to 1.
  6910.  
  6911.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6912.      โ•‘ SET(<str exp>,<bit position>)                                      โ•‘
  6913.      โ•‘                                                                    โ•‘
  6914.      โ•‘ <str exp>       the string or string expression on which the       โ•‘
  6915.      โ•‘                   function is to act                               โ•‘
  6916.      โ•‘ <bit position>  the number of the bit, numbered from the left      โ•‘
  6917.      โ•‘                   starting at 1, which is to be set to 1           โ•‘
  6918.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6919.      โ•‘ Type: logical โ”‚                                                    โ•‘
  6920.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6921.  
  6922.           A bit is any of the eight binary digits in a character's ASCII
  6923.      number representation.  Each bit can have only one of two possible
  6924.      values, 0 and 1.
  6925.  
  6926.           The SET( and RESET( functions are used to manipulate the bits
  6927.      within a string or string expression.  SET( makes a bit 1, and RESET(
  6928.      makes a bit 0.  The BIT( function tests the value of a specific bit.
  6929.  
  6930.           Among the chief uses for these functions is compression of
  6931.      logical (true/false) data by using just one bit for each data item
  6932.      instead of an entire byte for a logical field or two bytes for a
  6933.      logical variable.
  6934.  
  6935.           See the BIT( function for programming examples.
  6936.  
  6937.           Examples:
  6938.  
  6939.      1>str='PQ'
  6940.      1>? BIT(str,15)
  6941.      F
  6942.      1>str=RESET(str,15)
  6943.      1>? str,BIT(str,15)
  6944.      PS T
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.      SET(                        SRI  VPI  VPIN                        SET(
  6962.  
  6963.      SR-Info/VP-Info Reference Manual           Page 107          SECTION 3
  6964.  
  6965.  
  6966.  
  6967.                                      SPACE(
  6968.  
  6969.      Gets the amount of space left in the data space.
  6970.  
  6971.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  6972.      โ•‘ SPACE()                                                            โ•‘
  6973.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  6974.      โ•‘ Type: numeric โ”‚                                                    โ•‘
  6975.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  6976.  
  6977.           This function returns the available memory in the 64K data space
  6978.      (see Appendix A).
  6979.  
  6980.           Example:
  6981.  
  6982.      1>SPACE()
  6983.       27155.00
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.  
  7021.      SPACE(                      SRI  VPI  VPIN                      SPACE(
  7022.  
  7023.      SR-Info/VP-Info Reference Manual           Page 108          SECTION 3
  7024.  
  7025.  
  7026.  
  7027.                                      SSEEK(
  7028.  
  7029.      Goes to a given line number in a sequential file.
  7030.  
  7031.      โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
  7032.      โ•‘ SSEEK(<num exp> [,<filenum>])                                      โ•‘
  7033.      โ•‘                                                                    โ•‘
  7034.      โ•‘ <num exp>      the line number                                     โ•‘
  7035.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ข
  7036.      โ•‘ Option:                                                            โ•‘
  7037.      โ•‘                                                                    โ•‘
  7038.      โ•‘ <filenum>      the DOS file number (between 1 and 4)               โ•‘
  7039.      โ•Ÿโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                                    โ•‘
  7040.      โ•‘ Type: logical โ”‚                                                    โ•‘
  7041.      โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  7042.  
  7043.           This function repositions the line number pointer in the
  7044.      sequential file (opened with the ROPEN( function) to the value given
  7045.      by <num exp>.
  7046.  
  7047.           If filenum is not given, filenum=1 is assumed.  If no file
  7048.      extension is given, the extension TXT is used.
  7049.  
  7050.           If filenum is not given, filenum=1 is assumed.  If no file
  7051.      extension is given, the extension TXT is used.
  7052.  
  7053.           See the functions SEEK(, ROPEN(, WOPEN(, CLOSE(, READ(,  IN(, and
  7054.      OUT(.
  7055.  
  7056.           Example:
  7057.  
  7058.      1>ok=ROPEN('a:label.prg',4)
  7059.      1>line=''
  7060.      1>ok=SSEEK(5,4)
  7061.      1>? ok
  7062.      T
  7063.      1>ok=READ(line,4)
  7064.      1>? line
  7065.      GOTO top
  7066.      1>ok=SSEEK(900,4)
  7067.      1>? ok
  7068.      F
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079.  
  7080.  
  7081.      SSEEK(                      SRI  VPI  VPIN                      SSEEK(
  7082.  
  7083.