Interactive ALGOL 68

The Interactive ALGOL 68 compiler for ALGOL 68 was made available by Peter Craven of Algol Applications from 1984.[1] Then in 1994 from OCCL (Oxford and Cambridge Compilers Ltd) until 2004.[2]

Platforms

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.
gollark: Anyway, if you could make it past that to one of the content pages, they would each have their own loading screens, probably prompt you for the newsletter again, have more irrelevant shiny images, and have excessively large text and a UI designed for 3.5" mobile phone screens.
gollark: They would have close buttons but they would only work 50% of the time.
gollark: Oh, and ones asking for cookie consent and newsletter signup.
gollark: But there would also be a popup asking you to download the app, which would not actually work because I'm not making an app, as well as one asking you to add it to your home screen as a PWA.
gollark: Then it would load into a page containing a bunch of links to all the actual *content*, but each would have a vaguely nice-looking but irrelevant image to occupy half the page and also your internet connection.

See also

References

  1. "AB52.3.1: Survey of Viable ALGOL 68 Implementations". Archived from the original on September 27, 2007. Retrieved April 26, 2007.
  2. "Oxford and Cambridge Compilers Ltd Home Page". Archived from the original on June 12, 2004. Retrieved April 26, 2007.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.