PLZ is a programming language created in 1978 by Charlie Bass.
#2069on PLDB | 46Years Old |
PLZ/SYS is intended to aid the implementation of system programs for microcomputers. PLZ/SYS is a synthesis of concepts from contemporary programming languages and compilers--the language Pascal has had the most notable influence on the overall design and implementation of PLZ/SYS.
bubble sort MODULE
CONSTANT
false : .. 0
true := 1
EXTERNAL
printarray PROCEDURE (first tWORD count BYTE)
INTERNAL
a ARRAY [10 WORD]
:= [33 10 2000 400 410
3 3 33 500 1999]
sort PROCEDURE (n BYTE)
LOCAL
i j limit BYTE
temp WORD
switched BYTE
ENTRY
DO
switched := false
i := 0
limit := n-2
DO
IF i > limit THEN EXIT FI
j := i + 1
IF a[i] > a[j] THEN
switched := true
temp :'" a [i)
a[i] := a[j]
a [j] : .. temp
FI
i +- 1
OD
IF switched .. false THEN RETURN FI
END sort
GLOBAL
main PROCEDURE
ENTRY
sort (10)
printarray(ta[O] 10)
END main
END bubble sort
Feature | Supported | Example | Token |
---|---|---|---|
Booleans | ✓ | true false |