$newstruct
Explicitly create a new Struct with no members.
StructVar =
$newstruct
Example: vStruct1->mbr = $newstruct
Parameters
Parameter | Data Type | Description |
---|---|---|
StructVar | struct | Name of a variable or parameter; must be of type struct or any |
Return Values
Returns an empty Struct
Use
Allowed in all component types.
Description
Structs are usually implicitly created by assigning a value to a struct variable or parameter. The $newstruct function enables you to explicitly create an empty Struct or Struct member, which you can then populate.
Using $newstruct
The following statement inserts a reference to an
empty Struct (referenced by vStruct1
) called mbr
vStruct1->mbr = $newstruct
The following statement would rarely be required
except, for example, if it were used in a loop that needs to reinitialize
vStruct2
.
vStruct2 = $newstruct
Version | Change |
---|---|
9.5.01 | Introduced |