Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Free access

Indexing and indexed replacement in APL

Published: 01 September 1981 Publication History

Abstract

Indexing and indexed replacement have an exceptional syntax. Enclosed arrays make this syntax unnecessary. An operator with an ambivalent derived function is proposed as the solution. The monadic case performs selection; the dyadic case, replacement.

References

[1]
The term 'list' is an informal one, yet there seems to be no other name for this sort of expression. See APL Language (IBM GC26-3847-4, July 1978),p. 54; and Paul Berry, Sharp APL Reference Manual (I.P. Sharp Associates, March 1979), pp. 48-49, 155-156.
[2]
Kenneth E. Iverson, A Programming Language (Wiley; New York, 1962), pp. 11-12.
[3]
Kenneth E. Iverson, 'Formalism in Programming Languages' in Communications of the ACM (Vol. 7, No. 2, Feb. 1964), p. 81, already uses the one-symbol notation.
[4]
This corresponds to the implementation described by Robert Bernecky and Kenneth E. Iverson, 'Operators and Enclosed Arrays' in the APL Users Meeting Proceedings (I.P. Sharp Associates; Toronto, 1980), pp. 319-320. My proposal for an indexing operator, however, is independent of the particular flavor of enclosed arrays used. Its definition remains the same regardless of the kind of enclose and disclose used.
[5]
Ziad Ghandour and Jorge Mezei, 'General Arrays, Operators and Functions' (IBM J. Res. Develop., July 1973) p. 337
[6]
Bernecky and Iverson, op. cit., pp. 320-321
[7]
For example, using the index operator proposed here with Bernecky and Iverson's ö (on) operator, A{Z;;} could be written as (<Z)Iö0 A
[8]
Index origin 0 is assumed throughout this paper.
[9]
James A. Brown, A Generalization of APL (Doctoral Thesis, 1971, Dept. of Systems and Information Sciences, Syracuse University, New York) pp. 142-146
[10]
Berry, op. cit., p. 169; A.D. Falkoff and D.L. Orth, 'Development of an APL Standard', APL79 Conference Proceedings, Part 2 (ACM; Rochester, 1979), p. 437
[11]
Although the English text in the Falkoff/Orth paper quoted in {9} describes assignment as a function, the formal definition in the same paper (p. 422) singles out assignment, treating it separately from all the other primitives.
[12]
see for example the descriptions of assignment and indexed assignment in Falkoff and Orth, op. cit., p. 436-437, and Berry, op. cit., p. 169-170
[13]
E.E. McDonnell, 'MASK and MESH' (APL Workshop, Syracuse University, Minnowbrook, NY; 1980). McDonnell points out that his proposal is descended from definitions of mask and mesh in Iverson's A Programming Language.
[14]
James E. Lucas also has work in progress including proposals for similar extensions to other selection functions.
[15]
Strand notation advocates would have to write, instead, USE X (II)A and USE X(U/) Y
[16]
M.A. Jenkins and J. Michel, 'Operators in an APL Containing Nested Arrays' (Quote Quad, vol. 9, no.2, December 1978), p. 19
[17]
The model is available in the workspace 2035692 INDEXO on the I.P. Sharp APL system. Since it invokes @@@@, the version of the model in that workspace differs from that in this paper in that names start with one underbarred character. This allows users of the model to avoid harming it by limiting their use of names to non-underbarred characters.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGAPL APL Quote Quad
ACM SIGAPL APL Quote Quad  Volume 12, Issue 1
September 1981
354 pages
ISSN:0163-6006
DOI:10.1145/390007
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 September 1981
Published in SIGAPL Volume 12, Issue 1

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)41
  • Downloads (Last 6 weeks)5
Reflects downloads up to 28 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media