Description |
Converts a binary structure to a dynamic array, placing each element from the structure into the corresponding field. |
Syntax |
var = Struct_To_Var(struct, structname) |
Parameters |
Use Struct_To_Var when you want to convert a structure into an @fm-delimited array and none of the structure elements are char or char array types containing character values greater than an @vm (hex FD, decimal 253). Alternatively, use Parse_Struct to parse a structure into separate variables. This function is the opposite of the Var_To_Struct function. The structure definition must be predefined using the Define_Struct routine. |
See also |
|
Example |
/* assumes the structure called RECT has been defined as being composed of 4 "signed short" elements and the API function GetWindowRect has been defined in DLL_USER as: declare function Get_Property, GetWindowsRect hwnd = Get_Property(@window, "HANDLE") * build the SIZE property out of the returned rectangle Size<3> = Size<3> - Size<1> ;* convert right to width |