Futurebasic/Language/Reference/let

Syntax
1. 2.

Description
The  statement assigns a value to the variable , replacing whatever value  had before. Note that the  keyword is optional.  If you use Syntax 1, the value of  is assigned to  :

If  is a numeric variable, then   can be any numeric expression; if   is outside the range or precision that can be stored in , then the expression will be appropriately converted.

If  is a POINTER variable, then   can be _nil (zero), or another POINTER variable of the same type, or any valid address expression.

If  is a HANDLE variable, then   can be _nil (zero), or another HANDLE variable of the same type, or any valid address expression whose value is a handle.

If  is a string variable, then   can be any string expression. You should make sure that the length of  does not exceed the maximum string size that will fit into.

If  is a "pseudo" record (declared using  ), then   must be a record variable declared with the same length as.

If  is a "true" record (declared using  ), then   must be a record variable of the same type as.



If you use Syntax 2, then  bytes are copied into , from the memory location starting at. The  parameter must be a static integer expression (i.e., it cannot contain any variables). Note that FB does not check whether actually equals the size of. If  is too small, an incomplete value will be copied into  ; if   is too big, data will be copied into addresses beyond  's location in memory (this can be dangerous).