Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

Compiler edit 844 and runtime enhancement: Collections can now be passed by reference in an XCALL to an SBX. On the calling side, the syntax is the same as for passing a DIMX array of structures, i.e. just specify the collection name with an empty set of parentheses, e.g.

dimx $coll, ordmap(varstr;varstr)

...

xcall MYSBX, $coll(), ...

 

The receiving side is also similar to that for receiving a DIMX array of structures, i.e. you must first declare the receiving array with a variation of the DIMX statement including the BYREF clause, e.g.

dimx $locoll, ordmap(varstr;varstr), byref

Then use XGETARG or XGETARGS to receive the collection...

xgetargs $locoll(), ...

or

xgetarg 2,$locoll()

See the new MAPDIR.SBX and associated TSTMAPDIR.BP test program in SOSLIB[907,45] for a useful working example.