Site hosted by Angelfire.com: Build your free website today!
NAME
  LSET, RSET Statements

SYNOPSIS
  LSET stringvariable$=stringexpression$
  RSET stringvariable$=stringexpression$
  LSET recordvariable1=recordvariable2

    _ stringvariable$      Any string variable or a random-access file field
                           defined in a FIELD statement.
    _ stringexpression$    For LSET, the left-justified version of
                           stringvariable$. For RSET, the right-justified
                           version of stringvariable$.
    _ recordvariable1      Record variables of any user-defined data type.
      recordvariable2      Use LSET to assign a record variable of one data
                           type to a different user-defined data type.

DESCRIPTION
  LSET and RSET move data into a random-access file buffer (in preparation for
  a PUT statement) and left- or right-justify the value of a string variable.
  LSET also copies the contents of one record variable to another.

  Example:
    OPEN "FILEDAT.DAT" FOR RANDOM AS #1 LEN = 10
    FIELD #1, 5 AS Ls1$, 5 AS Rs1$
    LSET Ls1$ = "LSET"
    RSET Rs1$ = "RSET"
    PUT #1, 1
    CLOSE #1
    OPEN "FILEDAT.DAT" FOR RANDOM AS #1 LEN = 10
    FIELD #1, 5 AS Ls2$, 5 AS Rs2$
    GET #1, 1
    PRINT "*" + Ls2$ + "*", "*" + Rs2$ + "*"
    CLOSE #1

SEE ALSO
  FIELD GET (File I/O) PUT (File I/O)