Please enable JavaScript to view this site.

A-Shell 7.0 Release Notes

The :OUTPUTONLY qualifier on a DYNSTRUCT parameter no longer defeats the autobinding when the caller passes a DEFSTRUCT to it. The received DYNSTRUCT variable will be empty regardless of the default value, if any, but will be bound. For example:

defstruct st_cust

    map2 id,b,4

    map2 name,s,30

endstruct

 

map1 cust, st_cust     

cust.id = 99

cust.name = "Jacob"

 

call fn'foo(ds=cust)

? cust.name                  ! will be "Finkleheimer"

end

 

function fn'foo(ds="" as dynstruct:outputonly)

    ? ds.name                ! will be "" because of :outputonly

    ds.name = "Finkleheimer" ! valid because ds auto-bound to st_cust

    xputarg @ds              

endfunction

 

Prior to this, the references to ds.name inside the function would have generated error 70 (invalid dynstruct reference) because the :outputonly would have defeated the automatic binding.