Interactive ALGOL 68
Encyclopedia
The Interactive ALGOL 68 compiler for ALGOL 68
ALGOL 68
ALGOL 68 isan imperative computerprogramming language that was conceived as a successor to theALGOL 60 programming language, designed with the goal of a...

 was made available by Peter Craven of Algol Applications from 1984. Then in 1994 from OCCL (Oxford and Cambridge Compilers Ltd) until 2004.

Platforms

  • Inmos
    INMOS
    Inmos Limited was a British semiconductor company, founded by Iann Barron, with both the head office and the design office at Aztec West in Bristol, it was incorporated in November 1978.- Products :...

     Transputer family
  • Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     for Intel x86 computers
  • OS/2
    OS/2
    OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

     version 2.0 and onward
  • SunOS
    SunOS
    SunOS is a version of the Unix operating system developed by Sun Microsystems for their workstation and server computer systems. The SunOS name is usually only used to refer to versions 1.0 to 4.1.4 of SunOS...

    -4.1.3 (Solaris 1) for SPARC
    SPARC
    SPARC is a RISC instruction set architecture developed by Sun Microsystems and introduced in mid-1987....

    -based computers
  • Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

     95 and Windows NT for Intel

Extensions to standard ALGOL 68

  1. Ability to include source code, and versions of source code.
  2. Nestable comments
  3. FORALL syntactic element for looping over arrays.
  4. ANYMODE a union of all MODEs known to the compiler, and hence dynamic typing.
  5. Enhanced coercions (casting) allowing stringer then "strong" coercions.
  6. Enstructuring automatically coerces a variable from type to struct(type)
  7. Conforming coerces UNION (THING, MOODS) to THING, but if that is not the current mood of the union, then a run-time error will be generated.
  8. Library interface to the native operating system and other libraries.
  9. The operator SIZE
  10. Pseudo-operators ANDTH and OREL, and ANF and ORF for Short-circuit evaluation of Boolean expressions.
  11. Arrays can be slices with stride to select a subset of elements.
  12. MOID is treated differently.

Example of code


MODULE vectors
BEGIN
INT dim=3;
MODE VECTOR = [dim]REAL;
OP + = (VECTOR a, b) VECTOR: ( VECTOR out; FOR i FROM LWB a TO UPB a DO out:=a[i]+b[i] OD; out ),
- = (VECTOR a, b) VECTOR: ( VECTOR out; FOR i FROM LWB a TO UPB a DO out:=a[i]-b[i] OD; out ),
DOT = (VECTOR a, b) REAL: ( REAL out:=0; FOR i FROM LWB a TO UPB a DO out+:=a[i]*b[i] OD; out );
END
KEEP VECTOR, +, -, DOT

Restrictions to the language from the standard ALGOL 68

  1. Variable, Modes and Operators must be declared before use.
  2. Anonymous procedure may use rows-declarer as a parameter.
  3. No transient subnames of flexible arrays.
  4. No formatted Transput (or format-texts).
  5. Restricted use of straightening of multiple values during Transput.
  6. Limited use of BYTES, BITS and BOOL.
  7. restricted use of labels to follow EXIT statements.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK