I use records frequently as object parameters and find the structure neither remains after the enter, or in a local variable. So I must do the following in every method. Except I've found debugging that a variable of len 9 will not return data from a composite string although the structure is there. Note: I have not played with how long a variable still works. Curious if I missed something in documentation, if this is unusual behavior, or just an object limitation? version 2017 on Linux.
! Doesn't work
ENTER (FILEREC$),(FILEIOL$)
DIM AAARecord$:fileiol$
AAARecord$=FILEREC$
phone$=AAA.RoadsideAssistenceNumber$
? lst(iol(AAARecord$)) ! will show Structure.
? str(AAA.RoadsideAssistenceNumber$:"xxx-xxx-xxxx")
- -
! This works
ENTER (FILEREC$),(FILEIOL$)
DIM AAA$:fileiol$
AAA$=FILEREC$
phone$=AAA.RoadsideAssistenceNumber$
? str(phone$:"xxx-xxx-xxxx")
888-888-8888