home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / sri314_b.zip / PART2 < prev    next >
Text File  |  1990-05-29  |  204KB  |  7,021 lines

  1.  
  2.      SR-Info/VP-Info Reference Manual           Page 109          SECTION 3
  3.  
  4.  
  5.  
  6.                                       STR(
  7.  
  8.      Converts a number to a string.
  9.  
  10.      ╔════════════════════════════════════════════════════════════════════╗
  11.      ║ STR(<num exp>,<width num exp>[,<decimals num exp>])                ║
  12.      ║                                                                    ║
  13.      ║ <num exp>         the number to be converted                       ║
  14.      ║ <width num exp>   the width of the string                          ║
  15.      ╟────────────────────────────────────────────────────────────────────╢
  16.      ║ Option:                                                            ║
  17.      ║                                                                    ║
  18.      ║ <decimals num exp> the number of decimals                          ║
  19.      ╟─────────────────┐                                                  ║
  20.      ║ Type: character │                                                  ║
  21.      ╚═════════════════╧══════════════════════════════════════════════════╝
  22.  
  23.           This function gets a number by evaluating the <num exp>, and
  24.      converts it into a string of given width.  Optionally, the number of
  25.      decimals can be specified (the default is 0).  See also PIC(.
  26.  
  27.           Examples:
  28.  
  29.      1>x=123.456
  30.      1>? STR(x,8)
  31.           123
  32.      1>? LEN(STR(x,8))
  33.           8.00
  34.      1>? STR(x,10)
  35.             123
  36.      1>? STR(x,10,1)
  37.           123.1
  38.  
  39.           When combined with the VAL( function, STR( is a convenient way of
  40.      rounding decimal numbers with a given precision.  For example:
  41.  
  42.      1>:PICTURE='9999.99999'
  43.      1>a=29.95748
  44.      1>? a
  45.        29.95748
  46.      1>? VAL(STR(a+.005,10,2))
  47.        29.96000
  48.      1>? VAL(STR(a+.00005,10,4))
  49.        29.95750
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.      STR(                        SRI  VPI  VPIN                        STR(
  61.  
  62.      SR-Info/VP-Info Reference Manual           Page 110          SECTION 3
  63.  
  64.  
  65.  
  66.                                     SUBSTR(
  67.  
  68.      Gets a substring of a string.
  69.  
  70.      ╔════════════════════════════════════════════════════════════════════╗
  71.      ║ SUBSTR(<str exp>, <start num exp>, <width num exp>)                ║
  72.      ║                                                                    ║
  73.      ║ <str exp>         the string from which the new string is formed   ║
  74.      ║ <start num exp>   the position from which the new string is        ║
  75.      ║                     taken                                          ║
  76.      ║ <width num exp>   the number of characters to place in the         ║
  77.      ║                     new string                                     ║
  78.      ╟─────────────────┐                                                  ║
  79.      ║ Type: character │                                                  ║
  80.      ╚═════════════════╧══════════════════════════════════════════════════╝
  81.  
  82.           This function, a synonym for the $( function, takes the string in
  83.      <str exp> from position <start num exp> (fractions are thrown away);
  84.      the number of characters taken is <width num exp>.  (In both numeric
  85.      expressions, the fractions are disregarded).
  86.  
  87.           Examples:
  88.  
  89.      1>name='David Barberr'
  90.      1>? SUBSTR(name, 7,3)
  91.      Bar
  92.      1>? SUBSTR(name, 7,12)
  93.      Barberr
  94.      1>? LEN(SUBSTR(name,7,12))
  95.            7.00
  96.  
  97.           Note that SUBSTR(name,7,12) is of width 7, not 12; there are only
  98.      7 letters left in name from position 7.
  99.  
  100.      1>s=3
  101.      1>t=1
  102.      1>? SUBSTR(name+name,(s+t)/2,1.9)
  103.      a
  104.  
  105.           Note that 1.9 was taken as 1.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.      SUBSTR(                     SRI  VPI  VPIN                     SUBSTR(
  121.  
  122.      SR-Info/VP-Info Reference Manual           Page 111          SECTION 3
  123.  
  124.  
  125.  
  126.                                      TEST(
  127.  
  128.      Tests a string whether it is a valid expression.
  129.  
  130.      ╔════════════════════════════════════════════════════════════════════╗
  131.      ║ TEST(<str exp>)                                                    ║
  132.      ║                                                                    ║
  133.      ║ <str exp>            the string to be tested                       ║
  134.      ╟───────────────┐                                                    ║
  135.      ║ Type: logical │                                                    ║
  136.      ╚═══════════════╧════════════════════════════════════════════════════╝
  137.  
  138.           This function tests the string in <str exp> as to whether it is a
  139.      valid expression; in particular, all variables must be defined and
  140.      must be of the proper type.  It returns T if it is, F otherwise.  If
  141.      the test is successful, TYPE( can be used to find the type of the
  142.      expression.
  143.  
  144.           In a SR-Info/VP-Info program, use TEST( to find out whether a
  145.      selection criteria typed in by the user is correct.  Or use it to
  146.      ensure that a variable exists in a subroutine that may be called from
  147.      several programs.
  148.  
  149.           Examples:
  150.  
  151.      1>? TEST('check=0')
  152.      F                                   false because check is not defined
  153.      1>check=0
  154.      1>? TEST('check=0')
  155.      T
  156.      1>? TEST('check=0.or.check=1')
  157.      T
  158.      1>? TEST('check="A".or.check=1')
  159.      F                                   false because "A" is of character
  160.                                          type
  161.      1>? TEST('num')
  162.      F
  163.      1>num=5
  164.      1>? TEST('num')
  165.      T
  166.      1>? TEST('num+')                    false because the second operand
  167.                                          is missing
  168.      F
  169.  
  170.      IF .NOT. TEST('check')
  171.         check=0
  172.      ENDIF
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.      TEST(                       SRI  VPI  VPIN                       TEST(
  181.  
  182.      SR-Info/VP-Info Reference Manual           Page 112          SECTION 3
  183.  
  184.  
  185.  
  186.                                      TIME(
  187.  
  188.      Gets the system time.
  189.  
  190.      ╔════════════════════════════════════════════════════════════════════╗
  191.      ║ TIME([<type>])                                                     ║
  192.      ╟────────────────────────────────────────────────────────────────────╢
  193.      ║ Option:                                                            ║
  194.      ║                                                                    ║
  195.      ║ <type>      one of three types of information requested, as listed ║
  196.      ║               below                                                ║
  197.      ╟─────────────────┐                                                  ║
  198.      ║ Type: character │                                                  ║
  199.      ╚═════════════════╧══════════════════════════════════════════════════╝
  200.  
  201.           This function returns a string containing the current system
  202.      time, and changes the format of the system variable :TIME to this
  203.      format. (See the system variable :TIME in Section 2.  Recall that
  204.      :TIME is initialized when SR-Info/VP-Info starts up, but can be
  205.      reinitialized with a :TIME= command.)
  206.  
  207.           The <type> can be given in either of two forms, a name or number
  208.      (numeric expression) as follows:
  209.  
  210.           Type           Explanation                        Example
  211.  
  212.           1 or HMS       Hours,minutes,seconds,hundredths   17:26:36.07
  213.           2 or AMPM      Hours,minutes with AM/PM            5:36 pm
  214.           3 or Seconds   Seconds since midnight             62804.80
  215.  
  216.           Shortcut: When specifying type by name, only the first character
  217.           is required.
  218.  
  219.           The default parameter is 1, the time in the 24-hour format
  220.      hh:mm:ss.hh.
  221.  
  222.           Examples:
  223.  
  224.      1>? :TIME
  225.      15:45:59
  226.      1>? TIME(2)
  227.       3:46 pm
  228.      1>:TIME
  229.       3:46 pm
  230.  
  231.      start=VAL(TIME(seconds))
  232.      <program lines>
  233.      finish=VAL(TIME(seconds))
  234.      ? 'Program execution took',start-finish,'seconds.'
  235.  
  236.  
  237.  
  238.  
  239.  
  240.      TIME(                       SRI  VPI  VPIN                       TIME(
  241.  
  242.      SR-Info/VP-Info Reference Manual           Page 113          SECTION 3
  243.  
  244.  
  245.  
  246.      This displays how long the running of <program lines> took, in
  247.      seconds.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.      TIME(                       SRI  VPI  VPIN                       TIME(
  301.  
  302.      SR-Info/VP-Info Reference Manual           Page 114          SECTION 3
  303.  
  304.  
  305.  
  306.                                      TRIM(
  307.  
  308.      Trims blanks from the right-hand side of a string.
  309.  
  310.      ╔════════════════════════════════════════════════════════════════════╗
  311.      ║ TRIM(<str exp>)                                                    ║
  312.      ║                                                                    ║
  313.      ║ <str exp>        the string to be trimmed                          ║
  314.      ╟─────────────────┐                                                  ║
  315.      ║ Type: character │                                                  ║
  316.      ╚═════════════════╧══════════════════════════════════════════════════╝
  317.  
  318.           SR-Info/VP-Info stores strings in fields padded on the right with
  319.      blanks.  In actual use, these blanks may get in the way.  TRIM( gets
  320.      rid of the blanks on the right of a string.  TRIM( can be used in the
  321.      key of an index.  See also LTRIM(.
  322.  
  323.           Examples:
  324.  
  325.      1>a='David     '
  326.      1>? a
  327.      David
  328.      1>? LEN(a)
  329.          10.00
  330.      1>? TRIM(a)+' is trimmed'
  331.      David is trimmed
  332.      1>? LEN(TRIM(a))
  333.           5.00
  334.      1>blank='     '
  335.      1>? LEN(TRIM(blank))
  336.           1.00
  337.  
  338.           Note: TRIM(blank) is a single blank.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.      TRIM(                       SRI  VPI  VPIN                       TRIM(
  361.  
  362.      SR-Info/VP-Info Reference Manual           Page 115          SECTION 3
  363.  
  364.  
  365.  
  366.                                      TYPE(
  367.  
  368.      Gets the type of an expression.
  369.  
  370.      ╔════════════════════════════════════════════════════════════════════╗
  371.      ║ TYPE(<exp>)                                                        ║
  372.      ║                                                                    ║
  373.      ║ <exp>            any expression                                    ║
  374.      ╟─────────────────┐                                                  ║
  375.      ║ Type: character │                                                  ║
  376.      ╚═════════════════╧══════════════════════════════════════════════════╝
  377.  
  378.           For an expression, <exp>, this function returns the type of the
  379.      expression as a one character string:
  380.  
  381.      C    for character
  382.      L    for logical
  383.      N    for numeric
  384.      U    Undefined      ;created by GLOBAL or VARIABLES command, but not
  385.                           yet given a value or type
  386.  
  387.           To test whether a string is a valid expression, use the TEST(
  388.      function.
  389.  
  390.           Examples:
  391.  
  392.      1>a='name'
  393.      1>? TYPE(a)
  394.      C
  395.      1>? TYPE(a+a)
  396.      C
  397.      1>n=12
  398.      1>? TYPE(a+n)
  399.      1. Invalid variable type found when executing an expression.
  400.      1>? TYPE(a<a)
  401.      L
  402.      1>? TYPE(a<a.OR.n<5)
  403.      L
  404.      1>TYPE(n+5/10)
  405.      N
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.      TYPE(                       SRI  VPI  VPIN                       TYPE(
  421.  
  422.      SR-Info/VP-Info Reference Manual           Page 116          SECTION 3
  423.  
  424.  
  425.  
  426.                                      UPPER(
  427.  
  428.      Converts a string to upper case.
  429.  
  430.      ╔════════════════════════════════════════════════════════════════════╗
  431.      ║ UPPER(<str exp>)                                                   ║
  432.      ║                                                                    ║
  433.      ║ <str exp>    the text to be converted to upper case                ║
  434.      ╟─────────────────┐                                                  ║
  435.      ║ Type: character │                                                  ║
  436.      ╚═════════════════╧══════════════════════════════════════════════════╝
  437.  
  438.           All lower-case letters in the <str exp> are converted into upper
  439.      case by the UPPER( function, which is a synonym for the !( function.
  440.      See also the LOWER( function.
  441.  
  442.           Examples:
  443.  
  444.      1>a='Aa12b'
  445.      1>? UPPER(a)
  446.      AA12B
  447.      1>? UPPER('David!')
  448.      DAVID!
  449.  
  450.           Note that only the lower-case letters are changed.
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.      UPPER(                      SRI  VPI  VPIN                      UPPER(
  481.  
  482.      SR-Info/VP-Info Reference Manual           Page 117          SECTION 3
  483.  
  484.  
  485.  
  486.                                       VAL(
  487.  
  488.      Converts a string to its numeric value.
  489.  
  490.      ╔════════════════════════════════════════════════════════════════════╗
  491.      ║ VAL(<str exp>)                                                     ║
  492.      ║                                                                    ║
  493.      ║ <str exp>      the string to be evaluated                          ║
  494.      ╟───────────────┐                                                    ║
  495.      ║ Type: numeric │                                                    ║
  496.      ╚═══════════════╧════════════════════════════════════════════════════╝
  497.  
  498.           This function takes the string <str exp> which is a number, and
  499.      returns it as a number.  If the whole string cannot be interpreted as
  500.      a number, it takes as much of the front part as it can.
  501.  
  502.           Examples:
  503.  
  504.      1>a='123.23'
  505.      1>? VAL(a)
  506.         123.23
  507.      1>? VAL(123.23)
  508.      1. Invalid variable type found when executing an expression.
  509.      1>? VAL('a12')
  510.           0.00
  511.      1>? VAL('12a')
  512.          12.00
  513.      1>? VAL(DATE(2))
  514.  
  515.      yields the current month as a number.
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.      VAL(                        SRI  VPI  VPIN                        VAL(
  541.  
  542.      SR-Info/VP-Info Reference Manual           Page 118          SECTION 3
  543.  
  544.  
  545.  
  546.                                      WOPEN(
  547.  
  548.      Opens a DOS file for writing.
  549.  
  550.      ╔════════════════════════════════════════════════════════════════════╗
  551.      ║ WOPEN(<str exp>[,<filenum>])                                       ║
  552.      ║                                                                    ║
  553.      ║ <str exp>      the file name                                       ║
  554.      ╟────────────────────────────────────────────────────────────────────╢
  555.      ║ Option:                                                            ║
  556.      ║                                                                    ║
  557.      ║ <filenum>      the DOS file number (between 1 and 4)               ║
  558.      ╟───────────────┐                                                    ║
  559.      ║ Type: logical │                                                    ║
  560.      ╚═══════════════╧════════════════════════════════════════════════════╝
  561.  
  562.           This function opens the DOS file, and in particular, the
  563.      sequential file <str exp> (or output device, such as COM1:) for
  564.      writing; if the file does not exist, it will be created.  If filenum
  565.      is not given, filenum=1 is assumed.  If no file extension is given,
  566.      the extension TXT is used.  It returns T if successful, F otherwise.
  567.  
  568.           See the functions ROPEN(, CLOSE(, GET(, PUT(, SEEK(, SSEEK(,
  569.      WRITE(, READ(, IN(, OUT(.
  570.  
  571.           Example:
  572.  
  573.      1>ok=WOPEN('a:label.prg')
  574.      1>? ok
  575.      T
  576.  
  577.           In a SR-Info/VP-Info program, WOPEN( normally appears in an IF
  578.      command:
  579.  
  580.           IF WOPEN('file',2)
  581.           2. Two programs to print a text file, TEST (in the second version
  582.      it is assumed that TEST has no more than 20 lines):
  583.  
  584.      SET WIDTH TO 80
  585.      SET PRINT ON
  586.      IF ROPEN('test')
  587.         DO WHILE READ(line)
  588.            ? line
  589.         ENDDO
  590.         ok=CLOSE()
  591.      ENDIF
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.      WOPEN(                      SRI  VPI  VPIN                      WOPEN(
  601.  
  602.      SR-Info/VP-Info Reference Manual           Page 119          SECTION 3
  603.  
  604.  
  605.  
  606.                                      WRAP(
  607.  
  608.      Wraps text for output.
  609.      ╔════════════════════════════════════════════════════════════════════╗
  610.      ║ WRAP(<str var>, <num exp>)                                         ║
  611.      ║                                                                    ║
  612.      ║ <str exp>        the string to be wrapped                          ║
  613.      ║ <num exp>        the line width                                    ║
  614.      ╟─────────────────┐                                                  ║
  615.      ║ Type: character │                                                  ║
  616.      ╚═════════════════╧══════════════════════════════════════════════════╝
  617.  
  618.           This function returns one line of text with word wrapping from
  619.      the string in <str var>; <str var> now contains what is left of the
  620.      string.  In other words, the string returned will contain as many
  621.      words as will fit in a line (the line width is given by <num exp>).
  622.      If the whole contents of <str var> is one line, <str var> becomes the
  623.      blank string (of length 1)
  624.  
  625.           WRAP(, IN(, GET(, and READ( are the only functions that change
  626.      the contents of the memory variable used as an argument.
  627.  
  628.           Examples:
  629.  
  630.      1>text='This text line is going to be wrapped in a printed line of
  631.      width 30.'
  632.      1>? text
  633.      This text line is going to be wrapped in a printed line of width 30.
  634.      1>temp=text
  635.      1>WRAP(temp,30)
  636.      This text line is going to be
  637.      1>? temp
  638.      wrapped in a printed line of width 30.
  639.      1>WRAP(temp,30)
  640.      wrapped in a printed line of
  641.      1>? temp
  642.      width 30.
  643.      1>WRAP(temp,30)
  644.      width 30.
  645.      1>? temp
  646.      1>? LEN(temp)
  647.           1.00
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.      WRAP(                       SRI  VPI  VPIN                       WRAP(
  661.  
  662.      SR-Info/VP-Info Reference Manual           Page 120          SECTION 3
  663.  
  664.  
  665.  
  666.                                      WRITE(
  667.  
  668.      Writes a new line into the sequential file.
  669.  
  670.      ╔════════════════════════════════════════════════════════════════════╗
  671.      ║ WRITE(<str var>[,<filenum>])                                       ║
  672.      ║                                                                    ║
  673.      ║ <str var>      the line to be written                              ║
  674.      ╟────────────────────────────────────────────────────────────────────╢
  675.      ║ Option:                                                            ║
  676.      ║                                                                    ║
  677.      ║ <filenum>      the DOS file number (between 1 and 4)               ║
  678.      ╟───────────────┐                                                    ║
  679.      ║ Type: logical │                                                    ║
  680.      ╚═══════════════╧════════════════════════════════════════════════════╝
  681.  
  682.           This function writes (appends) the contents of the string
  683.      variable <str var> to the end of a sequential file opened with the
  684.      WOPEN( function.
  685.  
  686.           If filenum is not given, filenum=1 is assumed.  WRITE( returns T
  687.      if successful, F otherwise.
  688.  
  689.           See the functions ROPEN(, WOPEN(, READ(, IN(, OUT(, GET(, PUT(,
  690.      and CLOSE(.
  691.  
  692.           Example:
  693.  
  694.      1>ok=WOPEN('customer.frm',2)
  695.      1>ok=WRITE('FIELDS - cust,orderno,amount',2)
  696.      1>ok=CLOSE(2)
  697.  
  698.      creates the CUSTOMER.FRM report form file:
  699.  
  700.      FIELDS - cust,orderno,amount
  701.  
  702.           Now the command REPORT CUSTOMER will run the report.  This
  703.      example illustrates how a program can be written that creates a report
  704.      form file.
  705.  
  706.           In a SR-Info/VP-Info program, WRITE( normally appears in an IF
  707.      command:
  708.  
  709.      IF WRITE('file',2)
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.      WRITE(                      SRI  VPI  VPIN                      WRITE(
  721.  
  722.      SR-Info/VP-Info Reference Manual           Page 121          SECTION 3
  723.  
  724.  
  725.  
  726.                                 3.5. Expressions
  727.  
  728.  
  729.           Expressions can be formed from constants (Section 3.1) and
  730.      variables (Section 2.3) using operations (Section 3.2), relations
  731.      (Section 3.3), and functions (Section 3.4).  There are three types of
  732.      expressions: numeric, string, and logical.
  733.  
  734.           Numeric expressions are built up from numeric constants, numeric
  735.      variables, and from functions that give results of numeric type; they
  736.      are formed with the operations: +, -, *, /, and the parentheses: (
  737.      and ).
  738.  
  739.           String expressions are formed from string constants, string
  740.      variables, and from functions that give results of character type;
  741.      they use the operation + and the parentheses: ( and ).
  742.  
  743.           Logical expressions (also called conditions) are formed from
  744.      logical constants, logical variables, functions that give results of
  745.      logical type, and the results of relations; they use the logical
  746.      operations: .AND., .OR., .NOT., and the parentheses: ( and ).
  747.  
  748.           Examples: (in these examples, str1, str2 are string variables,
  749.      num1, num2 are numeric variables, log1, log2 are logical variables):
  750.  
  751.           String expressions:
  752.  
  753.      str1
  754.      str1+str2
  755.      str1+TRIM(str2)
  756.      str1+STR(num1+num2,10,2)+'Bach'
  757.  
  758.           Numeric expressions:
  759.  
  760.      num1
  761.      num1+5
  762.      (num1+5)/5
  763.      num1+(num2*VAL(str1))
  764.      LEN(str1)+LEN(TRIM(str2))+2
  765.  
  766.           Conditions (logical expressions):
  767.  
  768.      num1 < num2
  769.      num1+num2+LEN(str1) <> 15 .AND. .NOT. EOF
  770.      (str1='Boston') .AND. (num1 <> LEN(str1)).AND.log1.AND.(.NOT.log2)
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.      Expressions                 SRI  VPI  VPIN                 Expressions
  781.  
  782.      SR-Info/VP-Info Reference Manual           Page 122          SECTION 3
  783.  
  784.  
  785.  
  786.                             3.6. Rules of Precedence
  787.  
  788.  
  789.           In an expression such as
  790.  
  791.      2+3*4
  792.  
  793.      SR-Info/VP-Info has to decide whether to perform the + first (result:
  794.      20) or the * first (result: 23).  The Rules of Precedence decide such
  795.      questions.
  796.  
  797.           Functions have the highest precedence.
  798.  
  799.           Arithmetic operations have the second highest precedence; among
  800.      themselves:
  801.  
  802.      *, /
  803.  
  804.      then
  805.  
  806.      +, -
  807.  
  808.           Relations are next; among themselves they all have the same
  809.      precedence.
  810.  
  811.           Logical operations come last; among themselves:
  812.  
  813.      .NOT.
  814.  
  815.      then
  816.  
  817.      .AND., .OR.
  818.  
  819.           When two or more of the above have the same precedence, they are
  820.      performed from left to right.
  821.  
  822.           The parentheses: ( and ) have higher precedence than functions,
  823.      operations, or relations.  Thus you can set the precedence explicitly
  824.      using parentheses.
  825.  
  826.           This means that you do not have to get involved in familiarizing
  827.      yourself with the Rules of Precedence.  If you want + first, write
  828.  
  829.      (2+3)*4
  830.  
  831.      If you want * first, write:
  832.  
  833.      2+(3*4)
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.      Expressions                 SRI  VPI  VPIN                 Expressions
  841.  
  842.      SR-Info/VP-Info Reference Manual           Page 123          SECTION 3
  843.  
  844.  
  845.           The parentheses tell SR-Info/VP-Info how you want the operations
  846.      performed!  Since SR-Info/VP-Info throws away the parentheses when the
  847.      expression is compiled, you gain readability by using parentheses and
  848.      loose nothing.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.      Expressions                 SRI  VPI  VPIN                 Expressions
  901.  
  902.      SR-Info/VP-Info Reference Manual          Page 124          SECTION 4
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.                       SECTION 4. SR-Info/VP-Info COMMANDS
  910.  
  911.  
  912.  
  913.  
  914.           All SR-Info and VP-Info Professional commands are defined in this
  915.      section.  Wherever differences exist between the two versions, they
  916.      are noted.  All comments applicable to SR-Info also apply to VP-Info
  917.      Professional.
  918.  
  919.           First, the form of the commands and the symbols used in defining
  920.      them are discussed.  The sample files used are described in the
  921.      Appendix.
  922.  
  923.           Then all the commands are listed alphabetically.
  924.  
  925.  
  926.  
  927.                          4.1. The Form of the Commands
  928.  
  929.  
  930.           A SR-Info/VP-Info command consists of a command verb, such as
  931.      LIST, REPLACE; this is mostly followed by clauses that describe in
  932.      more detail what is to be done; for instance, in
  933.  
  934.      LIST NEXT 10
  935.  
  936.      the clause: "NEXT 10" restricts the LIST to the next 10 records
  937.      beginning with the current record.  In
  938.  
  939.      REPLACE amount WITH price*qty
  940.      
  941.      the clause "amount WITH price*qty" means that the field AMOUNT is to
  942.      be replaced with the expression "price*qty".  The command
  943.  
  944.      LIST NEXT 10 FOR amount<1000
  945.  
  946.      has two clauses.
  947.  
  948.           The command verb is always the first one or two words; in the
  949.      command listing, the command verb is shown as the heading.  For
  950.      instance, APPEND FROM is a command verb; so is COPY (and also COPY
  951.      STRUCTURE).  In the command:
  952.  
  953.      name='DAVID'
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.      Form of the Commands                              Form of the Commands
  961.  
  962.      SR-Info/VP-Info Reference Manual          Page 125          SECTION 4
  963.  
  964.  
  965.      = is the command verb; this is the only exception to the rule that the
  966.      first word of a command line is always the command verb.
  967.  
  968.           The clauses are put together from SR-Info/VP-Info keywords, such
  969.      as WITH, FOR, NEXT, and from variables.  As a rule, in this manual,
  970.      keywords will be shown in capital letters; however, the user can type
  971.      them with upper- or lower-case letters.  All SR-Info/VP-Info keywords
  972.      are listed in Appendix ???.
  973.  
  974.           The power of SR-Info/VP-Info derives from the fact that each
  975.      command can be made more selective with these clauses.  Two of the
  976.      most powerful clauses are scope (such as NEXT <n> and WHILE <cond>)
  977.      and selection (FOR <cond>).
  978.  
  979.  
  980.  
  981.                                   4.2. Symbols
  982.  
  983.  
  984.           In Section 4.3, all commands will be described in detail.  The
  985.      following symbols are used to describe the form of a command:
  986.  
  987.  
  988.      [ ]     clauses in square brackets are optional.  Do not type the
  989.                    brackets!  (The only exception is the DIM command and
  990.                    matrix names that use [ and ].)
  991.  
  992.                    Example:
  993.  
  994.                    APPEND [OFF]
  995.  
  996.                    APPEND is a command and so is APPEND OFF.  There may be
  997.                    many optional clauses in a command.
  998.  
  999.      /        clauses connected with / indicate an option or a switch; you
  1000.                    can choose the clause before or after the /, but not
  1001.                    both (the switch can also be optional).
  1002.  
  1003.                    Examples:
  1004.  
  1005.                    SET EXACT ON/OFF
  1006.  
  1007.                    SET EXACT ON and SET EXACT OFF are valid commands.
  1008.  
  1009.                    APPEND FROM <file> [FOR <cond>] [SDF/SDF DELIMITED]
  1010.  
  1011.                    SDF and SDF DELIMITED are optional clauses; you can
  1012.                    choose neither, or either one, but not both.
  1013.  
  1014.      < >      Pointed brackets indicate that the user has to type in some
  1015.                    information, for instance, <file> indicates that a file
  1016.  
  1017.  
  1018.  
  1019.  
  1020.      Symbols                                                        Symbols
  1021.  
  1022.      SR-Info/VP-Info Reference Manual          Page 126          SECTION 4
  1023.  
  1024.  
  1025.                    name has to be typed in.  Never type the pointed
  1026.                    brackets.  Here are the most common information
  1027.                    requests:
  1028.  
  1029.      <cond>   condition (logical expression), see <exp>.
  1030.  
  1031.                    Examples:
  1032.  
  1033.                    name='David'
  1034.                    !(name)='DAVID'
  1035.                    num3 < (num1+5) * 2.71
  1036.  
  1037.      <const>  constant (see Section 3.1).
  1038.  
  1039.                    Examples:
  1040.  
  1041.                    Numeric constant: 3.5
  1042.                    String constant: 'bread'
  1043.                    Logical constant: T or F.
  1044.  
  1045.                    If the constant has to be one of these specified types,
  1046.                    instead of <const>, you find <num const>, <str const>,
  1047.                    <log const>.
  1048.  
  1049.      <exp>    expression (see Section 3.5).
  1050.  
  1051.                    Examples:
  1052.  
  1053.                    Numeric expression: num1+3 (NUM1 is a numeric variable)
  1054.                    String expression: name+$(fname,1,5)  (NAME and FNAME
  1055.                        are string variables, $( is a string function)
  1056.                    Logical expression (or condition): (2 < num1) .OR. male
  1057.                        (NUM1 is a numeric variable, MALE is a logical
  1058.                        variable)
  1059.  
  1060.                    If the expression has to be one of these specified
  1061.                    types, instead of <exp>, you find <num exp>, <str exp>,
  1062.                    <cond>.  (Note that a logical expression is the same as
  1063.                    a condition, see Section 3.5.)
  1064.  
  1065.      <exp list> expression list; separate the expressions by commas.  An
  1066.                    expression is an expression list with one item on the
  1067.                    list, so an <exp> will do wherever <exp list> is
  1068.                    requested.
  1069.  
  1070.                    Examples:
  1071.  
  1072.                    name
  1073.                    name,fname,tel:no,price*qty
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.      Symbols                                                        Symbols
  1081.  
  1082.      SR-Info/VP-Info Reference Manual          Page 127          SECTION 4
  1083.  
  1084.  
  1085.      <field>  field name.
  1086.  
  1087.      <field list> field list; a list of fields separated by commas.  A
  1088.                    field is a field list with one item on the list, so a
  1089.                    <field> will do wherever <field list> is requested.
  1090.  
  1091.                    Examples:
  1092.  
  1093.                    name
  1094.                    name,fname,tel_no
  1095.  
  1096.      <file>   file name.
  1097.  
  1098.                    Examples:
  1099.  
  1100.                    trans,data3
  1101.  
  1102.                    See Section 2 on SR-Info/VP-Info files.  The general
  1103.                    rule is that the extension, if not typed, is supplied by
  1104.                    SR-Info/VP-Info.  For instance, if <file> asks for the
  1105.                    name of a data file, type TRANS, and SR-Info/VP-Info
  1106.                    supplies ".DBF".
  1107.  
  1108.      <file list> file list; separate the files by commas.
  1109.  
  1110.                    Examples:
  1111.  
  1112.                    trans
  1113.                    trans,cust3,telno
  1114.  
  1115.      <file number> file number, a number between 1 and 10 for VP-Info
  1116.                    Professional, between 1 and 6 for SR-Info).  See the
  1117.                    SELECT command on how a file number is selected.
  1118.  
  1119.      <format> format string.  See the @ command for the definition of
  1120.                    format strings.
  1121.  
  1122.                    Examples:
  1123.  
  1124.                    '99,999.99'
  1125.                    'XXA!XXA'
  1126.  
  1127.      <line,col> line number and column number; both line and col are
  1128.                    numeric expressions.
  1129.  
  1130.                    Examples:
  1131.  
  1132.                    15,23
  1133.                    mrow+1,mcol+10
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.      Symbols                                                        Symbols
  1141.  
  1142.      SR-Info/VP-Info Reference Manual          Page 128          SECTION 4
  1143.  
  1144.  
  1145.      <memvar> memory variable; see Section 2.3.
  1146.  
  1147.      <memvar list> a list of memory variables separated by commas.
  1148.  
  1149.                    Example:
  1150.  
  1151.                    name,fname,salary,tel:no
  1152.  
  1153.      <num const> numeric constant
  1154.  
  1155.                    Example:
  1156.  
  1157.                    5
  1158.  
  1159.      <num exp> numeric expression, see <exp>.
  1160.  
  1161.                    Examples:
  1162.  
  1163.                    (num1+5)/5
  1164.                    VAL('3.14')+INT(field2)
  1165.  
  1166.      <procedure> procedure name.  See the PROCEDURE and PERFORM commands.
  1167.  
  1168.      <program> program name.
  1169.  
  1170.                    Example:
  1171.  
  1172.                    invoice
  1173.  
  1174.      <program segment> a number of SR-Info/VP-Info commands.
  1175.  
  1176.                    Example:
  1177.  
  1178.                    price=23
  1179.                    amount=price * qty
  1180.                    @ 20,2 SAY amount
  1181.  
  1182.      <scope>  the scope of the command.  There are four scopes:
  1183.  
  1184.               ALL             execute for all records
  1185.               NEXT n          execute for the next n records
  1186.               RECORD n        execute only for this record
  1187.               WHILE <cond>    execute while <cond> holds; should be
  1188.                                    used only if <cond> holds for the
  1189.                                    current record; this scope is very
  1190.                                    useful for large data files
  1191.  
  1192.                    The scope is always optional; however, if none is
  1193.                    specified, the command will use the default scope.  For
  1194.                    each command that can have a scope, the default scope is
  1195.                    given.
  1196.  
  1197.  
  1198.  
  1199.  
  1200.      Symbols                                                        Symbols
  1201.  
  1202.      SR-Info/VP-Info Reference Manual          Page 129          SECTION 4
  1203.  
  1204.  
  1205.  
  1206.      <string> any type of string; a line of text.
  1207.  
  1208.                    Examples:
  1209.  
  1210.                    This is a string
  1211.                    12.89!
  1212.  
  1213.      '<string>' A string in quotation marks (' or ", but matching)
  1214.  
  1215.                    Examples:
  1216.  
  1217.                    'This is a string'
  1218.                    "This is a string"
  1219.                    '1234'
  1220.                    "Alice's Restaurant"
  1221.  
  1222.      <str const> string expression, see <const>.
  1223.  
  1224.                    Example:
  1225.  
  1226.                    'Number: '
  1227.  
  1228.      <str exp> string expression, see <exp>.
  1229.  
  1230.                    Examples:
  1231.  
  1232.                    'Number: '+'34.89'
  1233.                    TRIM(str1)+$(field3,3,2)
  1234.  
  1235.      <text>   any number of lines of text.
  1236.  
  1237.                    Example:
  1238.  
  1239.                    This is a sample text for the TEXT command.  Notice that
  1240.                    you do not have to press <ENTER> at the end of the line,
  1241.                    the words jump to the next line where necessary.  You
  1242.                    press <ENTER> only at the end of a paragraph.
  1243.                    This is a new paragraph.
  1244.  
  1245.      <var>    variable name; see Section 2.3 for variables (same as
  1246.                    <memvar> or <field>).
  1247.  
  1248.                    Examples:
  1249.  
  1250.                    name
  1251.                    num1
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.      Symbols                                                        Symbols
  1261.  
  1262.      SR-Info/VP-Info Reference Manual          Page 130          SECTION 4
  1263.  
  1264.  
  1265.  
  1266.                                4.3. Command List
  1267.  
  1268.  
  1269.           This section gives a complete listing of all the commands.  For
  1270.      more examples of the use of these commands, the reader is referred to
  1271.      the original VP-Info Manual published by Paperback Software
  1272.      International and distributed by Sub Rosa Publishing Inc. (Note that
  1273.      the original VP-Info Manual describes the language as it was released
  1274.      in 1986; all commands and functions of that release are still
  1275.      supported, although many are substantially enhanced.  The descriptive
  1276.      material is generally accurate and applies equally to all versions of
  1277.      SR-Info/VP-Info except that networking is supported only by VP-Info
  1278.      Professional Network Edition.)
  1279.  
  1280.           As explained in Section 2.2, all commands that refer to data
  1281.      files can be modified with a #n; for instance,
  1282.  
  1283.      LIST#3 NEXT 4 FOR cost < 500
  1284.  
  1285.      modifies the LIST command to use file 3.  To avoid cluttering up the
  1286.      description of the commands, this [#n] option is not given.
  1287.  
  1288.           Normally, the explanation of the command is in five parts.
  1289.      First, the command verb is displayed.  Second, a brief explanation of
  1290.      the command is given.  The third part is the syntax, that is, the form
  1291.      of the command, with an explanation of what each symbol stands for.
  1292.      This part is framed for easy recognition.  The next part is a detailed
  1293.      explanation of how the command works.  This is followed, as a rule, by
  1294.      examples.
  1295.  
  1296.           The HELP command brings to the screen the first three parts and
  1297.      some examples when you use the standard help file; when you use the
  1298.      long help file, the entire text given here is displayed on the screen.
  1299.  
  1300.           In the examples, the data files of Appendix ??? will be used
  1301.      without any reference.
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.      Command List                                              Command List
  1321.  
  1322.      SR-Info/VP-Info Reference Manual          Page 131          SECTION 4
  1323.  
  1324.  
  1325.  
  1326.                                        *
  1327.  
  1328.      Place comments -- notes -- in programs.
  1329.  
  1330.      ╔════════════════════════════════════════════════════════════════════╗
  1331.      ║ * [<string>]                                                       ║
  1332.      ╟────────────────────────────────────────────────────────────────────╢
  1333.      ║ Option:                                                            ║
  1334.      ║                                                                    ║
  1335.      ║ <string>   any text line: the comment                              ║
  1336.      ╚════════════════════════════════════════════════════════════════════╝
  1337.  
  1338.           The command * (or NOTE) is used for placing comments in a
  1339.      program.  SR-Info/VP-Info ignores any line that starts with * (or
  1340.      NOTE).  Since the compilation removes all the comment lines, the
  1341.      number of comments has no effect on the speed of the compiled program.
  1342.  
  1343.           Notes can also be added with semicolon(;) at the end of any
  1344.      SR-Info/VP-Info command line.
  1345.  
  1346.            Example:
  1347.  
  1348.      In a program:
  1349.  
  1350.      ********************************************************************
  1351.      * This is the start of the payroll computation module
  1352.      * Programmer: David Simco
  1353.      * Date: 2/8/90
  1354.      ********************************************************************
  1355.      USE employee INDEX employee  ;opening EMPLOYEE ordered by name
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.      *                           SRI  VPI  VPIN                           *
  1381.  
  1382.      SR-Info/VP-Info Reference Manual          Page 132          SECTION 4
  1383.  
  1384.  
  1385.  
  1386.                                        =
  1387.  
  1388.      Assign value to a memory variable, or to a field when a record is
  1389.      referenced as a vector of fields.
  1390.  
  1391.      ╔════════════════════════════════════════════════════════════════════╗
  1392.      ║ <memvar>=<exp>                                                     ║
  1393.      ║ <file>[<num exp>]=<exp>                                            ║
  1394.      ╚════════════════════════════════════════════════════════════════════╝
  1395.  
  1396.           Assigning values to memory variables.  The first form of this
  1397.      command assigns a value to a memory variable; if the variable does not
  1398.      exist, it will be created.  This command is equivalent to the STORE
  1399.      command (see STORE).
  1400.  
  1401.           Treating a data file as a vector.  The second form assigns a
  1402.      value to a field of a data file.  In this form, [ and ] do not
  1403.      indicate an option, [ and ] have to be typed in.  For instance,
  1404.      EMPLOYEE[3] is the third field, ADDR, of the EMPLOYEE data file.  This
  1405.      is the only way to assign a value to a field with the = command.
  1406.      Normally, field values are assigned with the REPLACE command.
  1407.  
  1408.           Special care must be taken when using this second form when the
  1409.      data file is opened with a macros (see USE).  Opening a file with a
  1410.      macro allows a standard program to work with a wide variety of files,
  1411.      provided the compiler is told the data file structure.
  1412.  
  1413.           Suppose a data file is opened with the following commands:
  1414.  
  1415.      USE inven COMPILE
  1416.      ACCEPT 'Enter name of data file to use: ' to fil_nam
  1417.      USE &fil_nam
  1418.  
  1419.           In this case, the compiled program assumes INVEN.DBF is in use,
  1420.      even though some other file with the same structure is actually
  1421.      opened.  Therefore, if fil_nam='INVEN88', the proper way to reference
  1422.      the 3rd field of the open data file is inven[3], not inven88[3].
  1423.  
  1424.           Examples:
  1425.  
  1426.      1>cost=23.89
  1427.      1>qty=45
  1428.      1>? cost*qty
  1429.        1075.05
  1430.      1>employee[1]='Steiner'
  1431.      1>n=6
  1432.      1>order[n+1]='Short-sleeve golf shirts'
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.      =                           SRI  VPI  VPIN                           =
  1441.  
  1442.      SR-Info/VP-Info Reference Manual          Page 133          SECTION 4
  1443.  
  1444.  
  1445.           Comment: = is the only SR-Info/VP-Info command verb that does not
  1446.      appear at the start of the command line. All of the following are
  1447.      identical in effect:
  1448.  
  1449.      1>employee[1]='Steiner'
  1450.      1>REPLACE employee[1] WITH 'Steiner'
  1451.      1>REPLACE name WITH 'Steiner'
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.      =                           SRI  VPI  VPIN                           =
  1501.  
  1502.      SR-Info/VP-Info Reference Manual          Page 134          SECTION 4
  1503.  
  1504.  
  1505.  
  1506.                                        ?
  1507.                                        »
  1508.                      Display expression or expression list.
  1509.  
  1510.      ╔════════════════════════════════════════════════════════════════════╗
  1511.      ║ ? [<exp list>]                                                     ║
  1512.      ║ ?? [<exp list>]                                                    ║
  1513.      ╟────────────────────────────────────────────────────────────────────╢
  1514.      ║ Option:                                                            ║
  1515.      ║                                                                    ║
  1516.      ║ <exp list>   the expression or expressions to be displayed         ║
  1517.      ╚════════════════════════════════════════════════════════════════════╝
  1518.  
  1519.           The ? command evaluates the expression or expressions in the list
  1520.      (remember the commas to separate the expressions in the list!) and
  1521.      displays the results on a new line.  In particular, this command is
  1522.      often used to display the contents of memory variables and fields.
  1523.  
  1524.           The displayed items are separated by blanks if SET RAW OFF (see
  1525.      the SET command; on is the default).  When SET RAW ON, they appear
  1526.      side by side.
  1527.  
  1528.           ? with no expression displays a blank line; it is used for
  1529.      spacing on the screen and printer.
  1530.  
  1531.           While the ? command moves the cursor to the beginning of the next
  1532.      line before the items are displayed, the ?? command displays the items
  1533.      at the current cursor position.  The ?? command is used in programs to
  1534.      build lines of text on the screen or on the printer from several
  1535.      pieces.
  1536.  
  1537.           For displaying matrices, see Section 2.5.
  1538.  
  1539.           Examples:
  1540.  
  1541.           1. Displaying fields:
  1542.  
  1543.      1>USE employee
  1544.      1>GO 5
  1545.      1>? fname
  1546.      Poyner
  1547.      1>? fname,tel:no
  1548.      Poyner          403-1193
  1549.  
  1550.           2. Using the ? command as a calculator:
  1551.  
  1552.      1>b=7
  1553.      1>? 25/5+b,b*2,b*b
  1554.          12.00     14.00     49.00
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.      ?/??                        SRI  VPI  VPIN                        ?/??
  1561.  
  1562.      SR-Info/VP-Info Reference Manual          Page 135          SECTION 4
  1563.  
  1564.  
  1565.  
  1566.           3. A composite print line in a program segment (CUSTN and DEBIT
  1567.      are fields in the selected file):
  1568.  
  1569.      amount=0
  1570.      mcust=custn
  1571.      ? 'The amount of the invoice is: '
  1572.      DO WHILE custn=mcust.AND..NOT.EOF
  1573.         amount=amount+debit
  1574.         SKIP
  1575.      ENDDO
  1576.      ?? amount
  1577.  
  1578.           Note how the third and eighth command lines make one print line.
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.      ?/??                        SRI  VPI  VPIN                        ?/??
  1621.  
  1622.      SR-Info/VP-Info Reference Manual          Page 136          SECTION 4
  1623.  
  1624.  
  1625.  
  1626.                                        @
  1627.  
  1628.      Display data and data input request at specific line and column
  1629.      position on screen or printer, or erase the screen line starting at
  1630.      the specified coordinates.
  1631.  
  1632.      ╔════════════════════════════════════════════════════════════════════╗
  1633.      ║ @ <line,col> [SAY <exp> [USING <format>]] [GET <var> [PICTURE      ║
  1634.      ║      <format>]]                                                    ║
  1635.      ║                                                                    ║
  1636.      ║ line   the line number for the display, a numeric expression;      ║
  1637.      ║           the fractional part (if any) will be discarded           ║
  1638.      ║ col    the column number for the display, numeric expression;      ║
  1639.      ║           the fractional part (if any) will be discarded           ║
  1640.      ╟────────────────────────────────────────────────────────────────────╢
  1641.      ║ Options:                                                           ║
  1642.      ║                                                                    ║
  1643.      ║ none    erase the screen line starting at the specified            ║
  1644.      ║            row and column position; when printing, move print head ║
  1645.      ║            to specified position                                   ║
  1646.      ║                                                                    ║
  1647.      ║ SAY <exp> [USING <format>]                                         ║
  1648.      ║                                                                    ║
  1649.      ║ SAY     displays the expression, <exp>; if there is a USING        ║
  1650.      ║            clause, <exp> is displayed using the format             ║
  1651.      ║            specification <format>                                  ║
  1652.      ║                                                                    ║
  1653.      ║ GET <var> [PICTURE <format>]                                       ║
  1654.      ║ GET     asks for an input into the variable <var>; the present     ║
  1655.      ║            contents of the <var> is displayed; if there is a       ║
  1656.      ║            PICTURE clause, <var> is displayed using <format>.      ║
  1657.      ║            The input request is activated by the READ command      ║
  1658.      ╚════════════════════════════════════════════════════════════════════╝
  1659.  
  1660.           The @ command is used in SR-Info/VP-Info programs, first, to
  1661.      display formatted data at specific locations on the screen or printer,
  1662.      and second, to prompt the user to type in data (in conjunction with
  1663.      the READ command).  If the SET FORMAT option is TO PRINT (see the SET
  1664.      FORMAT command), then the (formatted) data is sent to the printer and
  1665.      there can be no GET clause; otherwise the SET FORMAT TO SCREEN is in
  1666.      effect, and the data is sent to, and can be obtained from, the screen.
  1667.  
  1668.           The keywords of the @ command: SAY, USING, GET, PICTURE cannot be
  1669.      in macros.
  1670.  
  1671.           This command is a crucial element in making input screens and
  1672.      reports in SR-Info/VP-Info, but also consider the TEXT command, with
  1673.      many features of the @ command, and is usually used in preference to @
  1674.      for full-screen input and output, and printed output.
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.      @                           SRI  VPI  VPIN                           @
  1681.  
  1682.      SR-Info/VP-Info Reference Manual          Page 137          SECTION 4
  1683.  
  1684.  
  1685.  
  1686.           For the IBM screen, the line numbers (see the ROW() function) go
  1687.      from 0 to 24, column numbers (see the COL() function) from 0 to 79.
  1688.      For the printer, the line number counter begins at 0 (line 1); it is
  1689.      reset to 0 by the EJECT command (see the commands: EJECT, SET EJECT,
  1690.      SET LENGTH TO).  If there are several @ commands for the printer, each
  1691.      @ command must display past the display of the previous @ command
  1692.      (that is, if the first @ command displays at line1, col1, and the next
  1693.      at line2, col2, then either line1<line2, or line1=line2 and
  1694.      col1<col2).  If the new print position is less than the current print
  1695.      position, the printer head is not moved by the @ command.
  1696.  
  1697.           If GET <var> is used, the variable, <var> must exist; it is not
  1698.      created by this command.  The present value of <var> is shown on the
  1699.      screen; the new value typed in by the user becomes the contents of
  1700.      <var>; if <var> is a field, the field in the selected file is changed
  1701.      (a REPLACE is performed).
  1702.  
  1703.           If no option is used in screen output, for instance @ 10,0, the
  1704.      line is cleared on the screen starting at the indicated column.  On
  1705.      the printer, the print head is moved to the new position.
  1706.  
  1707.           If there is no <format> clause, the variable is displayed as
  1708.      follows: fields are displayed with the width specified in the data
  1709.      file structure; string memory variables are displayed as stored;
  1710.      numeric variables are displayed as specified by the :PICTURE system
  1711.      variable (see Section 2.6).
  1712.  
  1713.           The GET clauses are activated by the READ command.  There can be
  1714.      no more than 64 GET clauses for a READ command.  The GET clauses with
  1715.      their pictures are stored in a Get Table, which remains in effect
  1716.      after a READ until another GET clause is encountered or a CLEAR GETS
  1717.      command is encountered. It may also be cleared when leaving the
  1718.      current program module, depending on the setting of the SET GET
  1719.      command (see the commands: READ, SET GET, CLEAR GETS, and ON FIELD).
  1720.  
  1721.           Format clause.  A format clause is a string composed of format
  1722.      characters and background characters.  The format characters format
  1723.      the output, serve as holding places for characters in output, and mask
  1724.      the input; the background characters are placed in the output to make
  1725.      it prettier and in the input to make the input easier.
  1726.  
  1727.           For instance, if the variable DATE is a string of blanks, the
  1728.      command
  1729.  
  1730.      @ 5,1 SAY 'Type date (mm/dd/yy) ' GET date PICTURE '99/99/99'
  1731.  
  1732.      will display in line 5, column 1:
  1733.  
  1734.      Type date (mm/dd/yy)   /  /
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.      @                           SRI  VPI  VPIN                           @
  1741.  
  1742.      SR-Info/VP-Info Reference Manual          Page 138          SECTION 4
  1743.  
  1744.  
  1745.  
  1746.           In this example, 9 is a format character; it accepts only digits
  1747.      (0 to 9).  The slash (/) is a background character; it is displayed to
  1748.      help the input; the cursor jumps over the displayed / when the input
  1749.      is typed.  The format characters do not become part of the resulting
  1750.      input.
  1751.  
  1752.           Formatting numbers.  Formatting numbers is very easy.  Specify
  1753.      the number of decimals, the placement of commas, and perhaps a
  1754.      floating dollar sign.  Here are some examples:
  1755.  
  1756.  
  1757.      Number         Format           Display       Comment
  1758.  
  1759.      1123.89        '9,999.99'       1,123.89
  1760.      1000.89        '99999'             1000       the decimals were
  1761.                                                      dropped
  1762.      100.89         '$9,999.99'      $ 100.89      the comma does not
  1763.                                                      appear; note the two
  1764.                                                      blanks after the $
  1765.      100.89         '$,$$$.99'       $100.89         the $ floats to the
  1766.                                                      number up to the last
  1767.                                                      $ in the format
  1768.      100.89         '99'             **            stars means number is
  1769.                                                      too large to display
  1770.      100.89         '999.999'        100.890
  1771.  
  1772.  
  1773.           This is how the format works both with the SAY and the GET clause
  1774.      in displaying numbers; extreme care, however, must be exercised in
  1775.      using format with GET when inputting values to a numeric field, since
  1776.      the field and the picture must have the same number of digits before
  1777.      the decimal point.
  1778.  
  1779.           The GET clause displays the number in the variable or field;
  1780.      after the READ command, SR-Info/VP-Info waits for input.  The input is
  1781.      typed in on top of the displayed number, ignoring where the number is,
  1782.      the dollar sign, commas, and the decimal point.  Only digits, the
  1783.      minus sign, and the decimal point are accepted.  Once the input is
  1784.      complete (by filling the field or by pressing <ENTER>), the new number
  1785.      is reformatted by the format clause, and redisplayed.
  1786.  
  1787.           Remember that in SR-Info/VP-Info, all numbers in a field have a
  1788.      specified width and number of decimals; these are recorded in the data
  1789.      file.  It is important to understand that a GET command does not
  1790.      change the width or the number of decimals for a field.  The field and
  1791.      the picture must have the same number of digits before the decimal
  1792.      point.
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.      @                           SRI  VPI  VPIN                           @
  1801.  
  1802.      SR-Info/VP-Info Reference Manual          Page 139          SECTION 4
  1803.  
  1804.  
  1805.           The number zero is displayed as a zero (in the specified format)
  1806.      or as blanks depending on whether SET ZERO is ON or OFF (the default
  1807.      is ON).
  1808.  
  1809.           To sum up: for numbers, only 9, $, the comma (,), and the period
  1810.      (.) are the format characters.  Any other character is a background
  1811.      character, except the two characters that format negative numbers, see
  1812.      below.
  1813.  
  1814.           Numbers are displayed as specified by the :PICTURE system
  1815.      variable (see Section 2.6); this can be changed by the <format>.
  1816.  
  1817.           Formatting negative numbers.  In some applications, the negative
  1818.      number -241.56 should appear as 241.56- or as <241.56>.  To achieve
  1819.      that, simply add - or > to the end of the picture format string:
  1820.  
  1821.      Number               Format             Display
  1822.  
  1823.      -241.56              9999.99            -241.56
  1824.      -241.56              9999.99-           241.56-
  1825.      -241.56              9999.99>          <241.56>
  1826.      241.56               9999.99-           241.56
  1827.      241.56               9999.99>           241.56
  1828.  
  1829.           Formatting strings.  For displaying strings, use four format
  1830.      characters: 9, X (or x), A (or a), and !.  Every other character is a
  1831.      background character.
  1832.  
  1833.           The format characters are just place holders for display
  1834.      purposes; each one will be replaced by a character of the string to be
  1835.      displayed:
  1836.  
  1837.  
  1838.      String    Format           Display         Comment
  1839.  
  1840.      'abcd'    'xXxx'           abcd            x and X are the same
  1841.      'abcd'    '!Xxx'           Abcd            ! forces character to caps
  1842.      'abcd'    '9X9!'           abcD            9 also displays letters
  1843.      'abcd'    'xx'             ab              displays as much as it can
  1844.      'abcd'    'xxxxx'          abcd            if the format has too many
  1845.                                                      place-holding
  1846.                                                      characters, the string
  1847.                                                      is padded with blanks
  1848.                                                      on the right
  1849.  
  1850.  
  1851.           Background characters can be mixed with the format characters:
  1852.  
  1853.      String        Format            Display        Comment
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.      @                           SRI  VPI  VPIN                           @
  1861.  
  1862.      SR-Info/VP-Info Reference Manual          Page 140          SECTION 4
  1863.  
  1864.  
  1865.      'abcd'        'X-X-X-X'         a-b-c-d        - is a background
  1866.                                                       character
  1867.      'abcd'        '(xx)-x/x'        (ab)-c/d       - and / are background
  1868.                                                       characters
  1869.      '2048856543'  '(xxx) xxx-xxxx'  (204) 885-6543 (, ), and - are
  1870.                                                       background characters
  1871.  
  1872.      String:   'DavidBrand'
  1873.  
  1874.      Format:  "1st: xxxxx, L'st: xxxxx"
  1875.  
  1876.      Display:  1st: David, L'st: Brand
  1877.  
  1878.           Comment:  This is an artificial example to show the pitfalls in
  1879.      using background characters.  In the format "1st name" will not work
  1880.      instead of "1st", because a is not a background character; that is
  1881.      also why "L'st" replaced "Last".  Finally, note the use of " as the
  1882.      format delimiter, so ' can be used in "L'st".
  1883.  
  1884.           In GET format clauses, 9, X, A, and ! are also place holders to
  1885.      display the present contents of the variable.  However, when
  1886.      SR-Info/VP-Info receives the input after the READ command, 9, X, A,
  1887.      and ! become place holders that take only certain characters:
  1888.  
  1889.  
  1890.      9 takes only digits (0 to 9), - (minus), blank, and . (period)
  1891.      A takes only letters (a to z and A to Z)
  1892.      X takes any character
  1893.      ! takes any character but converts lower-case letters (a to z) to
  1894.             upper case letters (A to Z)
  1895.  
  1896.  
  1897.           For instance, if the memory variable tel_no contains 10 blanks,
  1898.      then
  1899.  
  1900.      @ 10,10 GET tel_no PICTURE '(999) 999-9999'
  1901.  
  1902.      will display (   )    -    , the cursor is after (, and only digits
  1903.      (and -, blank, .) are accepted for input.
  1904.  
  1905.           The @ GET <var> command does not change the length of a string
  1906.      variable <var>.  If the variable is a field, the width is defined when
  1907.      the file was created; for a memory variable, the width is determined
  1908.      by the current value.
  1909.  
  1910.           Note that the format clause is also used by the PIC( function.
  1911.  
  1912.           Examples:
  1913.  
  1914.           1. Erase line 15 on the screen; or with SET PRINT ON, print a
  1915.      blank line 15.
  1916.  
  1917.  
  1918.  
  1919.  
  1920.      @                           SRI  VPI  VPIN                           @
  1921.  
  1922.      SR-Info/VP-Info Reference Manual          Page 141          SECTION 4
  1923.  
  1924.  
  1925.  
  1926.      1>@ 15,0
  1927.  
  1928.           This is the same as
  1929.  
  1930.      1>ERASE 15,15
  1931.  
  1932.           2. Display (print) on line 15, column 10:
  1933.  
  1934.      1>@ 15,10 SAY name
  1935.  
  1936.                David Simco
  1937.  
  1938.           3. Display on line 20:
  1939.  
  1940.      1>number=523.89
  1941.      1>@ 20,12 SAY number USING '999'
  1942.  
  1943.                  523
  1944.  
  1945.           4. Display on line 10, column 5:
  1946.  
  1947.      1>number=7756.90
  1948.      1>@ 10,5 SAY number USING '9,999.99'
  1949.  
  1950.           7,756.90
  1951.  
  1952.           5. Display on line 20:
  1953.  
  1954.      1>@ 20,0 SAY number USING '$$$,$$$.99'
  1955.  
  1956.        $7,756.90
  1957.  
  1958.           6. Display on line 15:
  1959.  
  1960.      1>@ 15,0 SAY name USING '!!!!!!!!!!'
  1961.  
  1962.      DAVID SIMC
  1963.  
  1964.           7. Display on line 2:
  1965.  
  1966.      1>@ 2,0 SAY name USING '!!!!!!!!!!!!!!!'
  1967.  
  1968.      DAVID SIMCO
  1969.  
  1970.           8. Display on line 5:
  1971.  
  1972.      1>@ 5,0 SAY name USING 'xxxxx-----xxxxx'
  1973.  
  1974.      David----- Simc
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.      @                           SRI  VPI  VPIN                           @
  1981.  
  1982.      SR-Info/VP-Info Reference Manual          Page 142          SECTION 4
  1983.  
  1984.  
  1985.  
  1986.           9. Display on line 10:
  1987.  
  1988.      1>telno='2025554321'
  1989.      1>@ 10,5 SAY telno USING '(xxx) xxx-xxxx'
  1990.  
  1991.           (202) 555-4321
  1992.  
  1993.           10. Display "Hello" on the second line from the current line:
  1994.  
  1995.      1>@ ROW()+2,0 SAY 'Hello'
  1996.  
  1997.           11. Using GET and a number (possible only in a program):
  1998.            a. Issue the GET command:
  1999.  
  2000.      number=4452.78
  2001.      @ 10,10 GET number PICTURE '99999.99'
  2002.  
  2003.  
  2004.      This displays in line 10:
  2005.  
  2006.                4452.78
  2007.  
  2008.           b. Now give a READ command:
  2009.  
  2010.  
  2011.      READ
  2012.  
  2013.           The cursor is now on the first character of the number.
  2014.  
  2015.           c. Type 7805.44, you see:
  2016.  
  2017.                7805.448
  2018.  
  2019.      (notice the final 8, which remained from the original value of NUMBER,
  2020.      is not part of the new value; as soon as a digit is typed in a numeric
  2021.      editing field, all digits to its right are marked to be cleared) the
  2022.      cursor is on the last character; press <ENTER>.  This gives the
  2023.      display:
  2024.  
  2025.                7,805.44
  2026.  
  2027.           Note that background characters may not be used in a picture for
  2028.      a numeric GET.  No error will be shown, but the resulting values may
  2029.      be not what you intend.
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.      @                           SRI  VPI  VPIN                           @
  2041.  
  2042.      SR-Info/VP-Info Reference Manual          Page 143          SECTION 4
  2043.  
  2044.  
  2045.  
  2046.                                      ACCEPT
  2047.  
  2048.      Input request for strings.
  2049.  
  2050.      ╔════════════════════════════════════════════════════════════════════╗
  2051.      ║ ACCEPT ['<string>'] TO <str var>                                   ║
  2052.      ╟────────────────────────────────────────────────────────────────────╢
  2053.      ║ Option:                                                            ║
  2054.      ║                                                                    ║
  2055.      ║ '<string>'  the prompt message                                     ║
  2056.      ╚════════════════════════════════════════════════════════════════════╝
  2057.  
  2058.           This command is used in SR-Info/VP-Info programs to request
  2059.      character information to be placed into a memory variable.  The text
  2060.      in <string> will be displayed as a prompt message.  Note that <string>
  2061.      has to be delimited by ' or by ", and may not be either a macro or a
  2062.      string expression.  ACCEPT cannot be used to input data into a field
  2063.      or element of a matrix.
  2064.  
  2065.           If the <memvar> does not exist, it will be created.
  2066.  
  2067.           The optional character string is used as a prompt.  A character
  2068.      expression cannot be used, but a macro is permitted, provided the
  2069.      macro expression includes quotation marks.
  2070.  
  2071.           To input numeric or logical data, use the INPUT command.
  2072.  
  2073.           Example:
  2074.  
  2075.      In a program:
  2076.  
  2077.      ACCEPT 'Your name: ' TO name
  2078.  
  2079.      Your name: David Simco
  2080.  
  2081.           The following illustrates use of a variable instead of a string
  2082.      as the prompt:
  2083.  
  2084.      1>prompt='"This is a prompt: "'
  2085.      1>ACCEPT &prompt TO hello
  2086.      This is a prompt:  George
  2087.      1>LIST MEMORY
  2088.  
  2089.      Name          Type    Width    Contents
  2090.      PROMPT          C      20      "This is a prompt: "
  2091.      HELLO           C       6      George
  2092.      ** Total ** 2  variables... 26  bytes
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.      ACCEPT                      SRI  VPI  VPIN                      ACCEPT
  2101.  
  2102.      SR-Info/VP-Info Reference Manual          Page 144          SECTION 4
  2103.  
  2104.  
  2105.  
  2106.                                      APPEND
  2107.  
  2108.      Append record to data file.
  2109.  
  2110.      ╔════════════════════════════════════════════════════════════════════╗
  2111.      ║ APPEND [FIELDS <field list> / TEXT <textfile>] / OFF ]             ║
  2112.      ╟────────────────────────────────────────────────────────────────────╢
  2113.      ║ Option:                                                            ║
  2114.      ║                                                                    ║
  2115.      ║ FIELDS <field list>   the fields to be edited during APPEND        ║
  2116.      ║ TEXT <textfile>       erases the screen, displays the text         ║
  2117.      ║                         file, and then does APPEND OFF             ║
  2118.      ╟────────────────────────────────────────────────────────────────────╢
  2119.      ║ Option in VP-Info Professional only:                               ║
  2120.      ║                                                                    ║
  2121.      ║ OFF                   rather than generate an APPEND input screen, ║
  2122.      ║                         uses an exiting screen and its Get Table   ║
  2123.      ╚════════════════════════════════════════════════════════════════════╝
  2124.  
  2125.           The APPEND command without either the OFF or TEXT option allows
  2126.      the user to add records to the selected file.  Once the command is
  2127.      given, the screen shows the new record in full-screen editing mode.
  2128.      For instance, if the selected file has 201 records, the screen will
  2129.      show record 202 with all fields filled with blanks; once record 202 is
  2130.      filled in, a blank record 203 is shown.
  2131.  
  2132.           To exit from APPEND, use <End> (or Ctrl-W) once you have filled
  2133.      in the fields of the last record desired.  If all the fields of the
  2134.      last record are blank, it will not be appended. To switch from APPEND
  2135.      to EDIT mode, press <Pg Up>.
  2136.  
  2137.           Note that APPEND is actually a special mode of EDIT; the only
  2138.      difference is that EDIT begins by displaying the current record, while
  2139.      APPEND adds a new blank record to the data file and displays that. All
  2140.      the editing fields are the same as in EDIT.  See the EDIT command for
  2141.      the complete list of editing keys.
  2142.  
  2143.           APPEND updates all index files in use.
  2144.  
  2145.           Example:
  2146.  
  2147.      1>USE employee
  2148.      1>APPEND
  2149.  
  2150.           SR-Info/VP-Info goes into screen editing mode and displays record
  2151.      7 with all fields blank (the box showing editing keys is displayed
  2152.      when SET MENU is ON):
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.      APPEND                      SRI  VPI  VPIN                      APPEND
  2161.  
  2162.      SR-Info/VP-Info Reference Manual          Page 145          SECTION 4
  2163.  
  2164.  
  2165.  
  2166. ──────────────────────────────────────────────────────────────────────────────
  2167. #1 EMPLOYEE.DBF                                    APPEND Record       7
  2168.                                                                      Page 1
  2169. ┌─────────────────────────────────────────────────────────────────────────────┐
  2170. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U         PAGE:  prev ^K  next ^L │
  2171. │FILE: top  ^<Home> bottom ^<End>       DELETE: char <Del> to end of field ^Y │
  2172. │APPEND MODE: begin ^<PgDn> exit <PgUp>     EXIT: with save <End>  no save ^Q │
  2173. └─────────────────────────────────────────────────────────────────────────────┘
  2174.  
  2175.      NAME...........
  2176.      FNAME..........
  2177.      ADDR...........
  2178.      CITY...........
  2179.      STATE..........
  2180.      ZIP............
  2181.      TEL_NO.........
  2182.      MARRIED........
  2183.      SALARY.........
  2184.      YEAR_EMP.......
  2185.      DEPT...........
  2186.      ADD_1..........
  2187. ──────────────────────────────────────────────────────────────────────────────
  2188.  
  2189.           SR-Info/VP-Info offers two options that allow users to format
  2190.      their APPEND and EDIT screens to their specific requirements.
  2191.  
  2192.           APPEND OFF suppresses the standard APPEND/EDIT screen and uses an
  2193.      existing screen and its associated Get Table to accept the input. It
  2194.      is available only in a program.
  2195.  
  2196.           Example in a program:
  2197.  
  2198.      1>USE employee
  2199.      1>CLS
  2200.      1>TEXT add_empl
  2201.      1>APPEND OFF
  2202.  
  2203.           APPEND TEXT can be used in both conversational mode and programs.
  2204.      The following combines all the steps in the above example:
  2205.  
  2206.           Example:
  2207.  
  2208.      1>USE employee
  2209.      1>APPEND TEXT add_empl
  2210.  
  2211.           The input screen can be constructed with either @ GET or TEXT
  2212.      command. See @ and TEXT commands.
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.      APPEND                      SRI  VPI  VPIN                      APPEND
  2221.  
  2222.      SR-Info/VP-Info Reference Manual          Page 146          SECTION 4
  2223.  
  2224.  
  2225.  
  2226.                                   APPEND BLANK
  2227.  
  2228.      Append a blank record to data file.
  2229.  
  2230.      ╔════════════════════════════════════════════════════════════════════╗
  2231.      ║ APPEND BLANK                                                       ║
  2232.      ╟────────────────────────────────────────────────────────────────────╢
  2233.      ║ Option:                                                            ║
  2234.      ║                                                                    ║
  2235.      ║ BLANK     append blank record, no full-screen editing              ║
  2236.      ╚════════════════════════════════════════════════════════════════════╝
  2237.  
  2238.           APPEND BLANK adds a blank record to the selected file, and sets
  2239.      the current record number to this record.  The new record is not
  2240.      shown.  The fields of such a record are usually filled by the user
  2241.      with the REPLACE, @ GET, or EDIT commands (or variants of these, see
  2242.      the commands READ, =, TEXT, BROWSE).
  2243.  
  2244.           APPEND BLANK updates all index files in use.
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.      APPEND BLANK                SRI  VPI  VPIN                APPEND BLANK
  2281.  
  2282.      SR-Info/VP-Info Reference Manual          Page 147          SECTION 4
  2283.  
  2284.  
  2285.  
  2286.                                   APPEND FROM
  2287.  
  2288.      Append data to the selected file from another file.
  2289.  
  2290.      ╔════════════════════════════════════════════════════════════════════╗
  2291.      ║ APPEND FROM <file> [FOR <cond>] [SDF/SDF DELIMITED [WITH <char>]]  ║
  2292.      ║                                                                    ║
  2293.      ║ <file>         the name of the source file                         ║
  2294.      ╟────────────────────────────────────────────────────────────────────╢
  2295.      ║ Options:                                                           ║
  2296.      ║                                                                    ║
  2297.      ║ FOR <cond>     select by condition (not with sequential source     ║
  2298.      ║                   files)                                           ║
  2299.      ║ SDF            sequential source file                              ║
  2300.      ║ SDF DELIMITED  sequential source file with delimited fields        ║
  2301.      ║ SDF DELIMITED WITH <char> sequential source file with fields       ║
  2302.      ║                  delimited with a specific character <char>        ║
  2303.      ╚════════════════════════════════════════════════════════════════════╝
  2304.  
  2305.           This command appends records from the source file <file> to the
  2306.      selected file.  Fields are copied from the source file to the selected
  2307.      file into fields with the same name.  Deleted records are not
  2308.      appended.
  2309.  
  2310.           If a field in the source file has no matching field in the
  2311.      selected file, then the field is ignored.  If a field in the selected
  2312.      file has no matching field in the source file, then the field is set
  2313.      to blank.
  2314.  
  2315.           For character fields, if the field width gets smaller, then the
  2316.      field is truncated on the right; if the field width gets larger, then
  2317.      the field is padded with blanks on the right.
  2318.  
  2319.           For number fields, if a number will not fit in the new field,
  2320.      digits are lost on the left side of the number.  Be careful when
  2321.      moving numbers with different field widths.  If the source field has
  2322.      more decimals than the target field, decimals on the right will be
  2323.      dropped. If the target field has too few positions to the left of the
  2324.      decimal point, the value will be lost and the field filled with a zero
  2325.      followed by asterisks.
  2326.  
  2327.           The FOR clause is used to append a subset of the file specified.
  2328.      The condition <cond> is made up of memory variables and the fields of
  2329.      the source file; permitted only when the source is a data file.
  2330.  
  2331.           If the structure of two data files is identical in all respects,
  2332.      the records are appended very quickly; otherwise the APPEND is done
  2333.      one field at a time.  If a field name occurs only in the source file,
  2334.      its values will not be copied into the target data file.  (To change
  2335.      the name of a field, use the RENAME FIELD command.)
  2336.  
  2337.  
  2338.  
  2339.  
  2340.      APPEND FROM                 SRI  VPI  VPIN                 APPEND FROM
  2341.  
  2342.      SR-Info/VP-Info Reference Manual          Page 148          SECTION 4
  2343.  
  2344.  
  2345.  
  2346.           APPEND FROM updates all index files in use.
  2347.  
  2348.           With any of the SDF options, SR-Info/VP-Info reads the sequential
  2349.      file, and each line is turned into a new record of the data file
  2350.      appended to the end.  Each line must end with a carriage return
  2351.      (character 13) or a carriage return-line feed pair (characters 13 and
  2352.      10).  The characters of the line are placed in the new record one
  2353.      after another from the left, see examples.  See also the related
  2354.      command: COPY TO ... SDF.
  2355.  
  2356.           APPEND FROM ... SDF assumes that fields are not trimmed or
  2357.      delimited.
  2358.  
  2359.           With the SDF DELIMITED option, the line of the sequential file is
  2360.      regarded as a number of trimmed fields, separated by commas.  Strings
  2361.      can, in addition, be delimited by quotation marks.  These fields are
  2362.      placed in the fields of the data file from the left.  The remaining
  2363.      fields of the data file (if any) are left blank; the remainder of the
  2364.      line (after all the fields are filled), if any, is ignored.
  2365.  
  2366.           With the SDF DELIMITED WITH <char> option, the line of the
  2367.      sequential file is regarded as a number of fields, separated by
  2368.      commas.  Strings are trimmed, and the specified character is used to
  2369.      surround strings and logical constants.  Otherwise, this option is
  2370.      identical to SDF DELIMITED.
  2371.  
  2372.           The functions to read and write sequential files give much better
  2373.      control over sequential files.  See Section 3.
  2374.  
  2375.           Important programming note: The APPEND FROM command automatically
  2376.      opens the FROM file in its internal work area; if the FROM file is
  2377.      already open in another work area, the compiler will assume it is
  2378.      closed when the APPEND FROM command is passed during execution, even
  2379.      if that command is in an IF, CASE or other structure module that is
  2380.      not executed!
  2381.  
  2382.           Therefore, if there is any reference to the FROM file later in
  2383.      the program, open the file in the proper work area again immediately
  2384.      after the APPEND FROM command.  If it is not actually needed after the
  2385.      APPEND FROM is executed (e.g., the program exits after the APPEND
  2386.      FROM), open it with the COMPILE keyword.  Example:
  2387.  
  2388.      USE#4 invoices COMPILE
  2389.  
  2390.           Examples:
  2391.  
  2392.           1. Appending from a file with the same structure:
  2393.  
  2394.      1>USE employee
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.      APPEND FROM                 SRI  VPI  VPIN                 APPEND FROM
  2401.  
  2402.      SR-Info/VP-Info Reference Manual          Page 149          SECTION 4
  2403.  
  2404.  
  2405.      1>COPY STRUCTURE TO empl1
  2406.      1>USE empl1
  2407.      1>APPEND FROM employee FOR name < 'Q'
  2408.            3 APPEND(S)
  2409.      1>LIST name
  2410.            1  Marek
  2411.            2  Balzer
  2412.            3  Poyner
  2413.      1>ZAP
  2414.      1>APPEND FROM employee FOR tel_no < '5'
  2415.            1 APPEND(S)
  2416.  
  2417.           2. Appending from a file with a different structure.  Append from
  2418.      EMPLOYEE.DBF.
  2419.  
  2420.           The selected file is:
  2421.  
  2422.      Datafile name :      EMPL2.DBF
  2423.      Number of records:       0
  2424.      Database selected is  #1
  2425.      Field   Name       Type Width   Dec
  2426.        1     NAME         C     15
  2427.        2     NAME1        C     10
  2428.        3     ADDR         C      5
  2429.        4     CITY         C     25
  2430.        5     STATE        C      2
  2431.        6     ZIP          C      5
  2432.        7     TEL_NO       C      8
  2433.        8     MARRIED      L      1
  2434.        9     SALARY       N      2      0
  2435.       10     YEAR_EMP     N      6      2
  2436.       11     DEPT         C     15
  2437.      ** Record Length **        95
  2438.  
  2439.           EMPL2 has a field NAME1 that does not occur in EMPLOYEE; the
  2440.      field FNAME in EMPLOYEE does not occur in EMPL2.
  2441.  
  2442.           The ADDR field in EMPLOYEE has width 20, in EMPL2 it has width 5.
  2443.      The CITY field in EMPLOYEE has width 20, in EMPL2 it has width 25.
  2444.      The SALARY field in EMPLOYEE has width 9, in EMPL2 it has width 2.
  2445.      The YEAR_EMP field in EMPLOYEE has width 4, in EMPL2 it has width 6;
  2446.      but only 3 characters are available for the number to the left of the
  2447.      decimal point.
  2448.  
  2449.      1>USE empl2
  2450.      1>APPEND FROM employee
  2451.            6 APPEND(S)
  2452.      1>EDIT 1
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.      APPEND FROM                 SRI  VPI  VPIN                 APPEND FROM
  2461.  
  2462.      SR-Info/VP-Info Reference Manual          Page 150          SECTION 4
  2463.  
  2464.  
  2465.  
  2466. ──────────────────────────────────────────────────────────────────────────────
  2467. #1 EMPL2.DBF                                         EDIT Record       1
  2468.                                                                      Page 1
  2469. ┌─────────────────────────────────────────────────────────────────────────────┐
  2470. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U         PAGE:  prev ^K  next ^L │
  2471. │FILE: top  ^<Home> bottom ^<End>       DELETE: char <Del> to end of field ^Y │
  2472. │APPEND MODE: begin ^<PgDn> exit <PgUp>     EXIT: with save <End>  no save ^Q │
  2473. └─────────────────────────────────────────────────────────────────────────────┘
  2474.      NAME...........  Marek
  2475.      NAME1..........
  2476.      ADDR...........  231 R
  2477.      CITY...........  Broomsdale
  2478.      STATE..........  MD
  2479.      ZIP............  02110
  2480.      TEL_NO.........  566-7012
  2481.      MARRIED........  y
  2482.      SALARY.........  0*
  2483.      YEAR_EMP.......  0*****
  2484.      DEPT...........  Maintenance
  2485. ──────────────────────────────────────────────────────────────────────────────
  2486.  
  2487.  
  2488.           Note that ADDR was cut down to 5 characters; CITY was padded by 5
  2489.      blanks; SALARY and YEAR_EMP indicate that there was not enough room
  2490.      for the numbers.
  2491.  
  2492.           3. Appending with the SDF option.
  2493.  
  2494.           Use the EMPLOYEE file, and append from a sequential file:
  2495.      DATA.TXT.  Give the commands:
  2496.  
  2497.      1>USE employee
  2498.      1>APPEND FROM DATA SDF
  2499.  
  2500.      Let the first line of DATA.TXT be:
  2501.  
  2502.      Smith          Robert    412 River Street
  2503.  
  2504.      then the first three fields will be correctly placed.  Note that the
  2505.      APPEND with SDF does not check for data correctness (numbers into
  2506.      numeric fields), for field width, etc.  This option can be used if
  2507.      some other program already formatted the sequential file in absolute
  2508.      conformity with the structure of the data file.
  2509.  
  2510.           4. APPEND with the SDF DELIMITED option is easier to use.
  2511.  
  2512.           Continuing the previous example,
  2513.  
  2514.      Smith,Robert,412 River Street
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.      APPEND FROM                 SRI  VPI  VPIN                 APPEND FROM
  2521.  
  2522.      SR-Info/VP-Info Reference Manual          Page 151          SECTION 4
  2523.  
  2524.  
  2525.  
  2526.      or
  2527.  
  2528.      'Smith','Robert','412 River Street'
  2529.  
  2530.      would do.  It is important to have the fields delimited with quotation
  2531.      marks if any field contains a comma.  Fields for which no data is
  2532.      supplied should be represented by commas as "place holders."  For
  2533.      instance,
  2534.  
  2535.      ,,'412 River Street'
  2536.  
  2537.           5. APPEND with the SDF DELIMITED WITH <char> option works the
  2538.      same way.
  2539.  
  2540.           Continuing the previous example, the command
  2541.  
  2542.      APPEND FROM source SDF DELIMITED WITH |
  2543.  
  2544.      working on the following line
  2545.  
  2546.      |Smith|,|Robert|,|412 River Street|
  2547.  
  2548.      would append the record correctly.  The use of a specified character
  2549.      other than single quote reduces or eliminates the concern about having
  2550.      commas, apostrophes and quotation marks in field contents.  Fields for
  2551.      which no data is supplied should be represented by the specified
  2552.      character as "place holders."  For instance,
  2553.  
  2554.      ||,||,412 River Street|
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.      APPEND FROM                 SRI  VPI  VPIN                 APPEND FROM
  2581.  
  2582.      SR-Info/VP-Info Reference Manual          Page 152          SECTION 4
  2583.  
  2584.  
  2585.  
  2586.                                    APPEND TO
  2587.  
  2588.      Append current record to another file.
  2589.  
  2590.      ╔════════════════════════════════════════════════════════════════════╗
  2591.      ║ APPEND TO <num const>                                              ║
  2592.      ║                                                                    ║
  2593.      ║ <num const>     append record to file in select area <num const>   ║
  2594.      ╚════════════════════════════════════════════════════════════════════╝
  2595.  
  2596.           This command appends the current record from the selected file to
  2597.      the file numbered <num const>.  The same rules apply as in the APPEND
  2598.      FROM command.
  2599.  
  2600.           You can also append to the same file by giving its file number.
  2601.  
  2602.           Examples:
  2603.  
  2604.           1. Interactive use.  There is a Backorder File; you are looking
  2605.      through it with EDIT or BROWSE to find which orders should be filled.
  2606.      Store "^Q;APPEND TO 4;BROWSE;^X;" into a function key, and whenever an
  2607.      order to ship is found, you press the function key.  File 4 is the
  2608.      file of orders to be shipped.
  2609.  
  2610.           2. There is a Name-and-Address file, and a label printing program
  2611.      that prints a whole file, the Label file.  The Name-and-Address file
  2612.      is searched by the above method, and APPEND TO is used to put the
  2613.      addresses to be printed in the Label file.
  2614.  
  2615.           3. A program segment.  File 2 is a backorder file; each record
  2616.      contains 25 fields including Q1 to Q8, the quantities for the eight
  2617.      sizes.  This program segment asks how much of each size should be
  2618.      shipped; the end result is that the items to be shipped are appended
  2619.      to the end of File 2, while the original record is changed to reflect
  2620.      the shipped quantities.
  2621.  
  2622.      SELECT 2
  2623.      STORE # TO gback
  2624.      APPEND TO 5
  2625.      @ y,35 GET q1
  2626.      @ y,39 GET q2
  2627.      @ y,43 GET q3
  2628.      @ y,47 GET q4
  2629.      @ y,51 GET q5
  2630.      @ y,55 GET q6
  2631.      @ y,59 GET q7
  2632.      @ y,63 GET q8
  2633.      READ
  2634.      REPLACE quant WITH q1+q2+q3+q4+q5+q6+q7+q8
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.      APPEND TO                   SRI  VPI  VPIN                   APPEND TO
  2641.  
  2642.      SR-Info/VP-Info Reference Manual          Page 153          SECTION 4
  2643.  
  2644.  
  2645.      SELECT 5
  2646.      REPLACE q1 WITH q1-q1#2,q2 WITH q2-q2#2,q3 WITH q3-q3#2
  2647.      REPLACE q4 WITH q4-q4#2,q5 WITH q5-q5#2,q6 WITH q6-q6#2
  2648.      REPLACE q7 WITH q7-q7#2,q8 WITH q8-q8#2
  2649.      REPLACE quant WITH q1+q2+q3+q4+q5+q6+q7+q8
  2650.      REPLACE type WITH 'O'
  2651.      APPEND TO 2
  2652.      SELECT 2
  2653.      GOTO gback
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  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.      APPEND TO                   SRI  VPI  VPIN                   APPEND TO
  2701.  
  2702.      SR-Info/VP-Info Reference Manual          Page 154          SECTION 4
  2703.  
  2704.  
  2705.  
  2706.  
  2707.                                     AVERAGE
  2708.  
  2709.      Average numeric expressions for selected records.
  2710.  
  2711.      ╔════════════════════════════════════════════════════════════════════╗
  2712.      ║ AVERAGE <num exp list> [TO <memvar list>] [<scope>] [FOR <cond>]   ║
  2713.      ║                                                                    ║
  2714.      ║ <num exp list>    the numeric expressions to average               ║
  2715.      ╟────────────────────────────────────────────────────────────────────╢
  2716.      ║ Options:                                                           ║
  2717.      ║                                                                    ║
  2718.      ║ <memvar list>     store the results in these memory variables      ║
  2719.      ║ <scope>           select by scope (default scope: ALL)             ║
  2720.      ║ FOR <cond>        select by condition                              ║
  2721.      ╚════════════════════════════════════════════════════════════════════╝
  2722.  
  2723.           The command AVERAGE adds up numeric expressions for selected
  2724.      records of the selected data file and divides the result with the
  2725.      number of records summed.  Up to 10 expressions can be averaged with
  2726.      one command.  Optionally, the results can be stored in numeric memory
  2727.      variables; the expression list and the numeric memory variable list
  2728.      should have the same number of entries.  <memvar list> cannot contain
  2729.      numeric matrix variables.
  2730.  
  2731.           Records flagged as DELETED are not averaged.
  2732.  
  2733.           Memory variables in <memvar list> need not exist; if any variable
  2734.      in the <memvar list> does not exist, this command creates it.
  2735.  
  2736.           Example:
  2737.  
  2738.           The average earning of the employees (in the data file EMPLOYEE),
  2739.      and the average year employment began:
  2740.  
  2741.      1>USE employee
  2742.      1>AVERAGE salary, year_emp
  2743.            6 AVERAGE(S)
  2744.        32502.16    1980.50
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.      AVERAGE                     SRI  VPI  VPIN                     AVERAGE
  2761.  
  2762.      SR-Info/VP-Info Reference Manual          Page 155          SECTION 4
  2763.  
  2764.  
  2765.  
  2766.                                     BINLOAD
  2767.  
  2768.      Load a binary (assembly-language) program into memory.
  2769.  
  2770.      ╔════════════════════════════════════════════════════════════════════╗
  2771.      ║ BINLOAD <programname>                                              ║
  2772.      ║                                                                    ║
  2773.      ║ <programname>  a binary file to be executed under                  ║
  2774.      ║                   VP-Info Professional (not available under        ║
  2775.      ║                   SR-Info); default extension BIN                  ║
  2776.      ╚════════════════════════════════════════════════════════════════════╝
  2777.  
  2778.           VP-Info Professional only: Assembly-language programs may be
  2779.      copied from disk into a special area of memory called BINSPACE, which
  2780.      must be set aside with the BINSPACE= command in your VPI.SET or
  2781.      VPIN.SET file.
  2782.  
  2783.           When no longer needed, the program can be removed from the
  2784.      BINSPACE with the BINUNLOAD command, allowing room for another binary
  2785.      program to take its place. A maximum of eight binary files, with
  2786.      default extension BIN, may be loaded into memory at one time.
  2787.  
  2788.           Once loaded into the BINSPACE, the program may be executed with
  2789.      the CALL command (see the CALL and BINUNLOAD commands).
  2790.  
  2791.           Examples:
  2792.  
  2793.      1>BINLOAD test
  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.      BINLOAD                        VPI  VPIN                       BINLOAD
  2821.  
  2822.      SR-Info/VP-Info Reference Manual          Page 156          SECTION 4
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  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.      BINLOAD                        VPI  VPIN                       BINLOAD
  2881.  
  2882.      SR-Info/VP-Info Reference Manual          Page 157          SECTION 4
  2883.  
  2884.  
  2885.  
  2886.                                    BINSPACE=
  2887.  
  2888.      Reserve space in memory to BINLOAD binary files to be run with the
  2889.      CALL command.
  2890.  
  2891.      ╔════════════════════════════════════════════════════════════════════╗
  2892.      ║ BINSPACE= <blocks>                                                 ║
  2893.      ║                                                                    ║
  2894.      ║          VP-Info Professional only             VPI.SET file only   ║
  2895.      ║                                                                    ║
  2896.      ║ <blocks>    the number of 1K blocks of RAM to be reserved          ║
  2897.      ║               for loading BIN files with the BINLOAD command       ║
  2898.      ╚════════════════════════════════════════════════════════════════════╝
  2899.  
  2900.           VP-Info Professional only: Assembly-language programs may be
  2901.      copied from disk into a special area of memory called BINSPACE, which
  2902.      must be set aside with the BINSPACE= command in your VPI.SET or
  2903.      VPIN.SET file.
  2904.  
  2905.           The number of 1K blocks, to a maximum of 32, must be specified.
  2906.  
  2907.           The BINSPACE is allocated above SR-Info/VP-Info's 64K data space
  2908.      and high memory, and reduces the amount of DOS memory available to
  2909.      execute commands with the RUN command.
  2910.  
  2911.           Once loaded into the BINSPACE with BINLOAD, the program may be
  2912.      executed with the CALL command (see the CALL, BINLOAD, and BINUNLOAD
  2913.      commands).
  2914.  
  2915.           Examples:
  2916.  
  2917.      1>BINSPACE=16
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.      BINSPACE=                      VPI  VPIN                     BINSPACE=
  2941.  
  2942.      SR-Info/VP-Info Reference Manual          Page 158          SECTION 4
  2943.  
  2944.  
  2945.  
  2946.                                    BINUNLOAD
  2947.  
  2948.      Remove a binary (assembly-language) program from memory.
  2949.  
  2950.      ╔════════════════════════════════════════════════════════════════════╗
  2951.      ║ BINUNLOAD <programname>                                            ║
  2952.      ║                                                                    ║
  2953.      ║ <programname>  a binary file to removed from memory by             ║
  2954.      ║                   VP-Info Professional (not available under        ║
  2955.      ║                   SR-Info); default extension BIN                  ║
  2956.      ╚════════════════════════════════════════════════════════════════════╝
  2957.  
  2958.           VP-Info Professional only: Assembly-language programs, which are
  2959.      loaded into a special area of memory called BINSPACE by the BINLOAD
  2960.      command, may be removed from memory by the BINUNLOAD command when no
  2961.      longer needed.
  2962.  
  2963.           This allows room for another binary program to take its place. A
  2964.      maximum of eight binary files, with default extension BIN, may be
  2965.      loaded into memory at one time.
  2966.  
  2967.           Care should be taken not to create "holes in memory" by loading
  2968.      and unloading BIN files indiscriminately. For best performance, users
  2969.      are urged to load frequently called binary files first and not unload
  2970.      them; then transient or occasional binary programs can be loaded,
  2971.      called and immediately unloaded with the BINUNLOAD command.
  2972.  
  2973.           (See BINLOAD and CALL commands.)
  2974.  
  2975.           Examples:
  2976.  
  2977.      1>BINUNLOAD test
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.      BINUNLOAD                      VPI  VPIN                     BINUNLOAD
  3001.  
  3002.      SR-Info/VP-Info Reference Manual          Page 159          SECTION 4
  3003.  
  3004.  
  3005.  
  3006.                                       BOX
  3007.  
  3008.      Draw a box on the screen.
  3009.  
  3010.      ╔════════════════════════════════════════════════════════════════════╗
  3011.      ║ BOX <line1>,<col1>,<line2>,<col2> [DOUBLE]                         ║
  3012.      ║                                                                    ║
  3013.      ║ <line1>,<col1>   the position of the upper-left corner of the box  ║
  3014.      ║ <line2>,<col2>   the position of the lower-right corner of the box ║
  3015.      ╟────────────────────────────────────────────────────────────────────╢
  3016.      ║ Option:                                                            ║
  3017.      ║                                                                    ║
  3018.      ║ DOUBLE   use double line graphics, the default is single-line      ║
  3019.      ╚════════════════════════════════════════════════════════════════════╝
  3020.  
  3021.           The command BOX draws a box on the screen using the character
  3022.      graphics of the IBM monochrome screen.  If line1=line2, a horizontal
  3023.      line is drawn.  If col1=col2, a vertical line is drawn.
  3024.  
  3025.           line1, line2, col1, col2 can all be numbers or numeric
  3026.      expressions; any fractional part will be disregarded
  3027.  
  3028.           This command is useful for making menus pretty, and for
  3029.      partitioning the screen into different viewing areas.
  3030.  
  3031.           Note that commas are required between the numeric expressions
  3032.      used for the corner specifications, but a comma is NOT permitted
  3033.      before the DOUBLE keyword.
  3034.  
  3035.           The WINDOW command can also draw a box, but in addition limits
  3036.      relative screen output to the boundary of the window and can
  3037.      optionally set window and box colors. See the WINDOW command.
  3038.  
  3039.           Examples:
  3040.  
  3041.      1>ERASE
  3042.      1>BOX 2,10,12,40
  3043.      1>ERASE
  3044.      1>BOX 3,0,8,20 DOUBLE
  3045.      1>ERASE
  3046.      1>BOX 10,0,10,70
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.      BOX                         SRI  VPI  VPIN                         BOX
  3061.  
  3062.      SR-Info/VP-Info Reference Manual          Page 160          SECTION 4
  3063.  
  3064.  
  3065.  
  3066.                                      BREAK
  3067.  
  3068.      Exit to the bottom of a DO WHILE or REPEAT loop.
  3069.  
  3070.      ╔════════════════════════════════════════════════════════════════════╗
  3071.      ║ BREAK                                                              ║
  3072.      ╚════════════════════════════════════════════════════════════════════╝
  3073.  
  3074.           The BREAK command is used only in programs, in a DO WHILE or a
  3075.      REPEAT loop to exit at the bottom of the loop.  If there are nested
  3076.      loops, the exit is at the bottom of the innermost loop.  See DO WHILE
  3077.      and REPEAT.
  3078.  
  3079.           Contrast the command BREAK with the command LOOP which executes
  3080.      the condition at the top of the DO WHILE loop (see the LOOP command).
  3081.  
  3082.           Caution: BREAK can be used only within a DO WHILE or REPEAT loop;
  3083.      use anywhere else is an error with unpredictable results.
  3084.  
  3085.           Example:
  3086.  
  3087.      DO WHILE T
  3088.      <program segment>
  3089.         IF custn<>mcust
  3090.            BREAK
  3091.         ENDIF
  3092.      <program segment2>
  3093.      ENDDO
  3094.  
  3095.           This program carries out <program segment> and <program segment2>
  3096.      until CUSTN becomes different from MCUST; then it jumps over <program
  3097.      segment2> and leaves the loop.
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.      BREAK                       SRI  VPI  VPIN                       BREAK
  3121.  
  3122.      SR-Info/VP-Info Reference Manual          Page 161          SECTION 4
  3123.  
  3124.  
  3125.  
  3126.                                      BROWSE
  3127.  
  3128.      Edit fields in many records.
  3129.  
  3130.      ╔════════════════════════════════════════════════════════════════════╗
  3131.      ║ BROWSE [FIELDS <field list>]/[OFF]/[TEXT <textfile>] [APPEND]      ║
  3132.      ╟────────────────────────────────────────────────────────────────────╢
  3133.      ║ Options (all versions):                                            ║
  3134.      ║                                                                    ║
  3135.      ║ FIELDS <field list>   specify the fields to be displayed           ║
  3136.      ║ APPEND    add a blank record and start BROWSE in that record       ║
  3137.      ║ OFF       rather than generate a BROWSE input screen, uses an      ║
  3138.      ║              exiting screen and its Get Table                      ║
  3139.      ║ TEXT <textfile> erases the screen, displays the text file, and     ║
  3140.      ║              then does BROWSE OFF                                  ║
  3141.      ╚════════════════════════════════════════════════════════════════════╝
  3142.  
  3143.           The BROWSE command displays the records (from the current record
  3144.      on) horizontally, one at a line; it displays as many fields as will
  3145.      fit on a line.  A column represents a field.
  3146.  
  3147.           If the selected file is indexed, the records are displayed in the
  3148.      indexed order.
  3149.  
  3150.           When the APPEND keyword is used, a blank record is appended to
  3151.      the data file and BROWSE begins in that record. The user may alternate
  3152.      between normal BROWSE and APPEND modes with the Ctrl-<PgDn> and <PgUp>
  3153.      editing keys.
  3154.  
  3155.           All the full-screen editing keys can be used.  Note that they
  3156.      have the same meaning as in EDIT, but sometimes they look different.
  3157.      For instance, the next record command (<PgDn> or Ctrl-C) gives a new
  3158.      screen in EDIT; in BROWSE, it simply moves the cursor down one line.
  3159.  
  3160.           Editing keys:
  3161.  
  3162.      <Left> or Ctrl-S        moves the cursor back one character
  3163.      <Right> or Ctrl-D       moves the cursor forward one character
  3164.      Ctrl-<Left>             moves to the beginning of the field
  3165.      Ctrl-<Right>            moves to the end of the field
  3166.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  3167.                                 inserted  (normally, you are in
  3168.                                 overtype mode: what you type overtypes the
  3169.                                 existing text); pressing <Ins> or Ctrl-V
  3170.                                 again, puts you back into overtype mode
  3171.      <BACKSPACE>             deletes the character to the left of the
  3172.                                 cursor
  3173.      <Del> or Ctrl-G         deletes the character on the cursor
  3174.      Ctrl-Y                  deletes the rest of the field
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.      BROWSE                      SRI  VPI  VPIN                      BROWSE
  3181.  
  3182.      SR-Info/VP-Info Reference Manual          Page 162          SECTION 4
  3183.  
  3184.  
  3185.  
  3186.      <Up> or Ctrl-E          moves the cursor to the previous field
  3187.      <Dn> or Ctrl-X          moves the cursor to the next field
  3188.  
  3189.      Ctrl-<Pg Dn>            Enters APPEND mode; adds a blank record and
  3190.                                 places the cursor in that new record
  3191.      Ctrl-Q                  quits and does not update the current record
  3192.      <End> or Ctrl-W         quits and updates the current record
  3193.      <PgUp> or Ctrl-R        moves to the previous record; when in APPEND
  3194.                                 mode, exist to normal BROWSE mode
  3195.      <PgDn> or Ctrl-C        moves to the next record
  3196.      Ctrl-L                  redraws the BROWSE screen with the next
  3197.                                 screenful of fields, referred to as the
  3198.                                 next "page"; if the file has no more
  3199.                                 fields, this key is ignored
  3200.      Ctrl-K                  redraws the BROWSE screen with the previous
  3201.                                 screenful of fields, referred to as the
  3202.                                 prior "page"; if the screen is already at
  3203.                                 the first field, this key is ignored
  3204.      Alt-E                   skips one screenful of record toward the
  3205.                                 beginning of the file and redisplays the
  3206.                                 BROWSE screen
  3207.      Alt-X                   skips one screenful of record toward the end
  3208.                                 of the file and redisplays the BROWSE
  3209.                                 screen
  3210.  
  3211.  
  3212.           BROWSE should be used to edit columns of data in a data file;
  3213.      that is, to edit a few fields of a number of records.  Use the command
  3214.      EDIT to edit many fields of a single records at the same time.
  3215.  
  3216.           The option FIELDS <field list> selects the fields to be displayed
  3217.      on the screen.
  3218.  
  3219.           SET MENU ON causes a small display at the top of the BROWSE
  3220.      screen, giving the use of major editing key.
  3221.  
  3222.           Examples:
  3223.  
  3224.      1>USE customer
  3225.      1>BROWSE
  3226.  
  3227.      Displays the following:
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.      BROWSE                      SRI  VPI  VPIN                      BROWSE
  3241.  
  3242.      SR-Info/VP-Info Reference Manual          Page 163          SECTION 4
  3243.  
  3244.  
  3245.  
  3246. ──────────────────────────────────────────────────────────────────────────────
  3247. #1 CUSTOMER.DBF                   SR-Info BROWSE
  3248.                                                                      Page 1
  3249. ┌─────────────────────────────────────────────────────────────────────────────┐
  3250. │REC:  prev <PgUp>  next   <PgDn>  delete ^U       SCROLL:  left ^K  right ^L │
  3251. │FILE: top  ^<Home> bottom ^<End>       DELETE: char <Del> to end of field ^Y │
  3252. │APPEND MODE: begin ^<PgDn> exit <PgUp>     EXIT: with save <End>  no save ^Q │
  3253. └─────────────────────────────────────────────────────────────────────────────┘
  3254.         CUSTNU FIRSTNAME       LASTNAME             ADDRESS
  3255.       1 BROS50 Stan            Brown                786 Alexander Rd.
  3256.       2 BURS50 Sid             Bursten              876 Main St.
  3257.       3 GRAG50 George          Gratzer              876 Arlington Avenue
  3258.       4 MELB50 Bernie          Melman               9876 Ocean View Parkway
  3259.  
  3260. ──────────────────────────────────────────────────────────────────────────────
  3261.  
  3262.  
  3263.           To edit the home and work telephone numbers of the customers,
  3264.      issue the command:
  3265.  
  3266.  
  3267.      1>USE customer
  3268.      1>BROWSE FIELDS name,hphone,wphone
  3269.  
  3270.  
  3271.           The display:
  3272.  
  3273.  
  3274. ──────────────────────────────────────────────────────────────────────────────
  3275. #1 CUSTOMER.DBF                   SR-Info BROWSE
  3276.                                                                      Page 1
  3277. ┌─────────────────────────────────────────────────────────────────────────────┐
  3278. │REC:  prev <PgUp>  next   <PgDn>  delete ^U       SCROLL:  left ^K  right ^L │
  3279. │FILE: top  ^<Home> bottom ^<End>       DELETE: char <Del> to end of field ^Y │
  3280. │APPEND MODE: begin ^<PgDn> exit <PgUp>     EXIT: with save <End>  no save ^Q │
  3281. └─────────────────────────────────────────────────────────────────────────────┘
  3282.              LASTNAME             HPHONE     WPHONE
  3283.            1 Brown                9238423472 3984747238
  3284.            2 Bursten              7658956    6575777
  3285.            3 Gratzer              7866457    7657655
  3286.            4 Melman               8765678    6765777
  3287.  
  3288. ──────────────────────────────────────────────────────────────────────────────
  3289.  
  3290.  
  3291.           SR-Info/VP-Info offers two options that allow users to format
  3292.      their BROWSE screens to their specific requirements.
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.      BROWSE                      SRI  VPI  VPIN                      BROWSE
  3301.  
  3302.      SR-Info/VP-Info Reference Manual          Page 164          SECTION 4
  3303.  
  3304.  
  3305.           BROWSE OFF suppresses the standard BROWSE screen and uses an
  3306.      existing screen and its associated Get Table to accept the input. It
  3307.      is available only in a program.
  3308.  
  3309.           Example in a program:
  3310.  
  3311.      1>USE employee
  3312.      1>CLS
  3313.      1>TEXT add_empl
  3314.      1>BROWSE OFF
  3315.  
  3316.           BROWSE TEXT can be used in both conversational mode and programs.
  3317.      The following combines all the steps in the above example:
  3318.  
  3319.           Example:
  3320.  
  3321.      1>USE employee
  3322.      1>BROWSE TEXT add_empl
  3323.  
  3324.           The input screen can be constructed with either @ GET and TEXT
  3325.      command. See @ and TEXT commands.
  3326.  
  3327.  
  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.      BROWSE                      SRI  VPI  VPIN                      BROWSE
  3361.  
  3362.      SR-Info/VP-Info Reference Manual          Page 165          SECTION 4
  3363.  
  3364.  
  3365.                                       CALL
  3366.  
  3367.      Execute a binary (assembly-language) program
  3368.  
  3369.      ╔════════════════════════════════════════════════════════════════════╗
  3370.      ║ CALL <programname> [<argument>]                                    ║
  3371.      ║                                                                    ║
  3372.      ║ <programname> a binary file to be executed under                   ║
  3373.      ║                  VP-Info Professional (not available under         ║
  3374.      ║                  SR-Info); default extension BIN                   ║
  3375.      ╟────────────────────────────────────────────────────────────────────╢
  3376.      ║ Option:                                                            ║
  3377.      ║                                                                    ║
  3378.      ║ <argument>    a character memory variable used to transfer data    ║
  3379.      ║                  to and from a BIN program; maximum 254 characters ║
  3380.      ╚════════════════════════════════════════════════════════════════════╝
  3381.  
  3382.           VP-Info Professional only: Assembly-language programs, which have
  3383.      been copied from disk into a special area of memory called BINSPACE,
  3384.      can be executed internally by VP-Info Professional.
  3385.  
  3386.           Running a binary file requires three steps:
  3387.  
  3388.           1.   Allocate memory in the VPI.SET or VPIN.SET file using the
  3389.                BINSPACE=n where <n> is the number of 1K blocks to allocate
  3390.                to the BINSPACE in memory.  The limit for <n> is 32.
  3391.                Example: BINSPACE=32 allocates 32K.
  3392.  
  3393.           2.   BINLOAD the program. A program need only be loaded once
  3394.                (unless it is removed with the BINUNLOAD command).
  3395.                Additional requests to BINLOAD the program will reload it in
  3396.                the same memory space. Up to eight binary programs may be
  3397.                loaded at once. Example: BINLOAD test. (BIN program may be
  3398.                removed from memory with the BINUNLOAD command.)
  3399.  
  3400.           3.   CALL the binary program, with an optional argument of up to
  3401.                254 bytes in a memory variable.  The binary program may
  3402.                modify or replace the contents of this variable, but may not
  3403.                create or lengthen the contents; when execution is
  3404.                completed, the variable will have a new value.
  3405.  
  3406.           See BINLOAD and BINUNLOAD commands.
  3407.  
  3408.           Example:
  3409.  
  3410.           The binary program, listed below, merely overwrites the first
  3411.      three characters of a passed string with the string "VPI".
  3412.  
  3413.      dummy='1234567890'
  3414.      CALL test dummy
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.      CALL                           VPI  VPIN                          CALL
  3421.  
  3422.      SR-Info/VP-Info Reference Manual          Page 166          SECTION 4
  3423.  
  3424.  
  3425.      ? dummy
  3426.  
  3427.      The current value of dummy would then be printed: "VPI4567890".
  3428.  
  3429.           Rules for BIN programs:
  3430.  
  3431.           1.   BIN programs are created in assembly language and assembled
  3432.                into an OBJ file with Microsoft's MASM program or
  3433.                equivalent, linked into a EXE file with LINK or equivalent,
  3434.                and converted into a BIN file with the DOS utility EXE2BIN.
  3435.  
  3436.           2.   The following is an example of an assembly-language module
  3437.                that accepts an input string in a memory-variable passed to
  3438.                the module on the CALL command line, modifies it, and passes
  3439.                it back in the same memory variable.
  3440.  
  3441.           ─────────────────────────────────────────────────────────────────
  3442.           ;  TESTBIN.ASM -- A sample program to illustrate the
  3443.           ;                 VP-Info BINLOAD and CALL facilities
  3444.           ;
  3445.           ;                 By Bernie Melman, Sub Rosa Publishing Inc.
  3446.           ;
  3447.           ;  This routine replaces the first three characters
  3448.           ;      in a passed string with the characters VPI
  3449.           ;
  3450.           ;  Assemble with MASM version 5.0
  3451.           ;  LINK to produce an EXE file (ignore the "No stack" warning)
  3452.           ;  EXE2BIN to generate BIN file
  3453.           ;
  3454.           _prog   segment byte
  3455.                   assume cs:_prog
  3456.           dtest   proc    far
  3457.                   mov [bx+0], byte ptr 'V'
  3458.                   mov [bx+1], byte ptr 'P'
  3459.                   mov [bx+2], byte ptr 'I'
  3460.                   mov ax,0            ;try changing bp to see if VP-Info
  3461.                                       ;   can recover regs ok
  3462.                   mov bp,ax           ;do it
  3463.                   ret
  3464.           dtest   endp
  3465.           _prog   ends
  3466.                   end
  3467.           ─────────────────────────────────────────────────────────────────
  3468.  
  3469.           3.   No argument is required, but if one is used, it must contain
  3470.                a string which the program can evaluate in location BX.
  3471.                VP-Info places a NUL (zero byte) after the string as a
  3472.                terminator; if the program processes characters until a zero
  3473.                is encountered in a byte, the entire string has been
  3474.                processed.  Any part of the string following the NUL is
  3475.                ignored by VP-Info.
  3476.  
  3477.  
  3478.  
  3479.  
  3480.      CALL                           VPI  VPIN                          CALL
  3481.  
  3482.      SR-Info/VP-Info Reference Manual          Page 167          SECTION 4
  3483.  
  3484.  
  3485.  
  3486.           4.   The maximum length of a VP-Info string is 254 bytes;
  3487.                therefore, no more than 254 characters can be communicated
  3488.                to or from a binary program.
  3489.  
  3490.           5.   The BIN program cannot change the memory allocation of the
  3491.                argument variable. Therefore, it cannot successfully enlarge
  3492.                the argument string. It can shorten the result by
  3493.                terminating the result with a NUL (zero byte).
  3494.  
  3495.           6.   Sufficient space to load binary files must be provided with
  3496.                the BINSPACE= command in the VPI.SET or VPIN.SET file; and
  3497.                no more than eight binary files may be loaded at any one
  3498.                time.  BIN files can be removed from memory with the
  3499.                BINUNLOAD command.
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.      CALL                           VPI  VPIN                          CALL
  3541.  
  3542.      SR-Info/VP-Info Reference Manual          Page 168          SECTION 4
  3543.  
  3544.  
  3545.  
  3546.                                      CANCEL
  3547.  
  3548.      Leave SR-Info/VP-Info program.
  3549.  
  3550.      ╔════════════════════════════════════════════════════════════════════╗
  3551.      ║ CANCEL                                                             ║
  3552.      ╚════════════════════════════════════════════════════════════════════╝
  3553.  
  3554.           The command CANCEL aborts the SR-Info/VP-Info program and enters
  3555.      the interactive mode; the SR-Info/VP-Info prompt appears.  See also
  3556.      QUIT.
  3557.  
  3558.           Example:
  3559.  
  3560.           A SR-Info/VP-Info program segment:
  3561.  
  3562.      CASE ans='8'
  3563.         QUIT
  3564.      CASE ans='9'
  3565.         CANCEL
  3566.  
  3567.           If the user chooses to go into SR-Info/VP-Info (option 9), show
  3568.      the SR-Info/VP-Info prompt.  Option 8 exits to the operating system.
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.      CANCEL                      SRI  VPI  VPIN                      CANCEL
  3601.  
  3602.      SR-Info/VP-Info Reference Manual          Page 169          SECTION 4
  3603.  
  3604.  
  3605.  
  3606.                                       CASE
  3607.  
  3608.      The switch in the DO CASE program structure.
  3609.  
  3610.      ╔════════════════════════════════════════════════════════════════════╗
  3611.      ║ CASE <cond>                                                        ║
  3612.      ║                                                                    ║
  3613.      ║ <cond>  if this condition is satisfied, the following program      ║
  3614.      ║           segment should be executed                               ║
  3615.      ╚════════════════════════════════════════════════════════════════════╝
  3616.  
  3617.           CASE is the keyword in the DO CASE program structure.
  3618.      SR-Info/VP-Info evaluates the condition; if the condition is true, the
  3619.      following program segment is executed.  The program segment is
  3620.      terminated by the next CASE, by OTHERWISE, or by ENDCASE.  After the
  3621.      execution of the program segment, the program execution continues with
  3622.      the program line after the ENDCASE command.  If the condition is
  3623.      false, SR-Info/VP-Info looks for the next CASE command.  If no
  3624.      condition is true, SR-Info/VP-Info executes the program segment
  3625.      following the OTHERWISE command (if any).
  3626.  
  3627.           Note that when more than one <cond> is true in a DO CASE
  3628.      structure, only the program segment for the first is executed.
  3629.  
  3630.           See the command DO CASE.
  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.      CASE                        SRI  VPI  VPIN                        CASE
  3661.  
  3662.      SR-Info/VP-Info Reference Manual          Page 170          SECTION 4
  3663.  
  3664.  
  3665.  
  3666.                                      CHAIN
  3667.  
  3668.      Leave the current SR-Info/VP-Info program and start running a new
  3669.      SR-Info/VP-Info program.
  3670.  
  3671.      ╔════════════════════════════════════════════════════════════════════╗
  3672.      ║ CHAIN <program>                                                    ║
  3673.      ║                                                                    ║
  3674.      ║ <program>   the name of the SR-Info/VP-Info program to be run      ║
  3675.      ╚════════════════════════════════════════════════════════════════════╝
  3676.  
  3677.           The command CHAIN is used for executing a SR-Info/VP-Info program
  3678.      from within another SR-Info/VP-Info program or in the interactive mode
  3679.      from the SR-Info/VP-Info prompt.  The program name <program> should
  3680.      not have an extension.  If there is a compiled program by this name
  3681.      (normal extension CPL; runtime extension RPL), it will be run.  If
  3682.      there is none, SR-Info/VP-Info will run the uncompiled program
  3683.      (extension PRG).
  3684.  
  3685.           CHAIN does a CLEAR first, except that all global memory variables
  3686.      are preserved and passed to the <program>; to use them, the <program>
  3687.      must have a GLOBAL command declaring the variables.  (See the commands
  3688.      CLEAR and GLOBAL.)
  3689.  
  3690.           The CHAIN command does not return to the calling program;  the
  3691.      program in memory is replaced by the program it chains to.
  3692.  
  3693.           CHAIN is the most efficient way for one program to call another.
  3694.      The DO command calls a subroutine from the disk.  DO can often be
  3695.      replaced by PERFORM or by CHAIN.  (See the commands DO and PERFORM.
  3696.  
  3697.           When you chain from one program to another, SR-Info/VP-Info
  3698.      executes a CLEAR command before the start of the program, closing all
  3699.      the data files, index files, sequential files, and releasing all (but
  3700.      the global) variables. When you DO one program from another, the
  3701.      subroutine you do inherits the existing environment -- memory
  3702.      variables, data files, index files, etc. -- and returns to the DOing
  3703.      program when completed or when a RETURN command is executed.
  3704.  
  3705.           CHAIN allows the program name to be a macro.
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720.      CHAIN                       SRI  VPI  VPIN                       CHAIN
  3721.  
  3722.      SR-Info/VP-Info Reference Manual          Page 171          SECTION 4
  3723.  
  3724.  
  3725.           Example:
  3726.  
  3727.      DO CASE
  3728.      CASE ans='1'
  3729.         CHAIN prog1
  3730.      CASE ans='2'
  3731.         CHAIN prog2
  3732.      CASE ans='3'
  3733.         CHAIN prog3
  3734.      ENDCASE
  3735.  
  3736.           This program segment chains to three different programs,
  3737.      depending on the value of ANS.
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  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.      CHAIN                       SRI  VPI  VPIN                       CHAIN
  3781.  
  3782.      SR-Info/VP-Info Reference Manual          Page 172          SECTION 4
  3783.  
  3784.  
  3785.  
  3786.  
  3787.                                      CLEAR
  3788.  
  3789.      Close all data files and index files, and clear memory variables.
  3790.      Optionally clear current Get Table or keyboard buffer.
  3791.  
  3792.      ╔════════════════════════════════════════════════════════════════════╗
  3793.      ║ CLEAR [GETS/KEYBOARD]                                              ║
  3794.      ╟────────────────────────────────────────────────────────────────────╢
  3795.      ║ Options:                                                           ║
  3796.      ║                                                                    ║
  3797.      ║ GETS           clear the Get Table from memory                     ║
  3798.      ║ KEYBOARD       delete all characters from the keyboard buffer      ║
  3799.      ║                   buffer                                           ║
  3800.      ╚════════════════════════════════════════════════════════════════════╝
  3801.  
  3802.           The CLEAR command with no options closes all open data files and
  3803.      index files,  and releases all memory variables, including the matrix
  3804.      variables.  (Sequential files, DOS files, system variables, and in
  3805.      particular, function keys, are not effected).
  3806.  
  3807.           Example:
  3808.  
  3809.      1>a=2
  3810.      1>name='David Barberr'
  3811.      1>avco='clear'
  3812.      1>LIST MEMORY
  3813.  
  3814.      Name          Type    Width    Contents
  3815.      A               N       8      2
  3816.      NAME            C      13      David Barberr
  3817.      AVCO            C       5      clear
  3818.      ** Total **  3  Variables used  26  Bytes used
  3819.      1>CLEAR
  3820.      1>LIST MEMORY
  3821.  
  3822.      Name          Type    Width    Contents
  3823.      ** Total **  0  Variables used  0  Bytes used
  3824.  
  3825.           CLEAR GETS removes the current Get Table from memory.  (See READ
  3826.      and ON FIELD commands.)
  3827.  
  3828.           CLEAR KEYBOARD eliminates any characters held in the keyboard
  3829.      buffer.  Normally, characters typed at the keyboard are stored in a
  3830.      special buffer until SR-Info/VP-Info in ready to process them, but
  3831.      occasionally the programmer will want to be sure nothing is in the
  3832.      buffer before executing certain commands.  For example, CLEAR KEYBOARD
  3833.      before executing the MENU() function to ensure that a key pressed
  3834.      earlier in the program, or even in a previous program, does not
  3835.      inadvertently trigger a menu selection.
  3836.  
  3837.  
  3838.  
  3839.  
  3840.      CLEAR                       SRI  VPI  VPIN                       CLEAR
  3841.  
  3842.      SR-Info/VP-Info Reference Manual          Page 173          SECTION 4
  3843.  
  3844.  
  3845.  
  3846.           Caution to dBASE programmers: The CLEAR command in dBASE III and
  3847.           later versions erases the screen, but its function on
  3848.           SR-Info/VP-Info is radically different.  To clear the screen, use
  3849.           the CLS command.
  3850.  
  3851.  
  3852.  
  3853.  
  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.      CLEAR                       SRI  VPI  VPIN                       CLEAR
  3901.  
  3902.      SR-Info/VP-Info Reference Manual          Page 174          SECTION 4
  3903.  
  3904.  
  3905.  
  3906.                                      CLOSE
  3907.  
  3908.      Close the selected file.
  3909.  
  3910.      ╔════════════════════════════════════════════════════════════════════╗
  3911.      ║ CLOSE [ALL]                                                        ║
  3912.      ╟────────────────────────────────────────────────────────────────────╢
  3913.      ║ Option:                                                            ║
  3914.      ║                                                                    ║
  3915.      ║ ALL            close all data files in use                         ║
  3916.      ╚════════════════════════════════════════════════════════════════════╝
  3917.  
  3918.           The CLOSE command closes the selected data file, updates all
  3919.      information to the disk, and releases the data record buffer space
  3920.      (see Appendix A.1) used by this file. Any index files attached to the
  3921.      data file are also closed, and any limits, relations and filters
  3922.      associated with the data file are cleared.
  3923.  
  3924.           With the option ALL, all data files in use are closed.
  3925.  
  3926.           Examples:
  3927.  
  3928.      1>CLOSE
  3929.      1>CLOSE#3
  3930.      1>CLOSE ALL
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.      CLOSE                       SRI  VPI  VPIN                       CLOSE
  3961.  
  3962.      SR-Info/VP-Info Reference Manual          Page 175          SECTION 4
  3963.  
  3964.  
  3965.  
  3966.                                       CLS
  3967.  
  3968.      Erase screen.
  3969.  
  3970.      ╔════════════════════════════════════════════════════════════════════╗
  3971.      ║ CLS [<line1>,<line2>]                                              ║
  3972.      ╟────────────────────────────────────────────────────────────────────╢
  3973.      ║ Option:                                                            ║
  3974.      ║                                                                    ║
  3975.      ║ <line1>,<line2>   erase from line1 to line2                        ║
  3976.      ╚════════════════════════════════════════════════════════════════════╝
  3977.  
  3978.           This command erases the screen, and is a synonym for ERASE.
  3979.  
  3980.           If, optionally, two numeric expressions, line1 and line2, are
  3981.      given, it erases line1 and line2, and all lines between, if any.
  3982.      These expressions should have values between 0 and 24.
  3983.  
  3984.           CLS is the same as the following three commands:
  3985.  
  3986.      ERASE
  3987.      CLS 0,24
  3988.      ERASE 0,24
  3989.  
  3990.           Examples:
  3991.  
  3992.      1>CLS
  3993.      1>CLS 2,4
  3994.      1>CLS 12,12
  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.      CLS                         SRI  VPI  VPIN                         CLS
  4021.  
  4022.      SR-Info/VP-Info Reference Manual          Page 176          SECTION 4
  4023.  
  4024.  
  4025.  
  4026.                                      COLOR
  4027.  
  4028.      Set the color attributes of a box on the screen.
  4029.  
  4030.      ╔════════════════════════════════════════════════════════════════════╗
  4031.      ║ COLOR <attrib>,<line1>,<col1>,<line2>,<col2>[,<fillchar>]          ║
  4032.      ║                                                                    ║
  4033.      ║ <attrib>       numeric expression between 0 and 255, the attribute ║
  4034.      ║ <line1>,<col1> the position of the upper-left corner of the box    ║
  4035.      ║ <line2>,<col2> the position of the lower-right corner of the box   ║
  4036.      ╟────────────────────────────────────────────────────────────────────╢
  4037.      ║ Option:                                                            ║
  4038.      ║                                                                    ║
  4039.      ║ <fillchar>     the ASCII number of the character used to fill the  ║
  4040.      ║                 colored area; every character position enclosed    ║
  4041.      ║                 in the area described by the row and column values ║
  4042.      ║                 is changed to the fill character                   ║
  4043.      ╚════════════════════════════════════════════════════════════════════╝
  4044.  
  4045.           Every character displayed on the screen has an attribute byte
  4046.      that determines how the character is displayed.  For monochrome
  4047.      monitors, the character may be bold, underlined, reverse, and so on.
  4048.      For color monitors, both the background and the character has color.
  4049.      These attribute bytes are set for a rectangular area by this command.
  4050.  
  4051.           The area is given by four numeric expressions -- line1, col1,
  4052.      line2, col2 -- as in the BOX and WINDOW commands.  The values must be
  4053.      separated by commas.
  4054.  
  4055.           For color monitors, compute ATTRIB by adding up (up to) four
  4056.      numbers: background+foreground+blink+brightness from the following
  4057.      tables:
  4058.  
  4059.           background         0  - black
  4060.                             16  - blue
  4061.                             32  - green
  4062.                             48  - cyan
  4063.                             64  - red
  4064.                             80  - magenta
  4065.                             96  - brown
  4066.                            112  - white
  4067.  
  4068.           foreground         0  - black
  4069.                              1  - blue
  4070.                              2  - green
  4071.                              3  - cyan
  4072.                              4  - red
  4073.                              5  - magenta
  4074.                              6  - brown
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.      COLOR                       SRI  VPI  VPIN                       COLOR
  4081.  
  4082.      SR-Info/VP-Info Reference Manual          Page 177          SECTION 4
  4083.  
  4084.  
  4085.                              7  - white
  4086.  
  4087.           blink              0  - no blink
  4088.                            128  - blink
  4089.  
  4090.           brightness         0  - normal
  4091.                              8  - intense
  4092.  
  4093.           For monochrome monitors the five important numbers are:
  4094.  
  4095.           standard white on black:   7
  4096.           underline:                 1
  4097.           reverse video:           112
  4098.  
  4099.           to get bold:         add   8
  4100.           to make it blink:    add 128
  4101.  
  4102.           See also SET COLOR TO <num exp> and :COLOR=<num exp>, which set
  4103.      the attribute bytes of the characters displayed.  SET COLOR TO 0 turns
  4104.      the command off: the attribute bytes remain unchanged at the displaced
  4105.      locations.  If a part of the screen already has attributes set by the
  4106.      COLOR command and SET COLOR TO 0, the newly displayed characters will
  4107.      keep the attributes set by the COLOR command.
  4108.  
  4109.           When filling an area with a fill character, as is often done in
  4110.      designing sign-on screens for example, the pattern characters 176 to
  4111.      178 and the solid reverse character 219 are especially useful.
  4112.  
  4113.           Examples:
  4114.  
  4115.           1.
  4116.  
  4117.      1>COLOR 20,2,0,12,79
  4118.  
  4119.      sets background blue and foreground red in lines 2 to 12.
  4120.  
  4121.           2.
  4122.  
  4123.      1>back=80
  4124.      1>foregrnd=1
  4125.      1>bright=8
  4126.      1>line=2
  4127.      1>col=0
  4128.      1>x=18
  4129.      1>y=50
  4130.      1>COLOR back+foregrnd+bright,line,col,line+x,col+y
  4131.  
  4132.           3.
  4133.  
  4134.      1>COLOR 17,2,10,4,12
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.      COLOR                       SRI  VPI  VPIN                       COLOR
  4141.  
  4142.      SR-Info/VP-Info Reference Manual          Page 178          SECTION 4
  4143.  
  4144.  
  4145.  
  4146.      underlines the text in a small box three lines deep and 3 characters
  4147.      wide on a monochrome monitor.
  4148.  
  4149.           4. The following program illustrates the use of the COLOR command
  4150.      on a color monitor:
  4151.  
  4152.      DIM NUM matrix[10]
  4153.      REPEAT 10 TIMES VARYING i
  4154.         matrix[i]=MOD(i,7)*16+7
  4155.      ENDREPEAT
  4156.      ERASE
  4157.      REPEAT 10 TIMES VARYING i
  4158.         COLOR matrix[i], 12-i, i*5, 12+i, 10+i*5
  4159.         DELAY .5
  4160.      ENDREPEAT
  4161.      ERASE
  4162.      COLOR 23, 0, 0, 24, 79
  4163.      REPEAT 10 TIMES VARYING i
  4164.         BOX 1+i, 7+i*3, 23-i, 73-i*3
  4165.         DELAY .15
  4166.      ENDREPEAT
  4167.      REPEAT 10 TIMES VARYING i
  4168.         COLOR matrix[i], 1+i, 7+i*3, 23-i, 73-i*3
  4169.         DELAY .5
  4170.      ENDREPEAT
  4171.  
  4172.           5. All output to an area of the screen may be made invisible by
  4173.      making the background and the foreground color the same.  For example,
  4174.  
  4175.      SET COLOR TO 0
  4176.      COLOR 0,10,0,13,79
  4177.  
  4178.      turns rows 10 to 13 to black on black.  Editing fields for entering
  4179.      passwords may be so protected.
  4180.  
  4181.           6. A set of overlapping frames can be created with pattern
  4182.      characters used as fill:
  4183.  
  4184.      COLOR 7,10,10,16,70,176    ;a shadow pattern
  4185.      COLOR 7,09,09,15,69,219    ;a solid pattern
  4186.      COLOR 7,10,10,14,69,32     ;fill with blanks to create area for text
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.      COLOR                       SRI  VPI  VPIN                       COLOR
  4201.  
  4202.      SR-Info/VP-Info Reference Manual          Page 179          SECTION 4
  4203.  
  4204.  
  4205.  
  4206.                                     COMPILE
  4207.  
  4208.      Compile a SR-Info/VP-Info program.
  4209.  
  4210.      ╔════════════════════════════════════════════════════════════════════╗
  4211.      ║ COMPILE <file> [LINK]                                              ║
  4212.      ║                                                                    ║
  4213.      ║ <file>  the name of the program file                               ║
  4214.      ╟────────────────────────────────────────────────────────────────────╢
  4215.      ║ Option:                                                            ║
  4216.      ║                                                                    ║
  4217.      ║ LINK    If SET DO OFF, causes COMPILE to work as if SET DO ON      ║
  4218.      ╚════════════════════════════════════════════════════════════════════╝
  4219.  
  4220.           The COMPILE command may be given in interactive mode, or in a
  4221.      program:
  4222.  
  4223.      1>COMPILE prog
  4224.  
  4225.      where PROG is a file with PRG extension, the source program to be
  4226.      compiled.  <file> cannot be a macro, and should not have any extension
  4227.      specified.
  4228.  
  4229.           If you wish to compile many programs in one step, create a
  4230.      program (call it, say, PROJ.PRG) as follows:
  4231.  
  4232.      COMPILE prog1
  4233.      COMPILE prog2
  4234.      COMPILE prog3
  4235.  
  4236.           Then
  4237.  
  4238.      1>DO proj
  4239.  
  4240.      will compile PROG1, PROG2, PROG3.  Such a program should not use any
  4241.      memory variables, since a CLEAR is executed before every COMPILE
  4242.      command.
  4243.  
  4244.           SET ECHO ON to have all program lines displayed as they are
  4245.      compiled.
  4246.  
  4247.           See also Section 1.
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.      COMPILE                     SRI  VPI  VPIN                     COMPILE
  4261.  
  4262.      SR-Info/VP-Info Reference Manual          Page 180          SECTION 4
  4263.  
  4264.  
  4265.  
  4266.                                     CONTINUE
  4267.  
  4268.      Continue to LOCATE from the current record.
  4269.  
  4270.      ╔════════════════════════════════════════════════════════════════════╗
  4271.      ║ CONTINUE                                                           ║
  4272.      ╚════════════════════════════════════════════════════════════════════╝
  4273.  
  4274.           CONTINUE will carry on locating from the current record using the
  4275.      condition of the last LOCATE command.  (See the LOCATE command.)
  4276.  
  4277.           Note that the standard strings stored in function key F8 combines
  4278.      a CONTINUE and an EDIT command.  Once a LOCATE has been executed
  4279.      (function key F8), each additional matching record can be edited by
  4280.      pressing F8.
  4281.  
  4282.           Example:
  4283.  
  4284.      1>LOCATE FOR name<'S'
  4285.      1>EDIT
  4286.      1>CONTINUE
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.      CONTINUE                    SRI  VPI  VPIN                    CONTINUE
  4321.  
  4322.      SR-Info/VP-Info Reference Manual          Page 181          SECTION 4
  4323.  
  4324.  
  4325.  
  4326.                                       COPY
  4327.  
  4328.      Copy selected records of the selected file into a new file.
  4329.  
  4330.      ╔════════════════════════════════════════════════════════════════════╗
  4331.      ║ COPY [<scope>] TO <file> [FIELDS <field list> [FOR <cond>] [SDF/   ║
  4332.      ║       SDF DELIMITED [WITH <char>]]                                 ║
  4333.      ║                                                                    ║
  4334.      ║ <file> is the name of the file the records are copied to           ║
  4335.      ╟────────────────────────────────────────────────────────────────────╢
  4336.      ║ Options:                                                           ║
  4337.      ║                                                                    ║
  4338.      ║ <scope>                     select records by scope                ║
  4339.      ║                                (default scope: ALL)                ║
  4340.      ║ FIELDS <field list>         copy only selected fields              ║
  4341.      ║ FOR <cond>                  select records by condition            ║
  4342.      ║ SDF                         copy into sequential file              ║
  4343.      ║ SDF DELIMITED               separate fields by commas              ║
  4344.      ║ SDF DELIMITED [WITH <char>] separate fields by specified character ║
  4345.      ╚════════════════════════════════════════════════════════════════════╝
  4346.  
  4347.           The command COPY is used for moving records from the selected
  4348.      file to a new file, <file>; if a file by the name <file> already
  4349.      exists, it will be overwritten.
  4350.  
  4351.           If the SDF option is not used, the result will be a data file
  4352.      with the default extension DBF and the same structure as the source
  4353.      file, unless the FIELDS keyword is used with a fields list.
  4354.  
  4355.           When the SDF option is used, the result is a text file, with the
  4356.      default extension TXT.  When the DELIMITED keyword is not used, each
  4357.      record (or its selected fields) becomes one line in a sequential file;
  4358.      the fields are all merged.
  4359.  
  4360.           With the SDF DELIMITED option, the fields are separated by
  4361.      commas, and strings are enclosed in single quotes ('). A different
  4362.      string delimiter can be specified with the WITH clause: example WITH
  4363.      |.  The specified delimiter character is not enclosed in quotes.
  4364.  
  4365.           For a discussion of the SDF option, see the command APPEND FROM.
  4366.  
  4367.           Examples:
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.      COPY                        SRI  VPI  VPIN                        COPY
  4381.  
  4382.      SR-Info/VP-Info Reference Manual          Page 182          SECTION 4
  4383.  
  4384.  
  4385.      1>USE employee
  4386.      1>COPY TO empl1
  4387.            6 COPY(S)
  4388.      1>USE empl1
  4389.      1>DELETE 5
  4390.            1 DELETE(S)
  4391.      1>COPY TO empl3
  4392.            5 COPY(S)                  note: deleted records are not copied
  4393.      1>RECALL ALL
  4394.      1>COPY TO empl4 FOR salary <25000 .AND. year_emp>1980
  4395.            1 COPY(S)
  4396.      1>COPY TO empl4 FOR salary <25000 SDF DELIMITED WITH |
  4397.            1 COPY(S)
  4398.  
  4399.           The result of the last command is a sequential file EMPL4.TXT
  4400.      with one line as follows:
  4401.  
  4402.      |Marek|,|Mark|,|231R|,|Broomsdale|,|MD|,|02110|,|566-7012|,|y|,
  4403.      |11500|,|1984|,|Maintenance|
  4404.  
  4405.      1>COPY TO empl5 FOR salary <25000 FIELDS name,fname SDF DELIMITED WITH |
  4406.            1 COPY(S)
  4407.  
  4408.           The result of the last command is a sequential file EMPL5.TXT
  4409.      with one line as follows:
  4410.  
  4411.      |Marek|,|Mark|
  4412.  
  4413.  
  4414.  
  4415.  
  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.      COPY                        SRI  VPI  VPIN                        COPY
  4441.  
  4442.      SR-Info/VP-Info Reference Manual          Page 183          SECTION 4
  4443.  
  4444.  
  4445.  
  4446.                                  COPY STRUCTURE
  4447.  
  4448.      Create a new file with the structure of the selected file.
  4449.  
  4450.      ╔════════════════════════════════════════════════════════════════════╗
  4451.      ║ COPY STRUCTURE TO <file> [FIELDS <field list>]                     ║
  4452.      ║                                                                    ║
  4453.      ║ <file>      the name of the new file                               ║
  4454.      ╟────────────────────────────────────────────────────────────────────╢
  4455.      ║ Option:                                                            ║
  4456.      ║                                                                    ║
  4457.      ║ FIELDS <field list>     copy only these fields                     ║
  4458.      ╚════════════════════════════════════════════════════════════════════╝
  4459.  
  4460.           The command COPY STRUCTURE creates a new data file with the same
  4461.      fields as the selected file, but with no records.  The default
  4462.      extension is DBF.
  4463.  
  4464.           If the FIELDS option is used, the new structure will contain only
  4465.      the fields listed.
  4466.  
  4467.           Example:
  4468.  
  4469.      1>USE employee
  4470.      1>COPY STRUCTURE TO emp1
  4471.      1>COPY STRUCTURE TO emp2 FIELDS name,fname,salary,married
  4472.      1>USE empl2
  4473.      1>LIST STRUCTURE
  4474.      Data file:           EMPL2.DBF
  4475.      Number of records:       0
  4476.      File number:             1
  4477.      Field   Name       Type Width   Dec
  4478.        1     NAME         C     15
  4479.        2     FNAME        C     10
  4480.        3     SALARY       N      9      2
  4481.        4     MARRIED      L      1
  4482.      ** Record Length **        36
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.      COPY STRUCTURE              SRI  VPI  VPIN              COPY STRUCTURE
  4501.  
  4502.      SR-Info/VP-Info Reference Manual          Page 184          SECTION 4
  4503.  
  4504.  
  4505.  
  4506.                                      COUNT
  4507.  
  4508.      Count selected records.
  4509.  
  4510.      ╔════════════════════════════════════════════════════════════════════╗
  4511.      ║ COUNT [<scope>] [TO <memvar>] [FOR <cond>]                         ║
  4512.      ╟────────────────────────────────────────────────────────────────────╢
  4513.      ║ Options:                                                           ║
  4514.      ║                                                                    ║
  4515.      ║ <scope>      select by scope (default scope: ALL)                  ║
  4516.      ║ TO <memvar>  store result in memory variable                       ║
  4517.      ║ FOR <cond>   select by condition                                   ║
  4518.      ╚════════════════════════════════════════════════════════════════════╝
  4519.  
  4520.           This command counts the number of records that meet the selection
  4521.      criteria.  Selection is by scope and/or by condition.  The result may
  4522.      be stored in a numeric memory variable; if the variable does not
  4523.      exist, this command creates it.
  4524.  
  4525.           <memvar> cannot be a numeric matrix variable.
  4526.  
  4527.           The result of the command COUNT is displayed if SET TALK ON, as
  4528.      in the examples below.
  4529.  
  4530.           Examples:
  4531.  
  4532.      1>USE employee
  4533.      1>COUNT
  4534.            6 COUNT(S)
  4535.      1>GO TOP
  4536.      1>COUNT NEXT 3 FOR name < 'O'
  4537.            2 COUNT(S)
  4538.      1>GO TOP
  4539.      1>COUNT FOR salary < 50000 TO raise
  4540.      1>? raise
  4541.           5.00
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.      COUNT                       SRI  VPI  VPIN                       COUNT
  4561.  
  4562.      SR-Info/VP-Info Reference Manual          Page 185          SECTION 4
  4563.  
  4564.  
  4565.  
  4566.                                      CREATE
  4567.  
  4568.      Create a new data file.
  4569.  
  4570.      ╔════════════════════════════════════════════════════════════════════╗
  4571.      ║ CREATE <file>                                                      ║
  4572.      ║                                                                    ║
  4573.      ║ <file>       the data file to create                               ║
  4574.      ╚════════════════════════════════════════════════════════════════════╝
  4575.  
  4576.           The command CREATE is used to make a new data file, <file>;
  4577.      <file> cannot be a macro.  (Do not use COMP for the first four letters
  4578.      of a data or index file; SR-Info/VP-Info is unable to open such a
  4579.      file.)
  4580.  
  4581.           File creation is a special form of full-screen editing.  Each
  4582.      field in the data file is represented by four editing fields.
  4583.  
  4584.           Editing keys:
  4585.  
  4586.  
  4587.      <Left> or Ctrl-S        moves the cursor back one character
  4588.      <Right> or Ctrl-D       moves the cursor forward one character
  4589.      Ctrl-<Left>             moves to the beginning of the editing field
  4590.      Ctrl-<Right>            moves to the end of the editing field
  4591.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  4592.                                 inserted  (normally, you are in overtype mode:
  4593.                                 what you type overtypes the existing text);
  4594.                                 pressing <Ins> or Ctrl-V again, puts you back
  4595.                                 into overtype mode
  4596.      <BACKSPACE>             deletes the character to the left of the cursor
  4597.      <Del> or Ctrl-G         deletes the character on the cursor
  4598.      Ctrl-Y                  deletes the rest of the editing field
  4599.  
  4600.      <Up> or Ctrl-E          moves the cursor to the previous editing field
  4601.      <Dn> or Ctrl-X          moves the cursor to the next editing field
  4602.  
  4603.      Ctrl-Q                  quits and does not create the file
  4604.      <End> or Ctrl-W         quits and creates the file
  4605.  
  4606.      Ctrl-K                  moves back to the top of the previous page
  4607.      Ctrl-L                  moves to the top of the next page
  4608.  
  4609.      Ctrl-N                  inserts a line for a new field
  4610.      Ctrl-T                  deletes the line describing a field
  4611.  
  4612.  
  4613.           SR-Info/VP-Info supports three separate type of data files as
  4614.      follows:
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.      CREATE                      SRI  VPI  VPIN                      CREATE
  4621.  
  4622.      SR-Info/VP-Info Reference Manual          Page 186          SECTION 4
  4623.  
  4624.  
  4625.  
  4626.           Type 1 - Compatible with VP-Info and MAX Type I files.  (MAX is
  4627.                an earlier versions of SR-Info and VP-Info Professional,
  4628.                also created by Sub Rosa Inc.)  Type I files can have up to
  4629.                256 fields in SR-Info and up to 500 fields in VP-Info
  4630.                Professional.
  4631.  
  4632.           Type 2 - Compatible with dBASE II data files, and are limited to
  4633.                32 fields.
  4634.  
  4635.           Type 3 - Compatible with dBASE III, dBASE III+ and dBASE IV data
  4636.                files.  Type III files can have up to 256 fields in SR-Info
  4637.                and up to 500 fields in VP-Info Professional, although dBASE
  4638.                III and dBASE III+ cannot read a data file with more than
  4639.                128 fields, and dBASE IV cannot read a data file with more
  4640.                than 255 fields.
  4641.  
  4642.           When all the fields are specified using the full-screen input
  4643.      display of the CREATE command, the user is asked to specify which type
  4644.      of file to create; the default is Type 3.
  4645.  
  4646.           If the data file already exists, you will be given the
  4647.      opportunity to delete it.  On a network with SET NETWORK ON in VP-Info
  4648.      Professional Network Edition, attempting to delete a data file while
  4649.      another user is accessing a file with the same name will cause a LOCK
  4650.      error.
  4651.  
  4652.  
  4653.           Example:
  4654.  
  4655.      1>CREATE custfile
  4656.  
  4657.      shows the following screen after all the fields have been entered:
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.      CREATE                      SRI  VPI  VPIN                      CREATE
  4681.  
  4682.      SR-Info/VP-Info Reference Manual          Page 187          SECTION 4
  4683.  
  4684.  
  4685.  
  4686. ──────────────────────────────────────────────────────────────────────────────
  4687. Sunday, August 12, 1990
  4688.                               SR-Info                      CUSTFILE.DBF
  4689. Name         Type    Width   Dec        Name         Type    Width   Dec
  4690. CUSTNUM       C        6      0         BIRTHDAY      C        6      0
  4691. FIRSTNAME     C       15      0         SS_NUM        C        9      0
  4692. LASTNAME      C       20      0         EMPL_NUM      C        6      0
  4693. ADDRESS       C       25      0
  4694. CITY          C       15      0
  4695. STATE         C        2      0
  4696. ZIP           C        9      0
  4697. HPHONE        C       10      0
  4698. WPHONE        C       10      0
  4699. SPOUSEFNAM    C       15      0
  4700. SPOUSENAME    C       20      0
  4701. DEPENDENTS    N        2      0
  4702. ┌─────────────────────────────────────────────────────────────────────────────┐
  4703. │ UP/DOWN           COLUMN MOVE  ROW             SAVE STRUCTURE    C..Strings │
  4704. │ previous. <PgUp>  left... ^K   insert... ^N    update... <End>   N..Numbers │
  4705. │ next..... <PgDn>  right.. ^L   delete... ^T    nochange. ^Q      L..Yes/No  │
  4706. └─────────────────────────────────────────────────────────────────────────────┘
  4707.  
  4708. ──────────────────────────────────────────────────────────────────────────────
  4709.  
  4710.  
  4711.           There are up to 12 fields described in each column, with four
  4712.      editing windows per field.  All the standard full-screen editing keys
  4713.      are available in CREATE, including Ctrl-K and Ctrl-L to move from
  4714.      column to column.
  4715.  
  4716.           As in BROWSE, <Pg Up> and <Pg Dn> are used to move from line to
  4717.      line, while <Up> and <Dn> are used to move between editing windows on
  4718.      the same line.
  4719.  
  4720.           Error checking is done by SR-Info/VP-Info as you enter the
  4721.      specifications for the new fields when you leave a line.  Here are
  4722.      some of the messages you may see:
  4723.  
  4724.         The first character of a field name must be a letter.
  4725.         Invalid character in the Name field.
  4726.         Name fields must be unique.
  4727.         Types:  C-character  N-numeric  L-logical  D-date  F-float  M-memo.
  4728.         Field Length must be greater than 0.
  4729.         Length of character field can not exceed 254.
  4730.         Length of numeric field can not exceed 20.
  4731.         Decimals cannot exceed 6.
  4732.         Decimals too large for length.
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.      CREATE                      SRI  VPI  VPIN                      CREATE
  4740.  
  4741.      SR-Info/VP-Info Reference Manual          Page 188          SECTION 4
  4742.  
  4743.  
  4744.  
  4745.           Caution for VP-Info Professional users:  Be sure you have set
  4746.           FIELDS= in the VPI.SET or VPIN.SET file to a number large enough
  4747.           to accommodate all the fields in all the data files you will ever
  4748.           have open at one time, plus the largest number of fields in any
  4749.           of these files.  Default is 320 fields.  See FIELDS=.
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.      CREATE                      SRI  VPI  VPIN                      CREATE
  4800.  
  4801.      SR-Info/VP-Info Reference Manual          Page 189          SECTION 4
  4802.  
  4803.  
  4804.  
  4805.                                      CURSOR
  4806.  
  4807.      Move the cursor to a given screen position.
  4808.  
  4809.      ╔════════════════════════════════════════════════════════════════════╗
  4810.      ║ CURSOR <row>,<col>                                                 ║
  4811.      ╚════════════════════════════════════════════════════════════════════╝
  4812.  
  4813.           CURSOR moves the current cursor position to a given point on the
  4814.      screen.  Combined with the ?? command, it gives the user all the
  4815.      absolute positioning control of the @ SAY command without its
  4816.      restrictions.
  4817.  
  4818.           CURSOR is usually employed when the MENU( function is used, to
  4819.      place the selection bar correctly.
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.      CURSOR                      SRI  VPI  VPIN                      CURSOR
  4860.      SR-Info/VP-Info Reference Manual           Page 190          SECTION 4
  4861.  
  4862.  
  4863.  
  4864.                                      DEBUG
  4865.  
  4866.      Print expression or expression list for debugging purposes.
  4867.  
  4868.      ╔════════════════════════════════════════════════════════════════════╗
  4869.      ║ DEBUG <exp list>                                                   ║
  4870.      ║                                                                    ║
  4871.      ║ <exp list>   the expressions to be displayed                       ║
  4872.      ╚════════════════════════════════════════════════════════════════════╝
  4873.  
  4874.           This command displays the expressions exactly as does the ?
  4875.      command.  However, if SET DEBUG OFF, the expressions are not
  4876.      displayed.  This may save the programmer the trouble of having to
  4877.      place the DEBUG commands in the program when debugging, and having to
  4878.      take them out for the regular running of the program.
  4879.  
  4880.           See SET DEBUG.
  4881.  
  4882.           Examples (in a program):
  4883.  
  4884.      DEBUG number
  4885.      DEBUG 'current amount: ', amount, '   current balance: ', balance
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.      DEBUG                       SRI  VPI  VPIN                       DEBUG
  4920.      SR-Info/VP-Info Reference Manual           Page 191          SECTION 4
  4921.  
  4922.  
  4923.                                      DELAY
  4924.  
  4925.      Suspend execution for a specified number of seconds.
  4926.  
  4927.      ╔════════════════════════════════════════════════════════════════════╗
  4928.      ║ DELAY <num exp>                                                    ║
  4929.      ║                                                                    ║
  4930.      ║ <num exp>    the number of seconds execution is to be delayed      ║
  4931.      ╚════════════════════════════════════════════════════════════════════╝
  4932.  
  4933.           This command suspends program execution for a specified number of
  4934.      seconds.
  4935.  
  4936.           The delay can be any length from .06 seconds upward. For
  4937.      programmers, this command can replace complex loops which often have
  4938.      the deficiency of varying in length depending on what type of computer
  4939.      the program is run on.
  4940.  
  4941.           Example:
  4942.  
  4943.      1>DELAY .5
  4944.      1>number=3
  4945.      1>DELAY number
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  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.      DELAY                       SRI  VPI  VPIN                       DELAY
  4980.      SR-Info/VP-Info Reference Manual           Page 192          SECTION 4
  4981.  
  4982.  
  4983.  
  4984.                                      DELETE
  4985.  
  4986.      Delete selected records from the selected data file.
  4987.  
  4988.      ╔════════════════════════════════════════════════════════════════════╗
  4989.      ║ DELETE [<scope>] [FOR <cond>]                                      ║
  4990.      ╟────────────────────────────────────────────────────────────────────╢
  4991.      ║ Options:                                                           ║
  4992.      ║                                                                    ║
  4993.      ║ <scope>        select by scope (default scope: current record)     ║
  4994.      ║ FOR <cond>     select by condition                                 ║
  4995.      ╚════════════════════════════════════════════════════════════════════╝
  4996.  
  4997.           The DELETE command is used to set the DELETED flag for records in
  4998.      the selected data file.
  4999.  
  5000.           These records can be recovered by the RECALL command or with
  5001.      Ctrl-U in the BROWSE and EDIT commands, provided SET DELETE is OFF.
  5002.  
  5003.           Deleted records are not "seen" by certain SR-Info/VP-Info
  5004.      commands irrespective of SET DELETE status, including: COPY, POST,
  5005.      UPDATE, SUM, AVERAGE, COUNT.
  5006.  
  5007.           To remove all the records with the deleted flag set, use the PACK
  5008.      command.  (See the commands: SET DELETE, RECALL, PACK.)
  5009.  
  5010.           Examples:
  5011.  
  5012.      1>USE employee
  5013.      1>COPY TO empl1
  5014.            6 COPY(S)
  5015.      1>USE#3 empl1
  5016.      1>DELETE RECORD 2
  5017.            1 DELETE(S)
  5018.      1>DELETE#3 RECORD 5
  5019.            1 DELETE(S)
  5020.      1>SKIP
  5021.      1>DELETE NEXT 3 FOR salary < 25000
  5022.            1 DELETE(S)
  5023.      1>PACK#3
  5024.            5 TOTAL PACKED
  5025.      1>PACK
  5026.            4 TOTAL PACKED
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.      DELETE                      SRI  VPI  VPIN                      DELETE
  5040.      SR-Info/VP-Info Reference Manual           Page 193          SECTION 4
  5041.  
  5042.  
  5043.  
  5044.                                   DELETE FILE
  5045.  
  5046.      Remove files from disk.
  5047.  
  5048.      ╔════════════════════════════════════════════════════════════════════╗
  5049.      ║ DELETE FILE <file>                                                 ║
  5050.      ║                                                                    ║
  5051.      ║ <file>      the name of the file to be deleted                     ║
  5052.      ╚════════════════════════════════════════════════════════════════════╝
  5053.  
  5054.           The DELETE FILE command deletes a file from the disk.  This
  5055.      command should be used with care because, once deleted, the file
  5056.      cannot be recovered.  If no extension is given, the extension DBF is
  5057.      assumed.  Wildcards are not permitted.
  5058.  
  5059.           On a network with SET NETWORK ON in VP-Info Professional Network
  5060.      Edition, attempting to delete a file while another user is accessing
  5061.      it will cause a LOCK error.
  5062.  
  5063.           Examples:
  5064.  
  5065.  
  5066.    1>DIR c*.dbf
  5067.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  5068.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  5069.    CUSTOMER.DBF     734 11-29-89 10:43p   CUST2.DBF        734  3-19-90  7:03p
  5070.  
  5071.    21940 bytes in 6 files.
  5072.    5246976 bytes remaining.
  5073.    1>DELETE FILE cust2
  5074.    1>DIR c*.dbf
  5075.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  5076.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  5077.    CUSTOMER.DBF     734 11-29-89 10:43p
  5078.  
  5079.    21206 bytes in 5 files.
  5080.    5251072 bytes remaining.
  5081.    734 characters were copied.
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.      DELETE FILE                 SRI  VPI  VPIN                 DELETE FILE
  5100.      SR-Info/VP-Info Reference Manual           Page 194          SECTION 4
  5101.  
  5102.  
  5103.  
  5104.                                       DIM
  5105.  
  5106.      Define a memory variable as a matrix.
  5107.  
  5108.      ╔════════════════════════════════════════════════════════════════════╗
  5109.      ║ DIM CHAR [<width>] <memvar>[x1,x2,x3],<memvar2>[y1,y2,y3],...      ║
  5110.      ║ DIM NUM <memvar>[x1,x2,x3],<memvar2>[y1,y2,y3],...                 ║
  5111.      ║ DIM LOG <memvar>[x1,x2,x3],<memvar2>[y1,y2,y3],...                 ║
  5112.      ║                                                                    ║
  5113.      ║ <memvar>, <memvar2>  the names of the memory variables that        ║
  5114.      ║                         are defined as matrices                    ║
  5115.      ╟────────────────────────────────────────────────────────────────────╢
  5116.      ║ Option:                                                            ║
  5117.      ║                                                                    ║
  5118.      ║ <width>   the width of the character variables                     ║
  5119.      ╚════════════════════════════════════════════════════════════════════╝
  5120.  
  5121.           Matrices of up to 3 dimensions can be defined for each of the
  5122.      three data types (CHARACTER, NUMERIC, LOGICAL).  The width of the
  5123.      entries of CHAR matrices is fixed; it is 10 if not specified by the
  5124.      user.
  5125.  
  5126.           Note that in the syntax description of DIM, [x1,x2,x3] does not
  5127.      indicate an option.  [ and ] must be present in a DIM command.  x1,
  5128.      x2, x3 are integer numbers greater than zero, not variables, up to
  5129.      three in number.
  5130.  
  5131.           Examples:
  5132.  
  5133.           One dimensional matrices (also called vectors):
  5134.  
  5135.      DIM CHAR a[12]
  5136.      DIM CHAR 20 a[12]
  5137.      DIM CHAR a[12],b[12]
  5138.      DIM NUM a[21]
  5139.      DIM LOG a[20]
  5140.  
  5141.           Two dimensional matrices (also called tables):
  5142.  
  5143.      DIM CHAR 25 first[10,20]
  5144.      DIM NUM second[5,20]
  5145.  
  5146.           Three dimensional matrixes:
  5147.  
  5148.      DIM CHAR 10 a[10,10,10]
  5149.      DIM NUM b[5,5,50]
  5150.  
  5151.           A mixed definition:
  5152.  
  5153.      DIM CHAR 12 a[50],b[2,2,12]
  5154.  
  5155.           Note that the width of both A and B is 12.
  5156.  
  5157.  
  5158.  
  5159.      DIM                         SRI  VPI  VPIN                         DIM
  5160.      SR-Info/VP-Info Reference Manual           Page 195          SECTION 4
  5161.  
  5162.  
  5163.  
  5164.           Matrix variables can be used just like all other memory variables
  5165.      except that only = and STORE can assign values to them.  Commands and
  5166.      functions that create memory variables (such as the command COUNT) or
  5167.      store values in existing memory variables (such as the command READ or
  5168.      the function READ() cannot directly use matrix variables. Matrix
  5169.      variables cannot be used in a TEXT structure or TEXT file.
  5170.  
  5171.           Matrix variables are stored in high memory (see Section A).  The
  5172.      size of a matrix is at most 64K.  Use the STATUS command to find out
  5173.      how much high memory is available.  Numeric variables take 8 bytes and
  5174.      logical variables take 2 bytes of memory for each entry.
  5175.  
  5176.           Notes: The numbering is from 1.  Matrices can be redimensioned in
  5177.      a program.  No part of a DIM command can be a macro.
  5178.  
  5179.           Examples:
  5180.  
  5181.                                            Memory use (in bytes)
  5182.      1>DIM CHAR 25 name[40]                      1,000
  5183.      1>DIM CHAR fill[10,7]                         700
  5184.      1>DIM NUM b[2,3],total[10,20,5]                48 and 8000
  5185.      1>DIM LOG abc[5000]                        10,000
  5186.  
  5187.      1>? name[14]
  5188.      GEORGE
  5189.      1>c=300
  5190.      1>? abc[c]
  5191.      F
  5192.      1>total[4,15,3]=total[3,15,3]*563.123
  5193.      1>DIM NUM money[10]
  5194.      1>USE employee
  5195.      1>SUM salary TO temp
  5196.      1>money[1]=temp
  5197.  
  5198.           The effect of SET WIDTH TO on displaying matrix variables:
  5199.  
  5200.  
  5201.      1>DIM NUM num[20]
  5202.      1>? num
  5203.           0.00      0.00      0.00      0.00      0.00      0.00      0.00
  5204.           0.00      0.00      0.00      0.00      0.00      0.00      0.00
  5205.           0.00      0.00      0.00      0.00      0.00      0.00
  5206.      1>SET WIDTH TO 30
  5207.      1>? num
  5208.           0.00      0.00      0.00
  5209.           0.00      0.00      0.00
  5210.           0.00      0.00      0.00
  5211.           0.00      0.00      0.00
  5212.           0.00      0.00      0.00
  5213.           0.00      0.00      0.00
  5214.           0.00      0.00
  5215.  
  5216.  
  5217.  
  5218.  
  5219.      DIM                         SRI  VPI  VPIN                         DIM
  5220.      SR-Info/VP-Info Reference Manual           Page 196          SECTION 4
  5221.  
  5222.  
  5223.  
  5224.                                       DIR
  5225.  
  5226.      Directory listing.
  5227.      ╔════════════════════════════════════════════════════════════════════╗
  5228.      ║ DIR [<pathname>][<file specification>]                             ║
  5229.      ╟────────────────────────────────────────────────────────────────────╢
  5230.      ║ Options:                                                           ║
  5231.      ║                                                                    ║
  5232.      ║ <pathname>            DOS directory name, with optional drive      ║
  5233.      ║                          letter and colon                          ║
  5234.      ║ <file specification>  a file name, with optional DOS windcards;    ║
  5235.      ║                          extension is required if present          ║
  5236.      ╚════════════════════════════════════════════════════════════════════╝
  5237.  
  5238.           This command is similar to the DIR command of the DOS operating
  5239.      system: it displays the list of files on the current disk, together
  5240.      with file size and date and time created or last modified.  Total size
  5241.      of all matching files is also given along with the bytes remaining on
  5242.      the disk.
  5243.  
  5244.           If a file name is given in full, the directory will show only
  5245.      that one file.
  5246.  
  5247.           A partial listing of the directory can be specified by giving a
  5248.      <file specification> with wild card characters.
  5249.  
  5250.           The wild card character ? may be replaced by any single
  5251.      character; the wild card character * allows any string.
  5252.  
  5253.           Examples:
  5254.  
  5255.  
  5256.    1>DIR
  5257.    SEN_NAME.NDX    1024 10-24-89  1:07a   SEN_NUM.NDX     1024 10-24-89  1:07a
  5258.    SEN_REIN.PRG     757  8-31-89 11:30p   SEN_SYST.DBF      53  9-06-89  9:02a
  5259.    SEN_ZIP.NDX     1024 10-24-89  1:07a   SUBDUE.ARC    342658 11-29-89  8:25p
  5260.    SUBDUE.PRG      2027 11-29-89  7:21p   SUBDUE2.PRG     1168 11-29-89  2:29a
  5261.  
  5262.    349735 bytes in 8 files.
  5263.    5251072 bytes remaining.
  5264.    1>dir \*.
  5265.    LIB           <DIR>   8-04-89  2:42p   MAX           <DIR>   8-04-89  1:27p
  5266.    RELTEST       <DIR>   8-06-89 10:27a   SILVERAD      <DIR>   8-07-89  2:32p
  5267.    SUPER         <DIR>   8-27-89  8:30p   TMP           <DIR>   8-04-89  1:28p
  5268.    V14           <DIR>   8-23-89  9:22p   VAWORK        <DIR>   8-04-89 12:09p
  5269.    MANUAL        <DIR>  10-30-89 10:53a   GEN           <DIR>  11-08-89 12:00a
  5270.  
  5271.    0 bytes in 10 files.
  5272.    5251072 bytes remaining.
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.      DIR                         SRI  VPI  VPIN                         DIR
  5280.      SR-Info/VP-Info Reference Manual           Page 197          SECTION 4
  5281.  
  5282.  
  5283.    1>DIR c*.dbf
  5284.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  5285.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  5286.    CUSTOMER.DBF     734 11-29-89 10:43p
  5287.  
  5288.    21206 bytes in 5 files.
  5289.    5251072 bytes remaining.
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.      DIR                         SRI  VPI  VPIN                         DIR
  5340.  
  5341.      SR-Info/VP-Info Reference Manual           Page 198          SECTION 4
  5342.  
  5343.  
  5344.  
  5345.                                       DIRF
  5346.  
  5347.      Directory listing, following redirection commands of the current FILES
  5348.      structure.
  5349.  
  5350.      ╔════════════════════════════════════════════════════════════════════╗
  5351.      ║ DIRF [<file specification>]                                        ║
  5352.      ╟────────────────────────────────────────────────────────────────────╢
  5353.      ║ Options:                                                           ║
  5354.      ║                                                                    ║
  5355.      ║ <file specification>  a file name, with optional DOS windcards;    ║
  5356.      ║                          extension is required if present          ║
  5357.      ╚════════════════════════════════════════════════════════════════════╝
  5358.  
  5359.           SR-Info/VP-Info provides for a FILES structure (see FILES) which
  5360.      lets you specify default drive letters and/or directories for the
  5361.      various files used by the programs.  Usually file types are grouped
  5362.      into individual directories according to "skeletons" constructed with
  5363.      wildcards.  For example:
  5364.  
  5365.      FILES
  5366.      *.dbf,\data\
  5367.      *.cpl,\cpl\
  5368.      *.ndx,\indexes\
  5369.      ENDFILES
  5370.  
  5371.           The DIRF command is similar to the DIR command, except that the
  5372.      file specification is compared to the existing FILES structure and, if
  5373.      a match is made, the redirection in the structure is applied to the
  5374.      file specification, so that the directory displayed is of the
  5375.      redirected directory, not the current directory.
  5376.  
  5377.           It displays a list of all matching files in that directory,
  5378.      together with file size and date and time created or last modified.
  5379.      Total size of all matching files is also given along with the bytes
  5380.      remaining on the current disk.
  5381.  
  5382.           If a file name is given in full, the directory will show only
  5383.      that one file.  The wild card character ? may be replaced by any
  5384.      single character; the wild card character * allows any string.
  5385.  
  5386.           Examples:
  5387.  
  5388.    1>DIRF *.dbf
  5389.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  5390.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  5391.    CUSTOMER.DBF     734 11-29-89 10:43p
  5392.  
  5393.    21206 bytes in 5 files.
  5394.    5251072 bytes remaining.
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.      FIRF                        SRI  VPI  VPIN                        DIRF
  5401.      SR-Info/VP-Info Reference Manual           Page 199          SECTION 4
  5402.  
  5403.  
  5404.  
  5405.                                     DISPLAY
  5406.  
  5407.      Display information, memory variables, system variables, file
  5408.      structure.
  5409.  
  5410.      ╔════════════════════════════════════════════════════════════════════╗
  5411.      ║ DISPLAY [<scope>] [FOR <cond>] [<exp list>] [OFF]                  ║
  5412.      ║ DISPLAY FILES [LIKE <skeleton>] [ON <drive letter>]                ║
  5413.      ║ DISPLAY MEMORY                                                     ║
  5414.      ║ DISPLAY STRUCTURE                                                  ║
  5415.      ║ DISPLAY SYSTEM                                                     ║
  5416.      ╟────────────────────────────────────────────────────────────────────╢
  5417.      ║ Options (for displaying data file records):                        ║
  5418.      ║                                                                    ║
  5419.      ║ <scope>            select by scope (default: the current record)   ║
  5420.      ║ FOR <cond>         select by condition                             ║
  5421.      ║ OFF                do not display the record number                ║
  5422.      ╟────────────────────────────────────────────────────────────────────╢
  5423.      ║ Options (for listing directories):                                 ║
  5424.      ║                                                                    ║
  5425.      ║ LIKE <skeleton>    the file specification, with optional wildcards ║
  5426.      ║ ON <drive letter>  a drive designation, with optional colon        ║
  5427.      ╚════════════════════════════════════════════════════════════════════╝
  5428.  
  5429.           These commands are exactly the same as the LIST commands except
  5430.      for the following differences: the default scope of the DISPLAY
  5431.      command is the current record rather than the whole file; the listing
  5432.      is stopped at the bottom of the screen or current window (about every
  5433.      20 lines when displaying data file contents).
  5434.  
  5435.           See the commands: LIST, LIST FILES, LIST MEMORY, LIST STRUCTURE,
  5436.      and LIST SYSTEM.
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.      DISPLAY                     SRI  VPI  VPIN                     DISPLAY
  5461.      SR-Info/VP-Info Reference Manual           Page 200          SECTION 4
  5462.  
  5463.  
  5464.  
  5465.                                        DO
  5466.  
  5467.      In a program, execute a subroutine and, on completion, return to the
  5468.      next command in the calling program; in Conversational
  5469.      SR-Info/VP-Info, equivalent to CHAIN.
  5470.  
  5471.      ╔════════════════════════════════════════════════════════════════════╗
  5472.      ║ DO <file>                                                          ║
  5473.      ║                                                                    ║
  5474.      ║ <file>   the name of the program called                            ║
  5475.      ╚════════════════════════════════════════════════════════════════════╝
  5476.  
  5477.           In Conversational SR-Info/VP-Info, DO is the same as CHAIN: it
  5478.      begins the execution of the compiled program with the name <file> with
  5479.      extension CPL; otherwise, the uncompiled SR-Info/VP-Info program
  5480.      <file> will be compiled "on the fly" and executed, and the compiled
  5481.      file immediately deleted from the disk.
  5482.  
  5483.           Note that an uncompiled program with a GLOBAL statement cannot be
  5484.      compiled on the fly if it needs to import variable values, since
  5485.      compile step includes a CLEAR command.
  5486.  
  5487.           In a program, the command DO <file> causes the program <file> to
  5488.      be compiled as a subroutine of the current program.  No matter how
  5489.      many subroutines are called, all will be compiled into the same CPL
  5490.      file as the calling program.  The subroutines become overlays; they
  5491.      are called into memory when needed.
  5492.  
  5493.           When the called program executes a RETURN command, the execution
  5494.      resumes in the current program with the line following the DO command.
  5495.  
  5496.           The called program can itself DO other subroutines.  There can be
  5497.      subroutines up to 10 levels.
  5498.  
  5499.           When a subroutine is compiled, all information about data files
  5500.      and memory variables is coded in the compiled form: the environment is
  5501.      compiled with the subroutine.  Contrast this with the CHAIN command
  5502.      that starts with a clean slate.
  5503.  
  5504.           Any time a subroutine is invoked with a DO, the called program
  5505.      becomes an overlay.  If a subroutine is called 5 times, it is compiled
  5506.      5 times.  This, of course, would make for very bulky programs.
  5507.  
  5508.           The solution of this problem is very simple.  If the subroutine
  5509.      TEST is not sensitive to the environment (it does not use any fields
  5510.      or memory variables, or all data files and memory variable names are
  5511.      the same throughout the calling program), DO it as follows:
  5512.  
  5513.      ...
  5514.      PERFORM STEST
  5515.      ...
  5516.      PERFORM STEST
  5517.  
  5518.  
  5519.  
  5520.      DO                          SRI  VPI  VPIN                          DO
  5521.      SR-Info/VP-Info Reference Manual           Page 201          SECTION 4
  5522.  
  5523.  
  5524.      ...
  5525.      *
  5526.      PROCEDURE STEST
  5527.         DO TEST
  5528.      ENDPROCEDURE
  5529.  
  5530.      This way, TEST becomes a single overlay; it is invoked with PERFORM
  5531.      STEST.
  5532.  
  5533.           Note: If the same subroutine is called from two places in the
  5534.      same program, but the two places have different environments, the
  5535.      subroutine cannot be called from a single procedure, and has to be
  5536.      compiled twice.
  5537.  
  5538.           For example, assume that TEST carries out some computation on
  5539.      some fields of the data file HISTORY1 and some memory variables, and
  5540.      then carries out the same computations on some fields of the data file
  5541.      HISTORY2 and some memory variables;  HISTORY1 is file 2, while
  5542.      HISTORY2 is file 3.
  5543.  
  5544.           Create two procedures:
  5545.  
  5546.      PROCEDURE TEST1
  5547.         SELECT 2
  5548.         DO TEST
  5549.      ENDPROCEDURE
  5550.      *
  5551.      PROCEDURE TEST2
  5552.         SELECT 3
  5553.         DO TEST
  5554.      ENDPROCEDURE
  5555.  
  5556.           Now if you need to invoke TEST with the first environment
  5557.      (HISTORY1), then PERFORM TEST1; otherwise, PERFORM TEST2.
  5558.  
  5559.           All procedures called by a subroutine must be contained in the
  5560.      PRG file of the subroutine.  A procedure of the calling program cannot
  5561.      have the same name as a procedure of the subroutine.  It is good
  5562.      programming practice not to have the same name for procedures and
  5563.      subroutines.
  5564.  
  5565.           Procedures are internally compiled, while subroutines become
  5566.      overlays.  Therefore, procedures are faster in execution.  However,
  5567.      there is a limit of 32 procedures in total for one CPL file.  See
  5568.      CHAIN and PERFORM.
  5569.  
  5570.           The name of the PRG file used with the DO command cannot be a
  5571.      macro.
  5572.  
  5573.           Example in Conversational SR-Info/VP-Info:
  5574.  
  5575.      DO INVOICE
  5576.  
  5577.  
  5578.  
  5579.  
  5580.      DO                          SRI  VPI  VPIN                          DO
  5581.      SR-Info/VP-Info Reference Manual           Page 202          SECTION 4
  5582.  
  5583.  
  5584.           This will execute INVOICE.CPL if present; otherwise it will
  5585.      compile and execute INVOICE.PRG, and then delete the CPL file.
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  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.      DO                          SRI  VPI  VPIN                          DO
  5641.      SR-Info/VP-Info Reference Manual           Page 203          SECTION 4
  5642.  
  5643.  
  5644.  
  5645.                                     DO CASE
  5646.  
  5647.      Switch the program flow to a number of cases.
  5648.  
  5649.      ╔════════════════════════════════════════════════════════════════════╗
  5650.      ║ DO CASE                                                            ║
  5651.      ╚════════════════════════════════════════════════════════════════════╝
  5652.  
  5653.           The command DO CASE provides for the processing of a number of
  5654.      options without the use of nested IF commands.  It is used in
  5655.      conjunction with the CASE, OTHERWISE, and ENDCASE commands.
  5656.  
  5657.           The DO CASE program structure is as follows:
  5658.  
  5659.      DO CASE
  5660.      CASE <cond1>
  5661.         <program segment1>
  5662.      CASE <cond2>
  5663.         <program segment2>
  5664.      ...
  5665.      CASE <condn>
  5666.         <program segmentn>
  5667.      OTHERWISE
  5668.         <program segment>
  5669.      ENDCASE
  5670.  
  5671.      where <cond1>, <cond2>, <cond3>,..., <condn> are conditions,  <program
  5672.      segment1>, <program segment2>,..., <program segmentn> and <program
  5673.      segment> are program segments, that is, any number of SR-Info/VP-Info
  5674.      program lines.
  5675.  
  5676.           Execution is as follows:
  5677.  
  5678.           After the DO CASE is encountered, SR-Info/VP-Info looks for the
  5679.      first CASE command and evaluates the condition; if the condition is
  5680.      true, the following program segment is executed, terminated by the
  5681.      next CASE, by OTHERWISE, or by ENDCASE.  After the execution of the
  5682.      program segment, the program execution continues with the program line
  5683.      after the ENDCASE command.
  5684.  
  5685.           If the condition is false, SR-Info/VP-Info looks for the next
  5686.      CASE command.  If no condition is true, SR-Info/VP-Info executes the
  5687.      program segment following the OTHERWISE command (if any).
  5688.  
  5689.           The OTHERWISE command is optional.  Note that if more than one
  5690.      condition holds, only the segment after the first true condition is
  5691.      executed.
  5692.  
  5693.           DO case commands can be nested up to 10 levels.
  5694.  
  5695.           Example:
  5696.  
  5697.  
  5698.  
  5699.  
  5700.      DO CASE                     SRI  VPI  VPIN                     DO CASE
  5701.      SR-Info/VP-Info Reference Manual           Page 204          SECTION 4
  5702.  
  5703.  
  5704.      ans2='P'
  5705.      @ 22,10 SAY 'E-edit  A-add  O-order  L-look  Q-quit ' GET ans2
  5706.      READ
  5707.      @ 22,10
  5708.      DO CASE
  5709.      CASE UPPER(ans2)='Q'
  5710.         picked=f
  5711.         ok=f
  5712.         LOOP
  5713.      CASE UPPER(ans2)='E'
  5714.         @ y,3 GET style
  5715.         @ y,10 GET color
  5716.         @ y,14 GET descript
  5717.         @ y,35 GET q1
  5718.         @ y,39 GET q2
  5719.         @ y,43 GET q3
  5720.         @ y,47 GET q4
  5721.         @ y,51 GET q5
  5722.         @ y,55 GET q6
  5723.         @ y,59 GET q7
  5724.         @ y,63 GET q8
  5725.         READ
  5726.         IF q1+q2+q3+q4+q5+q6+q7+q8=0
  5727.            DELETE
  5728.         ENDIF
  5729.         mpick=t
  5730.      CASE UPPER(ans2)='O'
  5731.         REPLACE type WITH 'O'
  5732.      ...
  5733.      OTHERWISE
  5734.         IF type='P'
  5735.            REPLACE type WITH 'O'
  5736.         ENDIF
  5737.         picked=f
  5738.      ENDCASE
  5739.  
  5740.           When editing with the internal SR-Info/VP-Info programming editor
  5741.      (see WRITE command), Alt-F reformats the file with all structures
  5742.      properly indented, making it easy to see unbalanced structures.
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.  
  5750.  
  5751.  
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.      DO CASE                     SRI  VPI  VPIN                     DO CASE
  5761.      SR-Info/VP-Info Reference Manual           Page 205          SECTION 4
  5762.  
  5763.  
  5764.  
  5765.                                     DO WHILE
  5766.  
  5767.      The standard program loop command.
  5768.  
  5769.      ╔════════════════════════════════════════════════════════════════════╗
  5770.      ║ DO WHILE <cond>                                                    ║
  5771.      ║                                                                    ║
  5772.      ║ <cond>      the condition controlling the loop                     ║
  5773.      ╚════════════════════════════════════════════════════════════════════╝
  5774.  
  5775.           The command DO WHILE starts the program loop.  The structure of
  5776.      the loop is as follows:
  5777.  
  5778.      DO WHILE <cond>
  5779.         <program segment>
  5780.      ENDDO
  5781.  
  5782.           Execution is as follows:
  5783.  
  5784.           After the DO WHILE is encountered, <cond> is evaluated.  If
  5785.      <cond> is true, the SR-Info/VP-Info program segment (terminated by the
  5786.      ENDDO) is executed; then <cond> is evaluated again.  If <cond> is
  5787.      false, execution continues with the command following ENDDO.
  5788.  
  5789.           There can be a DO WHILE command within a DO WHILE command; this
  5790.      is called nesting.  Many level of nesting is permitted; however, too
  5791.      many levels of nesting will give a compile-time error message: Stack
  5792.      overflow.
  5793.  
  5794.           There are two commands that facilitate moving to the top and the
  5795.      bottom of the loop: LOOP moves the execution to the top of the loop,
  5796.      and BREAK exits the loop.
  5797.  
  5798.           There is one more looping command in SR-Info/VP-Info: REPEAT.
  5799.      (See the commands BREAK, LOOP, REPEAT.)
  5800.  
  5801.           Examples:
  5802.  
  5803.           1. Typical DO WHILE to process all the records of a file:
  5804.  
  5805.      USE employee
  5806.      ERASE
  5807.      DO WHILE .NOT. EOF
  5808.         ? name, fname, tel_no
  5809.         SKIP
  5810.      ENDDO
  5811.  
  5812.           2. Typical DO WHILE for counting how many records to list:
  5813.  
  5814.      count=0
  5815.      USE records
  5816.      DO WHILE count<100
  5817.  
  5818.  
  5819.  
  5820.      DO WHILE                    SRI  VPI  VPIN                    DO WHILE
  5821.      SR-Info/VP-Info Reference Manual           Page 206          SECTION 4
  5822.  
  5823.  
  5824.         ? invoice_no,amount*qty
  5825.         SKIP
  5826.         count=count+1
  5827.      ENDDO
  5828.  
  5829.           When editing with the internal SR-Info/VP-Info programming editor
  5830.      (see WRITE command), Alt-F reformats the file with all structures
  5831.      properly indented, making it easy to see unbalanced structures.
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  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.      DO WHILE                    SRI  VPI  VPIN                    DO WHILE
  5881.      SR-Info/VP-Info Reference Manual           Page 207          SECTION 4
  5882.  
  5883.  
  5884.  
  5885.                                       EDIT
  5886.  
  5887.      Edit records in a data file.
  5888.  
  5889.      ╔════════════════════════════════════════════════════════════════════╗
  5890.      ║ EDIT [<recnum>] [FIELDS <field list> / OFF / TEXT <textfile>]      ║
  5891.      ╟────────────────────────────────────────────────────────────────────╢
  5892.      ║ Options                                                            ║
  5893.      ║                                                                    ║
  5894.      ║ <recnum>              begin EDIT on record number <recnum>         ║
  5895.      ║ FIELDS <field list>   the fields to be edited                      ║
  5896.      ║ TEXT <textfile>       erases the screen, displays the text file,   ║
  5897.      ║                          and then does EDIT using the text file    ║
  5898.      ║                          layout and embedded format pictures       ║
  5899.      ╟────────────────────────────────────────────────────────────────────╢
  5900.      ║ Options VP-Info Professional only                                  ║
  5901.      ║                                                                    ║
  5902.      ║ OFF                   rather than generate an EDIT input screen,   ║
  5903.      ║                          uses an exiting screen and its Get Table  ║
  5904.      ╚════════════════════════════════════════════════════════════════════╝
  5905.  
  5906.           The EDIT command without either the OFF or TEXT option allows the
  5907.      user to view and modify records in the selected file.  Once the
  5908.      command is given, the screen shows the current record (or the record
  5909.      optionally specified with <recnum>) in full-screen editing mode.
  5910.  
  5911.           If the FIELDS keyword and a fields list is specified, only those
  5912.      fields will be available during EDIT; otherwise, SR-Info/VP-Info
  5913.      builds an input screen using all fields in the current data file.
  5914.  
  5915.           To exit from EDIT, use <End> (or Ctrl-W) once you have filled in
  5916.      the fields of the last record desired.  To switch from EDIT to APPEND
  5917.      mode, press Ctrl-<PgDn>, while <PgUp> switches back from APPEND into
  5918.      EDIT mode.
  5919.  
  5920.           Note that APPEND is actually a special mode of EDIT; the only
  5921.      difference is that EDIT begins by displaying the current record, while
  5922.      APPEND adds a new blank record to the data file and displays that. All
  5923.      the editing fields are the same for both EDIT and APPEND.
  5924.  
  5925.           EDIT updates all index files in use.
  5926.  
  5927.           The command SET MENU ON displays the most important editing keys
  5928.      at the top of the screen, except if OFF or TEXT keyword is used, or if
  5929.      the current window is less than 80 characters wide or 10 rows deep.
  5930.  
  5931.           Editing keys:
  5932.  
  5933.      <Left> or Ctrl-S        moves the cursor back one character
  5934.      <Right> or Ctrl-D       moves the cursor forward one character
  5935.      Ctrl-<Left>             moves to the beginning of the field
  5936.      Ctrl-<Right>            moves to the end of the field
  5937.  
  5938.  
  5939.  
  5940.      EDIT                        SRI  VPI  VPIN                        EDIT
  5941.      SR-Info/VP-Info Reference Manual           Page 208          SECTION 4
  5942.  
  5943.  
  5944.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  5945.                                 inserted  (normally, you are in overtype
  5946.                                 mode:  what you type overtypes the existing
  5947.                                 text); pressing <Ins> or Ctrl-V again, puts
  5948.                                 you back into overtype mode
  5949.      <BACKSPACE>             deletes the character to the left of the
  5950.                                 cursor
  5951.      <Del> or Ctrl-G         deletes the character on the cursor
  5952.      Ctrl-Y                  deletes the rest of the field
  5953.      <Up> or Ctrl-E          moves the cursor to the previous field
  5954.      <Dn> or Ctrl-X          moves the cursor to the next field
  5955.      Ctrl-Q                  quits and does not update the current record
  5956.      <End> or Ctrl-W         quits and updates the current record
  5957.      <PgUp> or Ctrl-R        edits the previous record; if in APPEND mode,
  5958.                                 exits to EDIT mode
  5959.      <PgDn> or Ctrl-C        edits the next record
  5960.      Ctrl-<Pg Dn>            Enters APPEND mode; adds a blank record and
  5961.                                 places the cursor in that new record
  5962.      Ctrl-K                  moves back to the top of the previous page
  5963.                                 (not with OFF or TEXT keywords)
  5964.      Ctrl-L                  moves to the top of the next page (not with
  5965.                                 OFF or TEXT keywords)
  5966.  
  5967.  
  5968.           Examples:
  5969.  
  5970.      1>USE employee
  5971.      1>GO 2
  5972.      1>EDIT
  5973.  
  5974.  
  5975.      1>EDIT 2
  5976.  
  5977.           You then see:
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.      EDIT                        SRI  VPI  VPIN                        EDIT
  6001.      SR-Info/VP-Info Reference Manual           Page 209          SECTION 4
  6002.  
  6003.  
  6004.  
  6005. ──────────────────────────────────────────────────────────────────────────────
  6006. #1 EMPLOYEE.DBF                                      EDIT Record       2
  6007.                                                                      Page 1
  6008. ┌─────────────────────────────────────────────────────────────────────────────┐
  6009. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U         PAGE:  prev ^K  next ^L │
  6010. │FILE: top  ^<Home> bottom ^<End>       DELETE: char <Del> to end of field ^Y │
  6011. │APPEND MODE: begin ^<PgDn> exit <PgUp>     EXIT: with save <End>  no save ^Q │
  6012. └─────────────────────────────────────────────────────────────────────────────┘
  6013.  
  6014. NAME...........  Steiner
  6015. FNAME..........  Tom
  6016. ADDR...........  114 North Pitt St.
  6017. CITY...........  Lakewood
  6018. STATE..........  MD
  6019. ZIP............  02111
  6020. TEL_NO.........  596-0017
  6021. MARRIED........  y
  6022. SALARY.........   35780.00
  6023. YEAR_EMP.......  1984
  6024. DEPT...........  Engineering
  6025. ──────────────────────────────────────────────────────────────────────────────
  6026.  
  6027.  
  6028.           To edit only a few fields:
  6029.  
  6030.      1>USE employee
  6031.      1>SET MENU ON
  6032.      1>EDIT FIELDS name, fname, tel_no
  6033.  
  6034.           This displays:
  6035.  
  6036.  
  6037. ──────────────────────────────────────────────────────────────────────────────
  6038. #1 EMPLOYEE.DBF                                      EDIT Record       7
  6039.                                                                      Page 1
  6040. ┌─────────────────────────────────────────────────────────────────────────────┐
  6041. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U         PAGE:  prev ^K  next ^L │
  6042. │FILE: top  ^<Home> bottom ^<End>       DELETE: char <Del> to end of field ^Y │
  6043. │APPEND MODE: begin ^<PgDn> exit <PgUp>     EXIT: with save <End>  no save ^Q │
  6044. └─────────────────────────────────────────────────────────────────────────────┘
  6045.  
  6046. NAME...........  Marek
  6047. FNAME..........  Joe
  6048. TEL_NO.........  566-7012
  6049. ──────────────────────────────────────────────────────────────────────────────
  6050.  
  6051.  
  6052.      The following examples show EDIT using the TEXT and OFF keywords
  6053. combined with an external text file (output from both is identical; OFF,
  6054. available only in VP-Info Professional, allows the added flexibility of
  6055. using an internal TEXT structure and/or an ON FIELD structure):
  6056.  
  6057.  
  6058.  
  6059.  
  6060.      EDIT                        SRI  VPI  VPIN                        EDIT
  6061.      SR-Info/VP-Info Reference Manual           Page 210          SECTION 4
  6062.  
  6063.  
  6064.      1>USE employee
  6065.      1>EDIT TEXT employee
  6066.  
  6067.      1>USE employee
  6068.      1>TEXT Employee
  6069.      1>EDIT OFF
  6070.  
  6071.           These both display:
  6072.  
  6073. ──────────────────────────────────────────────────────────────────────────────
  6074.                                                      EDIT Record      23
  6075.  
  6076.  
  6077.       NAME...........  ARTHUR                NEUMANN
  6078.  
  6079.       ADD_1..........  4274 MATHERS BLVD. E.           UPSON DOWNS
  6080.       ZIP............  59768
  6081.  
  6082.       PHONE..........  243-5548 (614)
  6083.       WPHONE.........  643-5657 (614)
  6084.  
  6085.       EXPERIENCE.....
  6086.           ACCT STUDENT, WORKED FOR CPA SCARECROW & MOSCOWITZ, BOSTON
  6087.       COMMENTS
  6088.           KNOWS INCOME-TAX LAW, WITH SPECIALTIES IN DEPRECIATION AND
  6089.           TAX SHELTERS; SUGGEST ASSIGN TO CENTRAL OFFICE
  6090. ──────────────────────────────────────────────────────────────────────────────
  6091.  
  6092.            See the TEXT command for a full discussion of the TEXT command.
  6093.      The TEXT used for the above input screen:
  6094.  
  6095. ──────────────────────────────────────────────────────────────────────────────
  6096. .. zip,!9! 9!9
  6097. .. phone,999-9999 (999)
  6098. .. wphone,999-9999 (999)
  6099. .. training,99/99
  6100.  
  6101.       NAME...........  %FNAME  %NAME
  6102.  
  6103.       ADD_1..........  %ADD_1  %AREA
  6104.       ZIP............  @ZIP
  6105.  
  6106.       PHONE..........  @PHONE
  6107.       WPHONE.........  @WPHONE
  6108.  
  6109.       EXPERIENCE.....
  6110.           @EXPERIENCE
  6111.       COMMENTS
  6112.           @COMMENT1
  6113.           @COMMENT2
  6114. ──────────────────────────────────────────────────────────────────────────────
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.      EDIT                        SRI  VPI  VPIN                        EDIT
  6121.      SR-Info/VP-Info Reference Manual           Page 211          SECTION 4
  6122.  
  6123.  
  6124.            The following demonstration program illustrates use of EDIT off
  6125.      in VP-Info Professional:
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159.  
  6160.  
  6161.  
  6162.  
  6163.  
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.      EDIT                        SRI  VPI  VPIN                        EDIT
  6181.      SR-Info/VP-Info Reference Manual           Page 212          SECTION 4
  6182.  
  6183.  
  6184.  
  6185. ──────────────────────────────────────────────────────────────────────────────
  6186. **********************************************************************
  6187. *  EDIToff.prg   demonstration program for the EDIT OFF command
  6188. *                     *** VP-Info Professional only ***
  6189. *     Note the technique used to "wrap" the file...when skipping
  6190. *     past EOF, program "wraps to top of file, and vice versa,
  6191. *     using new SOUND command to beep (silent if NOEFFECTS in VPI.SET).
  6192. *  (C) 1990 Sub Rosa Publishing Inc.  (Author: Sidney L. Bursten)
  6193. **********************************************************************
  6194. USE customer
  6195. ON escape              ;what to do when <Esc> is pressed
  6196.    WINDOW              ;cancel small window
  6197.    CURSOR 23,0         ;put cursor in bottom left corner of screen
  6198.    CANCEL              ;exit program
  6199. ENDON
  6200. WINDOW
  6201. ERASE
  6202. TEXT
  6203. ┌────────────────────────────────────────────────────────────────────────────┐
  6204. │REC:  prev <PgUp>  next   <PgDn>                           DELETE RECORD ^U │
  6205. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  6206. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  6207. └────────────────────────────────────────────────────────────────────────────┘
  6208. ENDTEXT
  6209. WINDOW 8,10,17,69 double
  6210. TEXT
  6211. .. custnum,!!!-!-99
  6212. .. hphone,999-9999 (999)
  6213. .. wphone,999-9999 (999)
  6214. .. state,!!
  6215. Enter customer data:
  6216.  
  6217.     Number...... @custnum
  6218.     Name........ %firstname %lastname
  6219.     Address..... @address
  6220.     City, State. %city %state
  6221.     Zip Code.... @zip
  6222.     Phones (H/W) %hphone   %wphone
  6223. ENDTEXT
  6224. DO WHILE t
  6225.    EDIT off            ;edit using Get Table created with TEXT above
  6226.    DO CASE
  6227.    CASE :key=335       ;exit loop when <End> key pressed
  6228.       BREAK
  6229.    CASE eof            ;skipped past end of file; start again at top
  6230.       SOUND 11
  6231.       GOTO top
  6232.    CASE #<1            ;backed up past beginning of file; start again at bottom
  6233.       SOUND 11
  6234.       GOTO bottom
  6235.  
  6236.  
  6237.  
  6238.      EDIT                        SRI  VPI  VPIN                        EDIT
  6239.      SR-Info/VP-Info Reference Manual           Page 213          SECTION 4
  6240.  
  6241.  
  6242.       IF eof           ;if no undeleted records left in file, get out
  6243.          BREAK
  6244.       ENDIF
  6245.    ENDCASE
  6246. ENDDO
  6247. WINDOW                 ;cancel small window
  6248. CURSOR 23,0            ;put cursor in bottom left corner of screen
  6249. ──────────────────────────────────────────────────────────────────────────────
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  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.      EDIT                        SRI  VPI  VPIN                        EDIT
  6299.      SR-Info/VP-Info Reference Manual           Page 214          SECTION 4
  6300.  
  6301.  
  6302.  
  6303.                                      EJECT
  6304.  
  6305.      Start a new page on the printer.
  6306.  
  6307.      ╔════════════════════════════════════════════════════════════════════╗
  6308.      ║ EJECT                                                              ║
  6309.      ╚════════════════════════════════════════════════════════════════════╝
  6310.  
  6311.           The EJECT command sends a form feed (eject page, top of form)
  6312.      signal to the printer.
  6313.  
  6314.           This also resets the line and column counters to 0 for the
  6315.      @ commands.
  6316.  
  6317.           EJECT will attempt to advance the printer whether printing is on
  6318.      or off.  If your printer is on but off-line, your program may appear
  6319.      to hang; either put the printer on-line, or turn off the printer to
  6320.      release SR-Info/VP-Info to continue processing.
  6321.  
  6322.           When spooling (see SPOOL), the form-feed is placed into the spool
  6323.      file, and has no effect on the printer until the file is spooled or
  6324.      copied to the printer.
  6325.  
  6326.           (See the commands @, SET FORMAT TO PRINT, SET PRINT ON, SET EJECT
  6327.      ON/OFF, SET LENGTH TO, and the functions ROW( and COL(.
  6328.  
  6329.           Examples:
  6330.  
  6331.      1>EJECT
  6332.  
  6333.           In a program, EJECT and SPOOL may be used together to reset the
  6334.      line counter to zero before printing begins:
  6335.  
  6336.      SPOOL junk
  6337.      EJECT
  6338.      SPOOL
  6339.  
  6340.  
  6341.  
  6342.  
  6343.  
  6344.  
  6345.  
  6346.  
  6347.  
  6348.  
  6349.  
  6350.  
  6351.  
  6352.  
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.      EJECT                       SRI  VPI  VPIN                       EJECT
  6359.      SR-Info/VP-Info Reference Manual           Page 215          SECTION 4
  6360.  
  6361.  
  6362.  
  6363.                                       ELSE
  6364.  
  6365.      The optional part of an IF program structure.
  6366.  
  6367.      ╔════════════════════════════════════════════════════════════════════╗
  6368.      ║ ELSE                                                               ║
  6369.      ╚════════════════════════════════════════════════════════════════════╝
  6370.  
  6371.           This command introduces the optional part of the program
  6372.      structure IF/ENDIF.  See the command IF.
  6373.  
  6374.           Example:
  6375.  
  6376.      IF count>5
  6377.         ok=t
  6378.      ELSE
  6379.         IF count<2
  6380.            ok=f
  6381.         ENDIF
  6382.         ? 'ok'
  6383.      ENDIF
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  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.      ELSE                        SRI  VPI  VPIN                        ELSE
  6419.      SR-Info/VP-Info Reference Manual           Page 216          SECTION 4
  6420.  
  6421.  
  6422.  
  6423.                                   END commands
  6424.  
  6425.      Terminate a command structure.
  6426.  
  6427.      ╔════════════════════════════════════════════════════════════════════╗
  6428.      ║ ENDCASE                                                            ║
  6429.      ║ ENDDO                                                              ║
  6430.      ║ ENDIF                                                              ║
  6431.      ║ ENDFILES                                                           ║
  6432.      ║ ENDON                                                              ║
  6433.      ║ ENDPROCEDURE                                                       ║
  6434.      ║ ENDREPEAT                                                          ║
  6435.      ║ ENDTEXT                                                            ║
  6436.      ╚════════════════════════════════════════════════════════════════════╝
  6437.  
  6438.           All SR-Info/VP-Info structures are terminated with a matching END
  6439.      command as shown above.  When editing with the internal
  6440.      SR-Info/VP-Info programming editor (see WRITE command), Alt-F
  6441.      reformats the file with all structures properly indented, making it
  6442.      easy to see unbalanced structures.
  6443.  
  6444.           See DO CASE, DO WHILE, IF,  FILES, ON ERROR, ON ESCAPE, ON FIELD,
  6445.      PROCEDURE, REPEAT, and TEXT.
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.      END Commands                SRI  VPI  VPIN                END Commands
  6479.      SR-Info/VP-Info Reference Manual           Page 217          SECTION 4
  6480.  
  6481.  
  6482.  
  6483.                                      ERASE
  6484.  
  6485.      Erase screen.
  6486.  
  6487.      ╔════════════════════════════════════════════════════════════════════╗
  6488.      ║ ERASE [line1,line2]                                                ║
  6489.      ╟────────────────────────────────────────────────────────────────────╢
  6490.      ║ Option:                                                            ║
  6491.      ║                                                                    ║
  6492.      ║ line1, line2   erase from line1 to line2                           ║
  6493.      ╚════════════════════════════════════════════════════════════════════╝
  6494.  
  6495.           This command erases the screen, and is a synonym for CLS.
  6496.  
  6497.           If, optionally, two numeric expressions, line1 and line2, are
  6498.      given, it erases line1 and line2, and all lines between, if any.
  6499.      These expressions should have values between 0 and 24.
  6500.  
  6501.           ERASE is the same as the following three commands:
  6502.  
  6503.      CLS
  6504.      ERASE 0,24
  6505.      CLS 0,24
  6506.  
  6507.           Examples:
  6508.  
  6509.      1>ERASE
  6510.      1>ERASE 2,4
  6511.      1>ERASE 2,2
  6512.  
  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.      ERASE                       SRI  VPI  VPIN                       ERASE
  6539.  
  6540.      SR-Info/VP-Info Reference Manual           Page 218          SECTION 4
  6541.  
  6542.  
  6543.  
  6544.                                      FIELD
  6545.  
  6546.      Initiates a program segment module in an ON FIELD structure
  6547.  
  6548.      ╔════════════════════════════════════════════════════════════════════╗
  6549.      ║ FIELD <fieldname>/<fieldnum>                                       ║
  6550.      ║                                                                    ║
  6551.      ║ fieldname       name of a field in a Get Table                     ║
  6552.      ║ fieldnum        number of a field in a Get Table                   ║
  6553.      ╚════════════════════════════════════════════════════════════════════╝
  6554.  
  6555.           Each field in a Get Table may have a program segment in a
  6556.      program's ON FIELD structure which will be executed when the cursor
  6557.      leaves that field, or optionally when READ or the current record is
  6558.      exited.
  6559.  
  6560.           All fields in a Get Table are numbered from 1 to 64 in the order
  6561.      in which they are placed on the screen.  When they are painted by
  6562.      @ GET commands, the order is the same as the order of the @ GET
  6563.      commands in the program; if painted by TEXT, the order is left-to-
  6564.      right on each line, and then top-to-bottom.
  6565.  
  6566.           When editing with the internal SR-Info/VP-Info programming editor
  6567.      (see WRITE command), Alt-F reformats the file with all structures
  6568.      properly indented, making it easy to see unbalanced structures.
  6569.  
  6570.           (See command ON FIELD.)
  6571.  
  6572.           Examples:
  6573.  
  6574.      FIELD 3
  6575.      FIELD cust
  6576.      FIELD name#3
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.      FIELD                       SRI  VPI  VPIN                       FIELD
  6600.      SR-Info/VP-Info Reference Manual           Page 219          SECTION 4
  6601.  
  6602.  
  6603.  
  6604.                                     FIELDS=
  6605.  
  6606.      Set the maximum number of fields available at any one time.
  6607.  
  6608.      ╔════════════════════════════════════════════════════════════════════╗
  6609.      ║ FIELDS= <num>                                                      ║
  6610.      ║                                                                    ║
  6611.      ║          VP-Info Professional only             VPI.SET file only   ║
  6612.      ║                                                                    ║
  6613.      ║ <num const>  maximum number of fields allowed in all data files    ║
  6614.      ║                open at any one time (including SR-Info/VP-Info's   ║
  6615.      ║                internal work file); range 128 to 1000              ║
  6616.      ╚════════════════════════════════════════════════════════════════════╝
  6617.  
  6618.           This command sets the maximum number of fields that can be open
  6619.      at any one time in all open files,  taking the place of SET FIELDS TO
  6620.      in earlier versions of the language (now ignored if encountered by the
  6621.      VPI-Info compiler).
  6622.  
  6623.           Reserving memory space for a single field requires 16 bytes.
  6624.      Therefore, increasing the number of fields requested reduces the
  6625.      memory space available for your program.
  6626.  
  6627.           The limits for FIELDS= are 128 and 1000, with a default of 320.
  6628.  
  6629.                Caution: be sure you have SET FIELDS to a number large
  6630.           enough to accommodate all the fields in all the data files you
  6631.           will ever have open at one time, plus the largest number of
  6632.           fields in any of these files.
  6633.  
  6634.           Example:
  6635.  
  6636.      FIELDS=500
  6637.  
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.      FIELDS=                        VPI  VPIN                       FIELDS=
  6660.      SR-Info/VP-Info Reference Manual           Page 220          SECTION 4
  6661.  
  6662.  
  6663.  
  6664.                                      FILES
  6665.  
  6666.      Lets you specify drive letters, directories, and/or default file modes
  6667.      for various files used by SR-Info/VP-Info.
  6668.  
  6669.      ╔════════════════════════════════════════════════════════════════════╗
  6670.      ║ FILES                                                              ║
  6671.      ║ FILES <specification> [,[<file direction>] [,<mode>]]              ║
  6672.      ║                                                                    ║
  6673.      ║ specification    any file name or "skeleton" (using the * and ?    ║
  6674.      ║                    wildcards                                       ║
  6675.      ╟────────────────────────────────────────────────────────────────────╢
  6676.      ║ Options:                                                           ║
  6677.      ║                                                                    ║
  6678.      ║ file direction   any legal DOS path, consisting of drive letter    ║
  6679.      ║                    and colon and/or directory path                 ║
  6680.      ╟────────────────────────────────────────────────────────────────────╢
  6681.      ║ Option: (VP-Info Professional Network Edition only):               ║
  6682.      ║                                                                    ║
  6683.      ║ mode             any one of the optional file-opening modes used   ║
  6684.      ║                    in network operation -- LOCK or L, WRITE or W,  ║
  6685.      ║                    READ or R, or SHARE or S. If no mode is set,    ║
  6686.      ║                    or if Network Edition is not in use, the        ║
  6687.      ║                    default mode is LOCK                            ║
  6688.      ╚════════════════════════════════════════════════════════════════════╝
  6689.  
  6690.           There is always a FILES Table in memory, set up by the active
  6691.      FILES ... ENDFILES structure.  (This table is empty if there is no
  6692.      active FILES ... ENDFILES structure.)  The FILES command allows
  6693.      on-the-fly additions and changes to the FILES Table from either
  6694.      Conversational SR-Info/VP-Info or programs.
  6695.  
  6696.           Examples of Form 1 (Only in programs):
  6697.  
  6698.      FILES
  6699.  
  6700.      Initiates a FILES ... ENDFILES structure.  (See FILES ... ENDFILES.)
  6701.  
  6702.  
  6703.           (Only in Conversational SR-Info/VP-Info)
  6704.  
  6705.      1>FILES
  6706.  
  6707.      Empties the current FILES Table in memory.  (Caution: Do not confuse
  6708.      this interactive command with the FILES command as used in programs,
  6709.      which always initiates a FILES ... ENDFILES structure.)
  6710.  
  6711.           Examples of Form 2 (In either programs or Conversational
  6712.      SR-Info/VP-Info):
  6713.  
  6714.      FILES *.dbf,c:\data
  6715.  
  6716.  
  6717.  
  6718.  
  6719.      FILES                       SRI  VPI  VPIN                       FILES
  6720.      SR-Info/VP-Info Reference Manual           Page 221          SECTION 4
  6721.  
  6722.  
  6723.      Given this command, either in a  program or in Conversational
  6724.      SR-Info/VP-Info, SR-Info/VP-Info searches the FILES Table in memory
  6725.      for a matching file specification.  If the file specification *.DBF is
  6726.      found, the new path will replace the existing path; otherwise, this
  6727.      specification and redirection is added to the top of the FILES Table.
  6728.  
  6729.      FILES *.frm
  6730.  
  6731.      If no <file direction> is specified, file redirection is turned off
  6732.      for files matching this entry.
  6733.  
  6734.           Macros are allowed with the FILES command itself, either in
  6735.      programs or in Conversational SR-Info/VP-Info, although macros are not
  6736.      permitted in the FILES ... ENDFILES structure.
  6737.  
  6738.  
  6739.                  For VP-Info Professional Network Edition only
  6740.  
  6741.           There is a special form of the FILES command which has
  6742.      significance only in VP-Info Professional Network Edition with SET
  6743.      NETWORK ON.
  6744.  
  6745.           This form adds a <mode> which sets the default file mode for all
  6746.      matching files.  For example,
  6747.  
  6748.      FILES *.ndx,ndx,READ
  6749.  
  6750.      sets a file mode of READ for all files with an NDX extension, all of
  6751.      which are found in the NDX subdirectory of the current directory.
  6752.  
  6753.           If only <specification> and <mode> are given, the file mode is
  6754.      given to all files matching that specification wherever they are on
  6755.      the disk. (Note: two commas are required:  FILES *.dbf,,WRITE.)
  6756.  
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.      FILES                       SRI  VPI  VPIN                       FILES
  6780.      SR-Info/VP-Info Reference Manual           Page 222          SECTION 4
  6781.  
  6782.  
  6783.  
  6784.                                FILES ... ENDFILES
  6785.  
  6786.      Lets you specify drive letters, directories, and/or default file modes
  6787.      for various files used by SR-Info/VP-Info.
  6788.  
  6789.      ╔════════════════════════════════════════════════════════════════════╗
  6790.      ║ FILES                                                              ║
  6791.      ║ <specification> [,[<file direction>] [,<mode>]]                    ║
  6792.      ║ ENDFILES                                                           ║
  6793.      ║                                                                    ║
  6794.      ║ specification    any file name or "skeleton" (using the * and ?    ║
  6795.      ║                    wildcards); must not be indented                ║
  6796.      ╟────────────────────────────────────────────────────────────────────╢
  6797.      ║ Options:                                                           ║
  6798.      ║                                                                    ║
  6799.      ║ file direction   any legal DOS path, consisting of drive letter    ║
  6800.      ║                    and colon and/or directory path                 ║
  6801.      ╟────────────────────────────────────────────────────────────────────╢
  6802.      ║ Option: (VP-Info Professional Network Edition only):               ║
  6803.      ║                                                                    ║
  6804.      ║ mode             any one of the optional file-opening modes used   ║
  6805.      ║                    in network operation -- LOCK or L, WRITE or W,  ║
  6806.      ║                    READ or R, or SHARE or S. If no mode is set,    ║
  6807.      ║                    or if Network Edition is not in use, the        ║
  6808.      ║                    default mode is LOCK                            ║
  6809.      ╚════════════════════════════════════════════════════════════════════╝
  6810.  
  6811.           (Programs and CNF file only)  There is always a FILES Table in
  6812.      memory, set up by the active FILES ... ENDFILES structure.  (This
  6813.      table is empty if there is no active FILES ... ENDFILES structure.)
  6814.  
  6815.           A FILES ... ENDFILES structure may be created in a program at any
  6816.      time, and may have any number of specification lines between the FILES
  6817.      and ENDFILES lines.  All existing entries are immediately cleared and
  6818.      a new FILES Table constructed.
  6819.  
  6820.           Examples:
  6821.  
  6822.      *.dbf,c:\data
  6823.  
  6824.      Causes SR-Info/VP-Info to add C:\DATA\ to the front of all file names
  6825.      Given this command, either in a SR-Info/VP-Info program or in
  6826.      Conversational SR-Info/VP-Info, SR-Info/VP-Info searches the FILES
  6827.      Table in memory for a matching file specification.  If the file
  6828.      specification *.DBF is found, the new path will replace the existing
  6829.      path; otherwise, this specification and redirection is added to the
  6830.      top of the FILES Table.
  6831.  
  6832.      FILES *.frm
  6833.  
  6834.      If no <file direction> is specified, file redirection is turned off
  6835.      for files matching this entry.
  6836.  
  6837.  
  6838.  
  6839.      FILES ... ENDFILES          SRI  VPI  VPIN          FILES ... ENDFILES
  6840.      SR-Info/VP-Info Reference Manual           Page 223          SECTION 4
  6841.  
  6842.  
  6843.  
  6844.           A FILES ... ENDFILES structure is cleared by an empty structure
  6845.      as follows:
  6846.  
  6847.      FILES
  6848.      ENDFILES
  6849.  
  6850.           No macros are permitted in the FILES ... ENDFILES structure,
  6851.      although macros are allowed with the FILES command itself, either in
  6852.      programs or in Conversational SR-Info/VP-Info.
  6853.  
  6854.                Caution: There is no way to add a comment inside a FILES ...
  6855.           ENDFILES structure, and no line should be indented.  The contents
  6856.           of FILES ... ENDFILES structures are not affected by the
  6857.           reformatting facility Alt-F of the WRITE command.
  6858.  
  6859.  
  6860.                  For VP-Info Professional Network Edition only
  6861.  
  6862.           There is a special form of FILES ... ENDFILES entry which has
  6863.      significance only in VP-Info Professional Network Edition with SET
  6864.      NETWORK ON.
  6865.  
  6866.           This form adds a <mode> which sets the default file mode for all
  6867.      matching files.  For example,
  6868.  
  6869.      *.ndx,ndx,READ
  6870.  
  6871.      sets a file mode of READ for all files with an NDX extension, all of
  6872.      which are found in the NDX subdirectory of the current directory.
  6873.  
  6874.           If only <specification> and <mode> are given, the file mode is
  6875.      given to all files matching that specification wherever they are on
  6876.      the disk. (Note: two commas are required: *.dbf,,WRITE.)
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.      FILES ... ENDFILES          SRI  VPI  VPIN          FILES ... ENDFILES
  6900.      SR-Info/VP-Info Reference Manual           Page 224          SECTION 4
  6901.  
  6902.  
  6903.  
  6904.                                      FILES=
  6905.  
  6906.      Set the maximum number of files which can be open at one time
  6907.      (requires DOS 3.3 and above and VP-Info Professional)
  6908.  
  6909.      ╔════════════════════════════════════════════════════════════════════╗
  6910.      ║ FILES= <num const>                                                 ║
  6911.      ║                                                                    ║
  6912.      ║          VP-Info Professional only             VPI.SET file only   ║
  6913.      ║                                                                    ║
  6914.      ║ <num const>   maximum number of files that can be open at any one  ║
  6915.      ║                 time; range 21 to 65                               ║
  6916.      ╚════════════════════════════════════════════════════════════════════╝
  6917.  
  6918.           VP-Info Professional is not limited to the 20-file maximum of
  6919.      SR-Info and earlier versions of VP-Info, provided the operating system
  6920.      allows more than 20 open files (DOS 3.3 and above) and that a FILES=
  6921.      statement is present in the CONFIG.SYS file specifying at least <n>
  6922.      files.
  6923.  
  6924.           As a practical matter, <n> should be in the range 25 to 60; the
  6925.      default and minimum is 20. Loading more files reduces the maximum size
  6926.      of programs and reduces speed of such memory-intensive commands as
  6927.      INDEX.
  6928.  
  6929.           This command may be placed only in the VPI.SET file, which is
  6930.      executed by VP-Info Professional only when first loaded. See VPI.SET
  6931.      in the Required Files chapter.
  6932.  
  6933.           Example:
  6934.  
  6935.      1>FILES=50
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.      FILES=                         VPI  VPIN                        FILES=
  6960.      SR-Info/VP-Info Reference Manual           Page 225          SECTION 4
  6961.  
  6962.  
  6963.  
  6964.                                    FILES LIST
  6965.  
  6966.      Display the current contents of the FILES ... ENDFILES structure
  6967.  
  6968.      ╔════════════════════════════════════════════════════════════════════╗
  6969.      ║ FILES LIST                                                         ║
  6970.      ╚════════════════════════════════════════════════════════════════════╝
  6971.  
  6972.           The current FILES ... ENDFILES structure may be displayed with
  6973.      this command.  See FILES and FILES ... ENDFILES.
  6974.  
  6975.           Example:
  6976.  
  6977.      1>FILES LIST
  6978.      File Spec       Drive and/or Path
  6979.      *.CPL           CPL2\
  6980.      *.NDX           NDX2\
  6981.      *.DBF           DBF\
  6982.      *.DBK           DBK\
  6983.  
  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.      FILES LIST                  SRI  VPI  VPIN                  FILES LIST
  7020.  
  7021.