bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
RSET Statement Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
RSET moves data from memory to a random-access file buffer (in preparation
for a PUT statement), or right-justifies the value of a string in a string
variable.
 
RSET stringvariable=stringexpression
    ■ The argument stringvariable usually is a random-access file field
      defined in a FIELD statement. The argument stringexpression is the
      value assigned to the variable.
    ■ If stringexpression requires fewer bytes than were defined for
      stringvariable in the FIELD statement, the RSET statement right-
      justifies the string in the field (LSET left-justifies the string).
      Spaces are used to pad the extra positions.
    ■ If the string is too long for the field, both LSET and RSET truncate
      characters from the right. Numeric values must be converted to strings
      before they are justified with the RSET or LSET statements.
    ■ The RSET statement can be used with string variables unrelated to FIELD
      statements. When used with a fixed-length string variable, the value
      is right-justified and left-padded with blanks.
    ■ When RSET is used with a variable-length string, the string is treated
      as a fixed field. The length of the field is the length of the value
      the variable had before the RSET statement.