BALGOL is a programming language created in 1959 by Bob Barton.
#2025on PLDB | 65Years Old |
INTEGER I..., J..., K..., L..., M..., N...$
BOOLEAN KEEP, LAST$
REAL MAT..., JOULES$
REAL OTHERWISE$
FUNCTION TORADS(DEGREES) = DEGREES . 3.1415926/180$
FUNCTION PYTHAGOREAN(A, B) = SQRT(A*2 + B*2)$
FOR I = 1, 3, 5, 7, 11, (13, 7, 99), 101, (103, 1, 125)$
A(I) = I$
UNTIL A > 125 OR OUTTAHERE$
BEGIN
OUTTAHERE = A EQL 77$
A = A + 3
END$
Feature | Supported | Example | Token |
---|---|---|---|
Conditionals | ✓ | EITHER IF A > B$ FWD = 1$ OTHERWISE$ FWD = 0$ | |
Assignment | ✓ | ALPHA = BETA = GAMMA = 2DELTA + 1$ | |
Expressions | ✓ | ALPHA + BETA / GAMMA | |
Functions | ✓ | FUNCTION TORADS(DEGREES) = DEGREES . 3.1415926/180$ | |
Lists | ✓ | ARRAY MONTHDAYS(12) = (31,28,31,30,31,30,31,31,30,31,30,31)$ | |
Booleans | ✓ | ||
Floats | ✓ | ||
Integers | ✓ |