Algol 68 was conceived as a successor to Algol 60, with special attention given to wide applicability and a rigorously defined syntax. The contribution of Algol 68 to the development of computer science comes from original design concepts which were passed on in one form or another to many of the later developed programming languages. The language has compact, orthogonal syntax and strong typing that eliminates many programming errors. It has been said that those who used the language remember it as a beautiful means of denoting algorithms.
Algol68G consists of the command-line program a68g
that is an Algol 68 subset interpreter. Algol68G is a check-out system, intended for small to medium size algorithms, that first translates a program entirely into an intermediate representation whereafter the latter is interpreted. Therefore, considering function, it resembles FLACC [Mailloux 1978]. Being a check-out system, a68g
is suited for small to medium size programs that solve not too complex problems. Algol68G offers multi-precision arithmetic and graphic routines, for instance for the X Window System. Although Algol68G is not a full implementation, it is more complete than Algol68C.
The software described in this manual has no warranty, it is provided "as is". Consult the GNU General Public License for further details.
From the command-line you would use
a68g [option | file] ...
Options are passed to a68g
either from the file .a68g.rc
in the working directory, the command-line or through pragmats. Precedence is as follows: pragmats supersede command-line options, command-line options supersede options in .a68g.rc
. Options are not case sensitive. In the list below, bold letters denote letters mandatory for recognition. Listing options, tracing options and -pragmat, -nopragmat
, take their effect when they are encountered in a left-to-right pass of the program text, and can thus be used, for example, to generate a cross reference for a particular part of the user program.
-print
unita68g
can execute one-liners from the command-line. The one-liner is written in file .a68g.x
in the working directory. See also -execute
.-execute
unita68g
can execute one-liners from the command-line. The one-liner is written in file .a68g.x
in the working directory. See also -print
.a68g
manages allocation and de-allocation of heap space. However, if memory would be unbound, a68g
might claim all available memory before the garbage collector is called. This would impede overall system performance. Therefore memory size is bound.
-heap
numbera68g
will use the heap to store temporary arrays, so even a program that has no heap generators requires some heap space, and might even invoke the garbage collector. Current default value is 4096.-handles
number-frame
number-stack
number-extensive
-listing
-moids
-preludelisting
-source, -nosource
-statistics
-terminal
stdout
.-tree, -notree
-unused
-xref, -noxref
-assertions, -noassertions
-trace, -notrace
-help
-check, -norun
-nowarnings
-pragmats, -nopragmats
-pragmats
.-precision
numberLONG LONG
modes to number significant digits. The precision cannot be less than the precision of LONG
modes. Note that a68g
algorithms for extended precision are not really suited for precisions larger than a few thousand digits.-timelimit
number-verbose
a68g
will inform you on its actions.-version
a68g
.$ a68g -p 'long long pi' -prec 250
+3.141592653589793238462643383279502884197169399375105820974944592307816
406286208998628034825342117067982148086513282306647093844609550582231725
359408128481117450284102701938521105559644622948954930381964428810975665
933446128475648233786783165271201909E +0
$
$ a68g -e "INT m = read int, n = read int; print ((m + n, m - n))"
20 10
+30 +10
$
Algol68G implements an extended subset of the language described in [Revised Report 1975]. A program is parsed and when it is found to be free of errors, the resulting syntax tree, that functions as an intermediate program representation, is interpreted offering many runtime checks; therefore Algol68G resembles FLACC [Mailloux 1978]. Algol68G employs the classical multi-pass scheme to parse Algol 68 [Lindsey 1993].
PROC VOID
.NIL
.INT
and BITS
on 32-bit platforms. Not all platforms support this correctly (more details).
REAL
is C
type double
. Note that there is no implementation of a single precision SHORT REAL
.LONG INT, LONG REAL, LONG COMPLEX
with roughly doubled precision with respect to INT, REAL, COMPLEX
.LONG LONG INT, LONG LONG REAL
and LONG LONG COMPLEX
which are modes with user defined precision.FORMAT
and format-texts are not implemented and therefore straightening is omitted. Algol68G handles files as streams, not as BOOK
s.BITS
is in hexadecimal digits.BYTES
is not implemented.SEMA
is also not implemented.() INT
must be written as [] INT
. The rationale for having alternative notations was that in the sixties and seventies when Algol 68 was developed, not all IO devices featured [
and ]
symbols...
' which is the Pascal style. For instanceMODE A = [1 .. n] INT; A z; z [1 .. n OVER 2];
FLEX [1 : 0] [1 : 3] CHAR s := "A string with more than three characters"
COMPLEX
as well as COMPL
.ANDF
and ORF
, defined astertiary 1 ANDF tertiary 2 = IF tertiary 1 THEN tertiary 2 ELSE FALSE FI
tertiary 1 ORF tertiary 2 = IF tertiary 1 THEN TRUE ELSE tertiary 2 FI
System | MWhets |
VAX 11/785 | 1 |
CDC Cyber 180-855 | 2 |
VAX 8650 | 4 |
LONG LONG INT, LONG LONG REAL, LONG LONG COMPLEX
) are not really suited for precisions larger than about a thousand digits. Larger precisions are handled but with a performance penalty with respect to the state of the art in the field of multi-precision calculations. The rationale here is that whenever such high precision is needed, Algol68G would not be the tool of choice on efficiency considerations.Algol68G offers a number of routines for drawing. To this end it implements a subset of libplot from GNU plotutils. This allows for drawing in X Windows, postscript format, pseudo graphical interface format (pseudo-gif) and portable any-map format (pnm) from Algol 68. Note that Algol68G is not an Algol 68 binding for libplot.
A plotter (window, postscript file, etcetera) can be considered as a stream to which plotting commands are written, hence Algol68G considers plotters to be objects of mode REF FILE
. This seems consistent with the design of Algol 68 transput as a file is associated with a channel that describes the device, and therefore can be considered as a description of a device driver.
A plotter must be opened and closed, just like any file. To specify the file to be a drawing device, stand draw channel is declared in the standard environment, that yields TRUE
when inspected by draw possible. To specify details on the plotter type and page size, a procedure make device has to be used. For example:
FILE window;
# 'window' is an X window with 600x400 pixels #
make device (window, "X", "600x400");
open (window, "Hello!", stand draw channel);
draw erase (window);
# Only now does the window appear on the screen #
# Goto pixel 0.25x600, 0.5x400 #
draw move (window, 0.25, 0.5);
# Color will be 100% red, 0% green, 0% blue #
draw colour (window, 1, 0, 0);
# Write an aligned text #
draw text (window, "c", "c", "Hello!");
# Give audience a chance to read the message #
VOID (read char);
close (window);
# The window disappears from the screen #
Implemented drawing routines are part of the standard environment.
PROC make device = (REF FILE file, STRING type, STRING params) VOID
PROC draw erase = (REF FILE file) VOID
PROC draw show = (REF FILE file) VOID
PROC draw move = (REF FILE file, REAL x, y) VOID
PROC draw aspect = (REF FILE file) REAL
PROC draw fill style = (REF FILE file, INT level) VOID
16r0001
.. 16rffff
, indicates that objects should be filled. A value of 1 signifies 100% filling; the fill colour will be the colour specified by calling draw colour. If level = 16rffff
, the fill colour will be white. Values 16r0002
.. 16rfffe
represent a proportional saturation level, for instance 16r8000
denotes 50%.PROC draw linestyle = (REF FILE file, [] CHAR style) VOID
"solid" --------------------------------
"dotted" - - - - - - - -
"dotdashed" ---- - ---- - ---- -
"shortdashed" ---- ---- ---- ----
"longdashed" ------- ------- -------
"dotdotdashed" ---- - - ---- - -
"dotdotdotdashed" ---- - - - ---- - - -
In the preceding patterns, each hyphen stands for one line thickness. This is the case for sufficiently thick lines, at least. So for sufficiently thick lines, the distance over which a dash pattern repeats is scaled proportionately to the line thickness. The "disconnected" line style is special. A "disconnected" path is rendered as a set of filled circles, each of which has diameter equal to the nominal line thickness. One of these circles is centred on each of the juncture points of the path (i.e., the endpoints of the line segments or arcs from which it is constructed). Circles with "disconnected" line style are invisible. Disconnected circles are not filled. All line styles are supported by all plotters.
PROC draw linewidth = (REF FILE file, REAL thickness) VOID
PROC draw background colour = (REF FILE file, REAL red, green, blue) VOID
PROC draw background color = (REF FILE file, REAL red, green, blue) VOID
PROC draw background colour name = (REF FILE file, STRING name) VOID
PROC draw background color name = (REF FILE file, STRING name) VOID
PROC draw colour = (REF FILE file, REAL red, green, blue) VOID
PROC draw color = (REF FILE file, REAL red, green, blue) VOID
PROC draw colour name = (REF FILE file, STRING name) VOID
PROC draw color name = (REF FILE file, STRING name) VOID
PROC draw point = (REF FILE file, REAL x, y) VOID
PROC draw line = (REF FILE file, REAL x, y) VOID
PROC draw rect = (REF FILE file, REAL x, y) VOID
PROC draw circle = (REF FILE file, REAL x, y, r) VOID
PROC draw text = (REF FILE file, CHAR horiz_justify, vert_justify, [] CHAR s) VOID
'l', 'c'
, or 'r'
, then the string will be drawn with left, centre or right justification, relative to the current graphics cursor position. If vert_justify is equal to 'b', 'x', 'c'
, or 't'
, then the bottom, baseline, centre or top of the string will be placed even with the current graphics cursor position. The graphics cursor is moved to the right end of the string if left justification is specified, and to the left end if right justification is specified. The string may contain escape sequences of various sorts (see section Text string format and escape sequences in the plotutils manual), though it should not contain line feeds or carriage returns; in fact it should include only printable characters. The string may be plotted at a nonzero angle, if draw textangle has been called.
PROC draw text angle = (REF FILE file, INT angle) VOID
PROC draw font name = (REF FILE file, [] CHAR name) VOID
PROC draw font size = (REF FILE file, INT size) VOID
Algol68G implements a small vector library that relaxes the limitation that the interpreter poses on speed in arithmetic operations. Using these elementary procedures, more complex operations can be programmed. Consider for instance multiplication of a matrix m times a vector b:
FOR n TO UPB a DO a[n] := vector inner product(m[n, ], b) OD;
The procedures in the vector library are optimised for speed, although they still perform runtime checks on vector length, initialisation, assignment to NIL
and division by zero. Please note that the procedures strictly process vector elements sequentially as in
PROC vector add = ([] REAL a, b, c) VOID:
Following is a list of available procedures.
PROC vector set = (REF [] REAL a, REAL b) VOID
PROC vector times scalar = (REF [] REAL a, REAL b) VOID
PROC vector move = (REF [] REAL a, [] REAL b) VOID
PROC vector plus = (REF [] REAL a, [] REAL b, [] REAL c) VOID
PROC vector minus = (REF [] REAL a, [] REAL b, [] REAL c) VOID
PROC vector times = (REF [] REAL a, [] REAL b, [] REAL c) VOID
PROC vector div = (REF [] REAL a, [] REAL b, [] REAL c) VOID
PROC vector inner product = ([] REAL a, [] REAL b) REAL
PROC vector inproduct = ([] REAL a, [] REAL b) REAL
LONG REAL
precision.Algol68G supports an extension called assertions. Assertions can be viewed in two ways. First, they provide a notation for invariants that can be used to code a proof of correctness together with an algorithm. Hardly anyone does this, but assertions make for debugging statements. The syntax for assertions reads
Under control of the 'assertions' and 'noassertions' pragmat items, the enquiry clause of an assertion is elaborated at runtime. If the enquiry clause yields FALSE
, the program is terminated and a runtime error is generated. Example:
OP FACULTY = (INT n) INT:
will produce a runtime error when FACULTY
is called with a negative argument.
Algol68G is equipped with a refinement preprocessor, that allows programming through stepwise refinement in the style of Wirth's well known lecture. The idea is that program construction is facilitated when the description of the solution to a problem (in casu, an algorithm) can be elaborated as ever more detailed steps until the description of the solution to the problem in Algol 68 is complete. The syntax of a program written this way is
defining identifier,
colon symbol,
paragraph,
point symbol,
refinement definition sequence.
empty.
where paragraph
is a sequence of tokens (Algol 68 text, actually), other than a point symbol
. This form of notation interferes somewhat with Algol 68 notation for labels.
Note that refinements cannot be recursive, nor can their definitions be nested. Also, refinement definitions must be unique, and a refinement can only be applied once (refinements are not procedures).
A trivial example of a program constructed this way is
Less trivial examples can be found in several lectures and text books on top-down program construction through stepwise refinement.
Algol68G will check whether a program looks like a stepwise refined program. The refinement preprocessor is transparent to programs that are not stepwise refined.
INT
to REAL
LONG INT
to LONG REAL
LONG INT
to LONG LONG INT
LONG LONG INT
to LONG LONG REAL
REAL
to COMPLEX
REAL
to LONG REAL
LONG REAL
to LONG COMPLEX
LONG REAL
to LONG LONG REAL
LONG COMPLEX
to LONG LONG COMPLEX
LONG LONG REAL
to LONG LONG COMPLEX
COMPLEX
to LONG COMPLEX
LONG COMPLEX
to LONG LONG COMPLEX
BITS
to [] BOOL
INT int lengths, int shorts, max int, real lengths, real shorts, bits lengths, bits shorts, max abs char, int width, real width, exp width, bits width
REAL max real, small real
LONG INT long max int
LONG REAL long max real, long small real
LONG LONG REAL long long max real, long long small real
REF CHAR errorchar, expchar, flip, flop # constants in Algol 68, names in Algol68G #
MODE DOUBLE = LONG REAL, QUAD = LONG LONG REAL
MODE COMPLEX = STRUCT (REAL re, im), LONG COMPLEX = STRUCT (LONG REAL re, im)
MODE STRING = FLEX [1 : 0] CHAR
MODE ?ROWS = UNION (# a sufficiently large set of rowed-modes #)
MODE NUMBER = UNION (INT, REAL, LONG INT, LONG REAL, LONG LONG INT, LONG LONG REAL)
MODE ?SIMPLIN = UNION (REF INT, REF REAL, REF COMPLEX, REF LONG INT, REF LONG REAL, REF LONG COMPLEX, REF LONG LONG INT, REF LONG LONG REAL, REF LONG LONG COMPLEX, REF BOOL, REF BITS, REF CHAR, REF [] CHAR, PROC (REF FILE) VOID)
MODE ?SIMPLOUT = UNION (INT, REAL, COMPLEX, LONG INT, LONG REAL, LONG COMPLEX, LONG LONG INT, LONG LONG REAL, LONG LONG COMPLEX, BOOL, BITS, CHAR, [] CHAR, STRING, PROC (REF FILE) VOID)
CHANNEL stand in channel, stand out channel, stand back channel, stand draw channel, stand error channel
REF FILE stand in, stand out, stand back, stand error
PROC (REF FILE) BOOL put possible, get possible, bin possible, set possible, reset possible, reidf possible, draw possible
PROC (REF FILE, PROC (REF FILE) VOID) VOID on logical file end, on value error
PROC (REF FILE, STRING, CHANNEL) INT open
PROC (REF FILE) VOID close, space, new line
PROC (REF FILE, STRING) VOID make term
PROC (REF FILE, STRING, STRING) VOID make device
PROC ([] ?SIMPLOUT) VOID write, print
PROC ([] ?SIMPLIN) VOID read
PROC (REF FILE, [] ?SIMPLOUT) VOID put, print f, write f
PROC (REF FILE, [] ?SIMPLIN) VOID get, read f
PROC (REF FILE, [] ?SIMPLOUT) VOID put bin, print bin, write bin
PROC (REF FILE, [] ?SIMPLIN) VOID get bin, read bin
PROC INT read int
PROC LONG INT read long int
PROC LONG LONG INT read long long int
PROC REAL read real
PROC LONG REAL read long real
PROC LONG LONG REAL read long long real
PROC COMPLEX read complex
PROC LONG COMPLEX read long complex
PROC LONG LONG COMPLEX read long long complex
PROC BOOL read bool
PROC CHAR read char
PROC STRING read string
PROC (INT) VOID print int
PROC (LONG INT) VOID print long int
PROC (LONG LONG INT) VOID print long long int
PROC (REAL) VOID print real
PROC (LONG REAL) VOID print long real
PROC (LONG LONG REAL) VOID print long long real
PROC (COMPLEX) VOID print complex
PROC (LONG COMPLEX) VOID print long complex
PROC (LONG LONG COMPLEX) VOID print long long complex
PROC (BOOL) VOID print bool
PROC (CHAR) VOID print char
PROC (STRING) VOID print string
PROC (NUMBER, INT) STRING whole
PROC (NUMBER, INT, INT) STRING fixed
PROC (NUMBER, INT, INT, INT) STRING float
REAL pi
PROC LONG REAL long pi # A constant in Algol 68, a procedure in Algol68G #
PROC LONG LONG REAL long long pi # A constant in Algol 68, a procedure in Algol68G #
PROC (REAL) REAL
sqrt, exp, ln, log, sin, arcsin, cos, arccos, tan, arctan
PROC (LONG REAL) LONG REAL
long sqrt, long exp, long ln, long log, long sin, long arcsin, long cos, long arccos, long tan, long arctan
PROC (LONG LONG REAL) LONG LONG REAL
long long sqrt, long long exp, long long ln, long long log, long long sin, long long arcsin, long long cos, long long arccos, long long tan, long long arctan
Operator tag | Alternative |
= |
EQ |
/= |
NE, ~=, ^= |
< |
LT |
<= |
LE |
> |
GT |
>= |
GE |
& |
AND |
+* |
I |
%* |
MOD |
~ |
NOT |
% |
OVER |
** |
UP, ^ |
+:= |
PLUSAB |
-:= |
MINUSAB |
*:= |
TIMESAB |
/:= |
DIVAB |
%:= |
OVERAB |
%*:= |
MODAB |
+=: |
PLUSTO |
Priority | Operators |
1 |
+:=, -:=, *:=, /:=, %:=, %*:=, +=: |
2 |
OR |
3 |
&, XOR |
4 |
=, /= |
5 |
<, <=, >, >= |
6 |
+, - |
7 |
*, /, %, %*, ELEM |
8 |
**, LWB, UPB |
9 |
+* |
mode A | Implemented operators |
INT LONG INT LONG REAL LONG COMPLEX LONG LONG INT |
OP (A) A +, -, ABS |
INT LONG INT LONG REAL LONG LONG INT |
OP (A) INT SIGN |
REAL |
OP (A) INT ROUND, ENTIER |
LONG REAL |
OP (A) LONG INT ROUND, ENTIER |
LONG LONG REAL |
OP (A) LONG LONG INT ROUND, ENTIER |
COMPLEX LONG COMPLEX LONG LONG COMPLEX |
OP (A) REAL RE, IM, ABS, ARG |
COMPLEX LONG COMPLEX LONG LONG COMPLEX |
OP (A) A CONJ |
BOOL |
OP (A) A ~ |
CHAR |
OP (A) INT ABS |
INT |
OP (A) CHAR REPR |
INT LONG INT LONG LONG INT |
OP (A) BOOL ODD |
?ROWS |
OP (A) INT LWB, UPB |
mode A | Implemented operators |
INT |
OP (A) LONG INT LENG |
LONG INT |
OP (A) LONG LONG INT LENG |
LONG INT |
OP (A) INT SHORTEN |
LONG LONG INT |
OP (A) LONG INT SHORTEN |
REAL |
OP (A) LONG REAL LENG |
LONG REAL |
OP (A) LONG LONG REAL LENG |
LONG REAL |
OP (A) REAL SHORTEN |
LONG LONG REAL |
OP (A) LONG REAL SHORTEN |
COMPLEX |
OP (A) LONG COMPLEX LENG |
LONG COMPLEX |
OP (A) LONG LONG COMPLEX LENG |
LONG COMPLEX |
OP (A) COMPLEX SHORTEN |
LONG LONG COMPLEX |
OP (A) LONG COMPLEX SHORTEN |
mode A | mode B | Implemented operators |
INT |
INT |
OP (A, B) INT +, -, *, %, *%, ** OP (A, B) REAL / OP (A, B) COMPLEX +* OP (A, B) BOOL =, /=, <, <=, >, >= OP (REF A, B) REF A +:=, -:=, *:=, %:=, %*:= |
REAL |
REAL |
OP (A, B) REAL +, -, *, /, ** OP (B, A) REAL +, -, *, /, ** OP (A, B) COMPLEX +* OP (B, A) COMPLEX +* OP (A, B) BOOL =, /=, <, <=, >, >= OP (B, A) BOOL =, /=, <, <=, >, >= OP (REF A, B) REF A +:=, -:=, *:=, /:= |
COMPLEX |
COMPLEX </
td> |
OP (A, B) COMPLEX +, -, *, / OP (B, A) COMPLEX +, -, *, / OP (A, B) BOOL =, /= OP (B, A) BOOL =, /= OP (REF A, B) REF A +:=, -:=, *:=, /:= |
COMPLEX |
INT |
OP (A, B) COMPLEX ** |
LONG INT |
LONG INT |
OP (A, B) LONG INT +, -, *, %, *% OP (B, A) LONG INT +, -, *, %, *% OP (A, B) LONG REAL / OP (B, A) LONG REAL / OP (A, B) LONG COMPLEX +* OP (B, A) LONG COMPLEX +* OP (A, B) BOOL =, /=, <, <=, >, >= OP (B, A) BOOL =, /=, <, <=, >, >= OP (REF A, B) REF A +:=, -:=, *:=, %:=, %*:= |
LONG INT |
INT |
OP (A, B) LONG INT ** |
LONG REAL |
LONG REAL |
OP (A, B) LONG REAL +, -, *, /, ** OP (B, A) LONG REAL +, -, *, /, ** OP (A, B) LONG COMPLEX +* OP (B, A) LONG COMPLEX +* OP (A, B) BOOL =, /=, <, <=, >, >= OP (B, A) BOOL =, /=, <, <=, >, >= OP (REF A, B) REF A +:=, -:=, *:=, /:= |
LONG COMPLEX |
LONG COMPLEX COMPLEX |
OP (A, B) LONG COMPLEX +, -, *, / OP (B, A) LONG COMPLEX +, -, *, / OP (A, B) BOOL =, /= OP (B, A) BOOL =, /= OP (REF A, B) REF A +:=, -:=, *:=, /:= |
LONG COMPLEX |
INT |
OP (A, B) LONG COMPLEX ** |
LONG LONG INT |
LONG LONG INT LONG INT INT |
OP (A, B) LONG INT +, -, *, %, *% OP (B, A) LONG INT +, -, *, %, *% OP (A, B) LONG REAL / OP (B, A) LONG REAL / OP (A, B) LONG COMPLEX +* OP (B, A) LONG COMPLEX +* OP (A, B) BOOL =, /=, <, <=, >, >= OP (B, A) BOOL =, /=, <, <=, >, >= OP (REF A, B) REF A +:=, -:=, *:=, %:=, %*:= |
LONG LONG INT |
INT |
OP (A, B) LONG LONG INT ** |
LONG LONG REAL |
LONG LONG REAL LONG INT |
OP (A, B) LONG LONG REAL +, -, *, /, ** OP (B, A) LONG LONG REAL +, -, *, /, ** OP (A, B) BOOL =, /=, <, <=, >, >= OP (B, A) BOOL =, /=, <, <=, >, >= OP (REF A, B) REF A +:=, -:=, *:= |
LONG LONG COMPLEX |
LONG LONG COMPLEX LONG LONG REAL LONG LONG INT LONG COMPLEX LONG REAL LONG INT COMPLEX REAL INT |
OP (A, B) LONG LONG COMPLEX +, -, *, / OP (B, A) LONG LONG COMPLEX +, -, *, / OP (A, B) BOOL =, /= OP (B, A) BOOL =, /= OP (REF A, B) REF A +:=, -:=, *:=, /:= |
LONG LONG COMPLEX |
INT |
OP (A, B) LONG LONG COMPLEX ** |
BOOL |
BOOL |
OP (A, B) BOOL &, OR, XOR, =, /= |
STRING |
STRING |
OP (A, B) STRING + OP (A, B) BOOL =, /=, <, <=, >, >= |
STRING |
STRING |
OP (REF A, B) REF A +:= OP (B, REF A) REF A +=: |
STRING |
INT |
OP (A, B) STRING * OP (B, A) STRING * |
STRING |
INT |
OP (REF A, B) REF A *:= OP (A, B) CHAR ELEM |
BITS |
BITS |
OP (A, B) BITS &, OR, XOR OP (A, B) BOOL =, /=, <, <=, >, >= |
BITS |
INT |
OP (A, B) BITS SHL, SHR OP (A, B) BOOL ELEM |
INT |
?ROWS |
OP (A, B) INT LWB, UPB |
The current revision of Algol68G implements a Tausworthe generator that has a period of order 2 ** 113, from the GNU Scientific Library,
PROC (INT seed) VOID first random
PROC REAL next random
PROC LONG REAL long next random
PROC LONG LONG REAL long long next random
[0 .. 1>
.PROC (CHAR sought, REF INT pos, STRING text) BOOL char in string
sought
in text
and assigns its position to pos
if found. Returns TRUE
if the character is found.PROC (STRING command) INT system
PROC VOID sweep heap
PROC VOID break
SIGINT
to Algol68G (which usually comes from pressing ctrl-c
). Upon receiving SIGINT
Algol68G will stop in a primitive monitor routine that allows for instance for inspection of stack frames. Hence, calling break
can be useful for debugging purposes.