Please enable JavaScript to view this site.

A-Shell 7.0 Release Notes

Two additional refinements to the behavior of various .ARGxxx functions:

1.The .ARG_PASSED(@parm) status is now inherited, even when the :OUTPUTONLY qualifier is specified. For example:

call fn'foo()   ! no arg passed

end

 

function fn'foo(argx=0 as b2:outputonly)

    ? "argx=";argx;  .ifelse$(not .ARG_PASSED(@argx),"NOT ",""); "passed"

    call fn'nested'foo(argy=argx)

endfunction

 

function fn'nested'foo(argy=1 as b2:outputonly)

    ? "argy=";argy;  .ifelse$(not .ARG_PASSED(@argy),"NOT ",""); "passed"

endfunction

 

The above program will display...

argx= 0 NOT passed

argy= 1 NOT passed

 

... even though the call from fn'foo() to fn'foo'nested() actually does specify the argy=argx parameter, since the inheritance of the argument passed status carries down to the nested function.

Note that this applies to both normal static function calls and dynamic (DYNFUNC) calls.

2.The compiler now complains when a named parameter is specified to one of the .ARGxxx() functions without the @ prefix. For example, the following ...

if .ARG_PASSED(argx) then

... would be flagged as an error if argx was the name of a parameter in the current function. Even though it is technically / semantically legal, it is almost certainly a mistake. Without the @ prefix, the function would return the status of the argument number, based on the value of argx, rather than the status of the argx paramter. If you really want to reference the arguments by number, just use another variable (i.e. one that isn't itself a parameter to the current function.