Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

Compiler enhancement (edit 838): new statement DEFALIAS allows aliases to be defined for the names of functions and procedures:

DEFALIAS <routine-alias>() = <real-routine>()

This can be a useful code management technique for isolating lower level changes or variations in routines—due to differences in versions, implementation, etc.—from the higher level application. For example, an application may have many different discount calculation routines based on the type of discount, some of which might be effectively the same. Rather than forcing the higher level code to know which discounts are effectively the same, or forcing you to maintain redundant routines which differ only by name, you can use DEFALIAS to create aliases. For example, the following statement would cause any subsequent references to the function Fn'Senior'Discount(qty,gender) to be converted into references to the function Fn'AARP'Discount(qty,gender):

DEFALIAS Fn'Senior'Discount() = Fn'AARP'Discount()

Notes:

Currently this applies only to functions and procedures and not subroutines
The empty set of parentheses is mandatory for both the alias and the real routine name. Currently the alias only affects the name; the arguments are passed through without change.
This is purely a compiler-level mechanism and does not require any runtime support—i.e. IT is backward compatible to all runtimes.