Skip to main content
main-content

Über dieses Buch

This book is designed for people with a working knowledge of APL who would like to increase their fluency in the wide range of extra facilities offered by second-generation APL products. Although the primary product in view is IBM's APL2 as implemented on mainframe, PC and RS/6000, the language fea­ tures covered share considerable common ground with APL *PLUS II and Oyalog APL. This is a book about skills rather than knowledge, and an acquaintance with some variety of APL on the reader's part is assumed from the start. It is designed to be read as a continuous text, interspersed with exer­ cises designed to give progressively deeper insight into what the authors conceive as the features which have the greatest impact on programming techniques. It would also be suitable as a text-book for a second course in APL2, although experience suggests that most programming language learning is now by self­ study, so that this volume is more likely to provide follow-up reading to more elementary texts such as "APL2 at a Glance" by Brown, Pakin and Polivka. Material is discussed more informally than in a language manual - in this book textual bulk is in proportion to difficulty and importance rather than to the extent of technical details. Indeed, some APL2 extensions are not covered at all where the technicalities pose no great problems in understanding and can be readily assimilated from the language manuals.

Inhaltsverzeichnis

Frontmatter

1. Functions and Arrays in APL2

Abstract
Compared with first-generation APL, APL2 brought about a vast explosion in the amount of data types and structures which can be modelled. This chapter starts with a discussion of data structures in APL2, beginning with nested arrays and followed by some notes on complex numbers. There then follows a discussion of the principal APL2 primitive functions under the headings of
  • Construction
  • Selection
  • Replacement
  • Restructuring
  • Comparison and Enquiry
Norman D. Thomson, Raymond P. Polivka

2. Operators

Abstract
All programming languages contain a set of fundamental instructions to transform data which are collectively referred to asoperations. In APL2 operations are subdivided into two categories, functions and operators. Data transformation occurs directly through functions or indirectly through operators. The following figure illustrates the relationship of functions and operators.
Norman D. Thomson, Raymond P. Polivka

3. Elementary Data Structuring

Abstract
The objective of this chapter is to demonstrate the effectiveness of APL2 in dealing with relatively straightforward commercial and financial programming situations based on real applications. There are two main sections each of which is given in the form of an extended illustration with narrative. The final exercises try to show how rapidly a reasonably substantial application can be built up from scratch.
Norman D. Thomson, Raymond P. Polivka

4. Using Functions and Arrays

Abstract
Chapters 1 and 2 discussed functions and operators in relative isolation. Chapters 4 and 5 are about the interactions of various functions and operators and thus provide a study in greater depth of the features of APL2 which are most intimately connected with nested arrays and the associated operations of enclose, disclose and each. Although the basic concepts are few a new perspective is required in order to acquire fluency in application. There is an analogy to the mental leap needed to move from thinking in two dimensional geometry to thinking in three dimensions. Data objects in first-generation APL possess data and structure where structure is synonymous with shape. In APL2 structure is given the additional aspect of depth, thereby releasing the user from the shackles of rectangular data structure and thus making it possible to model data structures of almost indefinite complexity. The price of the flexibility afforded by the combination of data, depth and shape is that the simultaneous control of all three is a skill which has to be consciously acquired through practice in order to exploit the great programming versatility which nested arrays afford.
Norman D. Thomson, Raymond P. Polivka

5. Using Operators

Abstract
Although nested arrays are the most distinctive feature of APL2, operator extensions provide at least as great an advance. There are two aspects to operator extension — first the provision of user-defined operators, and secondly the extension of existing operators to nested arrays and to user-defined functions and derived functions. These two features increase by a huge factor the expressiveness of APL2 in describing programming ideas.
Norman D. Thomson, Raymond P. Polivka

6. Advanced Modelling and Data Structures

Abstract
Chapter 3 interrupted the discussion of APL features in order to give some simple applications in which nested arrays prove their worth. This chapter performs a similar role, but the applications are now typical problems which arise in Operational Research and involve more sophisticated uses of the techniques of the previous chapters. The problem situations involved are designed to illustrate how some commonly occurring data structures can be modelled in APL2, and how APL2 programs can be built round them in a systematic fashion.
Norman D. Thomson, Raymond P. Polivka

Backmatter

Weitere Informationen