Please enable JavaScript to view this site.

A-Shell Development History

Named parameter references to arrays (byref) were incorrectly accepting scalar parameter name syntax. For example, forfunction defined as follows ...

function fn'foo(aaa() as ST_ARRAY)

the compiler was accepting the following call ...

call fn'foo(aaa=bbb())

whereas since the formal parameter is an array, it should have required array syntax for the name reference, e.g. ...

call fn'foo(aaa()=bbb())

Somewhat worse, an attempt to use the correct syntax (as shown above) would have resulted in a mysterious compilation error -- unmapped variable for aaa().

Worse still, if the local array had the same name as the formal array parameter, such as ...

call fn'foo(aaa()=aaa())

... it accepted the syntax, but compiled the call incorrectly, mistaking the format named parameter aaa() for the locally defined aaa(), which almost certainly would have caused a crash at runtime.

The good news is none of these problems were likely to affect production systems. But the bad news is that you may now get a compiler error when compiling code using the incorrect fn'foo(aaa=bbb()) syntax, even though it previously compiled ok. Fortunately the fix is simple, and hopefully obvious.