| Format
1 |
Assign to Variable
VIA
var$=expression
Use this VIA format
to assign the value in the expression to a variable whose
name is stored in var$ (i.e., to assign VIA
the var$). If you use a string, then ProvideX
automatically appends a $ to the variable name. If
desired a string expression can us substituted for var$
is enclosed in parenthesis.
Example:
0030 LET
ANIMAL$="pet", PET$="dog"
0040 VIA
ANIMAL$="cat"
0050 PRINT ANIMAL$,"
",PET$; END
When run, the result is
pet cat.
|
| Format
2 |
Assign to Composite
Variable
VIA
composite$,var_1$[[,subsc]]=expression[,...n]
You can assign the value
of the expression to a variable in a composite string. In
this format, you can specify up to 3 subscripts for the
variable(s).
Example:
0010 IOLIST X$,Y$,Z$
0020 DIM PET$:IOL=0010
0030 LET
X$="Dogs",Y$="Cats",Z$="!"
REM Assign values to variables
0040 VIA
PET$,"X$"="Lotsa",PET$,"Y$"="and",PET$,"Z$"="It's
raining"
0050 PRINT PET.X$,"
",X$," ",PET.Y$," ",Y$
0060 LET
PET.X$=X$,PET.Y$=Y$
0070 PRINT PET.Z$,"
",PET.Y$," and ",PET.X$,Z$
-:run
Lotsa Dogs and Cats
It's raining Cats and
Dogs!
|