Apple (programming Language)
   HOME

TheInfoList



OR:

Apple is a
PL/I PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has b ...
dialect programming language created by
General Motors Research Laboratories General Motors Research Laboratories are the part of General Motors responsible for creation of the first known operating system ( GM-NAA I/O) in 1955 and contributed to the first mechanical heart An artificial heart is a device that replace ...
for their
Control Data Corporation Control Data Corporation (CDC) was a mainframe and supercomputer company that in the 1960s was one of the nine major U.S. computer companies, which group included IBM, the Burroughs Corporation, and the Digital Equipment Corporation (DEC), the N ...
STAR-100 The CDC STAR-100 is a vector supercomputer that was designed, manufactured, and marketed by Control Data Corporation (CDC). It was one of the first machines to use a vector processor to improve performance on appropriate scientific applications. I ...
supercomputer. Apple is a subset of full PL/I, but has been extended to integrate with the
Associative Programming Language The Associative Programming Language (APL) is a database language developed by General Motors Research Laboratories in 1966. APL was developed to provide high-level language data access and manipulation functions to support GM's CADANCE interactiv ...
(APL – not to be confused with
APL (programming language) APL (named after the book ''A Programming Language'') is a programming language developed in the 1960s by Kenneth E. Iverson. Its central datatype is the multidimensional array. It uses a large range of special graphic symbols to represent m ...
)"George oddbuilt a very attractive IDS like system, called 'Associative Programming Language' (APL) which was integrated with PL/1. General Motors used it extensively in the graphic design system for automotive development. IBM latter asked GM to give up the initials, APL, so they could use them with their, 'A Programming Language.'”


Associative programming features


Other features

An OFFSET variable identifies the relative location of a based variable in the containing file. A DESCRIPTOR variable resembles a pointer variable, but also contains the length of the associated based variable in addition to its address. The LOCK statement puts a program into "locked status", where all asynchronous events will be queued. A corresponding UNLOCK statement puts the program in "unlocked status", capable of processing asynchronous events. All queued events will be processed.


Asynchronous processing

Apple uses the PL/I EVENT data type to implement asynchronous processing. An event variable can be associated with an external action, such as a keypress at the user's terminal, by a system call. Each event has a "delay state" and a "completion state" associated with it. When the event associated with the action occurs, the event becomes complete, and remains complete until the program accesses the information associated with the event. Events can also be marked complete with a SIGNAL statement, rather than the PL/I standard assignment to theCOMPLETION pseudovariable. An event can be put into a delay state by the DELAY pseudovariable, and recognition will remain deferred until the program resets the delay state. Events can be associated with "ON-Units", by the ON EVENT statement, similar to PL/I standard for conditions. The REVERT statement removes the association. When the event is recognized (complete and not delayed) the On-Unit is executed. This ON-Unit can access system information about the event using the ONPTR builtin function, which returns the address of an "Event Completion Block", and sets the event to complete.


Hardware access

The REGISTER storage class and the INLINE builtin subroutine allow access to STAR hardware features. A scalar arithmetic variable can be declared REGISTER egister-specification/code>. register-specification can be an unsigned integer constant 0..255 to specify one of the computer's hardware registers. If it is omitted the compiler will assign a register. The INLINE builtin subroutine inserts an arbitrary machine-language instruction into the compiled code. Except for the function code (operation code) and subcode of the instructions all operands can be numeric constants, variables, or arithmetic constants. Example: CALL INLINE("F8", 5, 0, SOURCE, 0, "20", 0, TARGET);


Text replacement

The LITERALLY specification allows the programmer to specify replacement text to be substituted at compile time. The syntax is: %DECLARE <identifier> LITERALLY (<parameter-list> ) <character-constant> ; If <parameter-list> is not specified the compiler replaces all occurrences of <identifier> throughout the program with <character-constant>.If <parameter-list> is specified, the replacement character string is formed by replacing all occurrences of the parameter name with the corresponding argument. Example: %DECLARE BITS LITERALLY(A1,A2) 'A1*A2*64'; I = BITS(J,B); will generate the statement: I=J*8*64;


Omitted PL/I features

Some features of standard PL/I are not included in Apple. The most significant are: * The CONTROLLED and AREA storage attributes are not supported. FILE and FILESET have many of the characteristics of AREA. * List-directed and data-directed input and output are not supported. * Record input-output statements, including READ, WRITE, REWRITE, LOCATE, and DELETE. DELETE is used as a synonym for FREE when deleting ENTITY variables.


References

{{Reflist


External links


APL: a language for associative data handling in PL/I
PL/I programming language family Programming languages General Motors