-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Structures can be given as function argument as MRS element or both. Every variant is internally a function argument by reference.
Structures should be only used as MRS element if the structure elements are written before possibly read in the function.
If a structure element is read first then the structure argument should be placed as function argument.
static Structure teststr
string str
EndStructure
Function test()
STRUCT teststr s
[s] = AsMRS()
AsArgument(s)
AsBoth(s)
End
Function [STRUCT teststr s] AsMRS()
s.str = "written"
return [s]
End
Function AsArgument(STRUCT teststr &s)
print s.str
End
Function AsBoth(STRUCT teststr &s)
print s.str
s.str = "written"
End
t-b
Metadata
Metadata
Assignees
Labels
No labels