Revision [22687]

This is an old revision of KeyPgOpLetlist made by fxm on 2019-05-24 00:24:55.


Operator LET() (Assignment)

Assigns fields of a user defined type to a list of variables

Let( variable1 [, variable2 [, ... ]] ) = UDT_var
Let( variable1 [, variable2 [, ... ]] ) => UDT_var

variable1 [, variable2 [, ... ]]
Comma separated list of variables to receive the values of the UDT variable's fields.
A user defined type variable.

Assigns the values from the UDT_var variable's fields to the list of variables.

When the UDT Extends a Base, the first variable (variable1) assigned by the operator then corresponds to a Base instance (only the other variables are those to receive the values of the data fields of the UDT).

Union is not supported.

Type Vector3D
    x As Double
    y As Double
    z As Double
End Type

Dim a As Vector3D = ( 5, 7, 9 )

Dim x As Double, y As Double

'' Get the first two fields only
Let( x, y ) = a

Print "x = "; x
Print "y = "; y

x =  5
y =  7

Dialect Differences:
Differences from QB:
See also:
Back to Assignment Operators
Back to Operators
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki phatcode