Category:ALGOL 68

From Rosetta Code

Jump to: navigation, search

Programming Language
ALGOL 68 is a programming language. It may be used to instruct computers to accomplish a variety of tasks which may or may not be domain-specific. You may find a list of its implementations here.

Listed below are all of the tasks on Rosetta Code which have been solved using ALGOL 68.

See also: ALGOL 68 on the HOPL


ALGOL 68 (short for ALGOrithmic Language 1968) is an imperative computer programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously defined syntax and semantics.

The main aims and principles of design of ALGOL 68:

  1. Completeness and clarity of design,
  2. Orthogonal design,
  3. Security,
  4. Efficiency:
    • Static mode checking,
    • Mode-independent parsing,
    • Independent compilation,
    • Loop optimization,
    • Representations - in minimal & larger character sets.

Contents

[edit] Resources

  • ALGOL BULLETIN - March 1959 to August 1988, in 52 issues[1]
  • Algol68 mailinglist - December 2008 - algol68-user AT lists.sourceforge.net[2]

[edit] Status

  • 20th December 1968 - ALGOL 68's Final Report was ratified by UNESCO's IFIP working group 2.1 in Munich.
  • 20th December 2008 - Zig Zag - the 100th ALGOL 68 page on rosettacode.org!
    • Happy 40th Birthday ALGOL 68,
    • AND 50th Birthday ALGOL 58.

[edit] Revisions

  • Mar. 1968: Draft Report on the Algorithmic Language ALGOL 68 - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster.
  • Oct. 1968: Penultimate Draft Report on the Algorithmic Language ALGOL 68 - Chapters 1-9 - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster.
  • Dec. 1968: Report on the Algorithmic Language ALGOL 68 - Offprint from Numerische Mathematik, 14, 79-218 (1969); Springer-Verlag. - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster.
  • Sep 1973: Revised Report on the Algorithmic Language Algol 68 - Springer-Verlag 1976 - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck, C.H.A. Koster, M. Sintzoff, C.H. Lindsey, L.G.L.T. Meertens and R.G. Fisker.

[edit] Code samples

Most of the code samples provided here have a leading main:( and a matching ) at the end. These are not actually required in the language, but are included so as to highlight that the code sample is complete, and works with (at least) ALGOL 68G unmodified.

On some compilers, it may be necessary to include appropriate "job cards" or precludes in order for the programs to compile successfully. Hopefully not too much else is required. Examples:

Brief Algol68 Algol68 as in rosettacode Actual ELLA Algol 68RS code
print(("Hello, world!",new line))
main:(
  print(("Hello, world!",new line))
)
PROGRAM helloworld CONTEXT VOID
USE standard
BEGIN
  print(("Hello, world!", new line))
END
FINISH

[edit] Coercion (casting)

ALGOL 68 has a hierarchy of contexts which determine which kind of coercions are available at a particular point in the program. These contexts are:

  • soft - deproceduring
  • weak - dereferencing or deproceduring, yielding a name
  • meek - dereferencing or deproceduring
  • firm - meek, followed by uniting
  • strong - firm, followed by widening, rowing or voiding

Depending on the context a MODE (type) will be coerced (widened) to another type if there is no loss of precision. For example: An INT will be coerced to a REAL, and a REAL will be coerced to a LONG REAL. But not visa-versa. Examples:

  • INT to REAL
  • REAL to COMPL
  • BITS to []BOOL
  • BYTES to STRING

A variable can also be coerced (rowed) to an array of length 1. For example:

  • INT to [1]INT
  • REAL to [1]REAL etc

Pointers are followed (dereferenced), For example:

  • REF REF REAL to REAL

Subcategories

This category has only the following subcategory.

A

Pages in category "ALGOL 68"

The following 101 pages are in this category, out of 101 total.

1

A

B

C

D

E

F

F cont.

G

H

I

J

K

L

M

N

O

P

P cont.

Q

R

S

T

U

V

W

Y

Z

Personal tools