QBasic 1.1: LSET Statement

Syntax

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

Description / Parameter(s)

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
recordvariable2
Record variables of any user-defined data type. 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