Abstract

In both the IPSA and APL2/NARS extensions of APL, the SLASH symbol always represents an operator. Some new users of APL2, having been taught in the past that SLASH is an ambiguous symbol which is a dyadic function when it immediately follows data, find that the result when SLASH occurs between data and another operator is incompatible with that interpretation. The situation did not arise in APL1 because derived functions could not be operands. The classification of SLASH as an operator can be traced to the description given in the book. A Programming Language, from which APL ultimately derives. It was done so that the closely related MASK operation could be specified with the same symbol. In this paper the syntactic differences between dyadic functions and aonadic operators with data operands are explicated using the APL2 concept of syntactic binding. Two straightforward language extensions are considered based on the notions of a depth property, which APL2 shares with STSC's NARS, and pairwise evaluation, which derives from syntactic binding. Together they allow either dyadic functions or monadic operators with data operands to be executed in three structural contexts, which, in the cases of REPLICATE and EXPAND, can be loosely described as the same mask for each of several arrays, a separate mask for each array, and the same array for each of several masks.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.