[let] var = expr2.
[let] var;length = address&
let statement assigns a value to the variable
var, replacing whatever value
var had before. Note that the
let keyword is optional.
If you use Syntax 2, then
- If you use Syntax 1, the value of
expr is assigned to
var is a numeric variable, then
expr can be any numeric expression; if
expr is outside the range or precision that can be stored in
var, then the expression will be appropriately converted.
var is a pointer variable, then
expr can be _nil (zero), or another pointer variable of the same type, or any valid address expression.
var is a Handle variable, then
expr can be _nil (zero), or another Handle variable of the same type, or any valid address expression whose value is a handle.
var is a string variable, then
expr can be any string expression. You should make sure that the length of
expr does not exceed the maximum string size that will fit into
var is a "record" declared using
dim var as recordType, then
expr must be a record variable of the same type as
length bytes are copied into
var, from the memory location starting at
length parameter must be a static integer expression (i.e., it cannot contain any variables). Note that FutureBasic does not check whether
length actually equals the size of
length is too small, an incomplete value will be copied into
length is too big, data will be copied into addresses beyond
var's location in memory (this can be dangerous).
dim; begin record; BlockMove; BlockFill; Constant declaration statement