skip to main content
article
Free Access

Replicate each, anyone?

Authors Info & Claims
Published:01 January 1987Publication History
Skip Abstract Section

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.

References

  1. 1 J. P. Benkard. "Structural Experiments with Arrays of Functions", APL Quote-Quad, Vol. lS, No. 4 <June 19851. pp. 166-172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 K. E. Iverson. A Progranring Language, John Wiley 6 Sons. Inc. Ncu York (1962). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 J. P. Denkard, "Syntactic Experiments uith Arrays of Functions and Operators", APL z;o;te;Quadr Vol. 14, No. 4 (June 1984),,,pp. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4 K;-E: -iverson, "The Role of Operators in APL", APL Quote-Quad, Vol. 9, No.4-Part 1 (June 1979). pp. 128-133. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5 J. A. Brown. "Function Assignrent and Arrays of Functions", APL Quote-Quad. Vol. 14, No. 4 {June 19141, pp. 81-S. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 J. D. Bunda and J. A. Gortb, "APL- Too by Two Syntax Analysis by Pairoise Reduction", APL Quote-Quad, Vol. 141 No. 4 <June 1984). pp. 85-94. Note: pp. 87, 86 appear before p. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 J. P. Benkard, Extensions". "Valence and Pzecodence in APL APL Quote-Quad. Vol. 13, No. (March 1983). mm). 233-242. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 IBM Corporationr APL2 Language Manual, Order : SH130-9237.Google ScholarGoogle Scholar
  9. 9 J. P. Benkard, "Analysis of Function Application in Deep Arrays". APL Quote-Quad, Vol. 16. No. 4 (July 1984). pp. 202-210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10 D. J. Landaeta. "A Notation for t4anipulating Arrays of Operations". APL Quote-Quad. Vol. 16. No. 4 (July 1986). pp. 21-29. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Replicate each, anyone?

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM SIGAPL APL Quote Quad
              ACM SIGAPL APL Quote Quad  Volume 17, Issue 4
              May 1987
              502 pages
              ISSN:0163-6006
              DOI:10.1145/384282
              Issue’s Table of Contents
              • cover image ACM Conferences
                APL '87: Proceedings of the international conference on APL: APL in transition
                January 1987
                512 pages
                ISBN:0897912268
                DOI:10.1145/28315

              Copyright © 1987 Author

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 January 1987

              Check for updates

              Qualifiers

              • article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader