bas7qck.hlp (Table of Contents; Topic list)
Assigning Values to Variables
  Variables                                    Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 
 Assigning Values to Variables       Example
──────────────────────────────────────────────────────────────────────────────
 A constant value.                   A = 4.5
 
 The value of another string         B$ = "ship of fools"
 or numeric variable.                A$ = B$
                                     Profits = NetEarnings
 
 The value of a record element.      TYPE EmployeeRec
                                        FullName AS STRING * 25
                                        SocSec   AS STRING * 9
                                     END TYPE
                                     DIM CurrentEmp AS EmployeeRec
                                     .
                                     .
                                     .
                                     OutSocSec$=CurrentEmp.SocSec
 
 The value of an array element       TYPE EmployeeRec
 in a record.                           FullName    AS STRING * 25
                                        SocSec      AS STRING * 9
                                        ChildAge(6) AS INTEGER
                                     END TYPE
                                     DIM CurrentEmp AS EmployeeRec
                                     .
                                     .
                                     .
                                     FirstChildAge = CurrentEmp.ChildAge(1)
 
 The value of one record variable    TYPE FileBuffer
 to another of the same type.           FullName AS STRING * 25
                                        JobClass AS INTEGER
                                     END TYPE
                                     DIM Buffer1 AS FileBuffer
                                     DIM Buffer2 AS FileBuffer
                                     .
                                     .
                                     .
                                     Buffer2 = Buffer1
 
 The value obtained by combining     CONST PI = 3.141593
 other variables, constants, and     Conversion = 180 / PI
 operators.                          TempFile$ = FileSpec$+".BAK"
──────────────────────────────────────────────────────────────────────────────
Note:   Before a variable is assigned a value, its value is assumed to be
        zero (for numeric variables) or null (for string variables). All
        fields in a record, including string fields, are initialized to
        zero.
 
See Also    Assigning Values to Variables - Description