The PSL compiler supports passing the following entities by reference:
Object identifiers and arrays
Individual array subscripts
Object properties
This enables you to avoid passing the entire object into a procedure or method. For example,
type RecordDEP dep=Db.getRecord("DEP",":CID")
type RecordDEP dep()
set dep(1)=Db.getRecord("DEP",2)
do SUB(.dep,.dep.bal,.dep(1).bal)
write !,dep.bal
write !,dep(1).bal
quit
SUB(RecordDEP dep,bal,newbal)
set bal=10000,newbal=bal+22
quit