Contents  Index  
──────────────────────────────────────────────────────────────────────────────
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.

LSET stringvariable$=stringexpression$
RSET stringvariable$=stringexpression$
LSET recordvariable1=recordvariable2stringvariable$      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.

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, PUT
──────────────────────────────────────────────────────────────────────────────
 © Copyright Microsoft Corporation, 1987-1992. All rights reserved.
   Converted from qbasic.hlp with DosHelp/HelpConvert