Browse Prior Art Database

Structured Programming Language for APL

IP.com Disclosure Number: IPCOM000077843D
Original Publication Date: 1972-Sep-01
Included in the Prior Art Database: 2005-Feb-25
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

Kelley, RA: AUTHOR

Abstract

A structured language for APL may be written employing ALGOL-like or PL/1-like syntax. The result is a language superimposing interstatement control structure on APL. As a consequence, programs may be written using standard APL expressions in conjunction with linguistic structures to emphasize more of the overall program control flow, rather than the details of individual statements.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Structured Programming Language for APL

A structured language for APL may be written employing ALGOL-like or PL/1-like syntax. The result is a language superimposing interstatement control structure on APL. As a consequence, programs may be written using standard APL expressions in conjunction with linguistic structures to emphasize more of the overall program control flow, rather than the details of individual statements.

Source APL programs may be written, using either PL/1 or ALGOL-like syntax with this APL-ALGOL compiler technique. The statements are equivalent in semantics, but vary somewhat in syntax. For example, the APL Statements, If Statements, Return Statements and Repeat Statements are identical in both versions; however, in the PL/1 form, the keyword "BEGIN" is replaced by "DO;", the "END" by "END;", the For Statement by the Iterative Do Statement, the keyword "WHILE" by "DO WHILE", etc. Either syntax may be used for a single APL-ALGOL program. The same APL-ALGOL compiler may accommodate either syntax by selecting the appropriate set of syntax tables.

An exemplary compiler technique could be arranged as follows: Statements in APL-ALGOL include the If, Iteration, Return, Null and APL Statements, in addition to the Block Statements. The APL Statement is simply an APL expression terminated by a semicolon, thereby permitting the programmer access to all the standard APL expressions and operations in APL-ALGOL. Each APL Statement is translated into a single line of APL object text after removing the final semicolon. The Return Statement has two forms, the first of which is used simply to effect an exit from the current procedural level to the one immediately above. The second form provides for the execution of an accompanying expression before returning. A Null Statement does not cause any action, and is useful mainly in conjunction with a Case Block Statement to specify null actions. APL-ALGOL Block Statements are described as follows:
1) The Simple Block Statement is used for grouping statements

into a

single unit with logical boundaries, similar to parenthesis.

The BEGIN/END or DO;/END; stat...