mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-11-14 06:55:30 +00:00
Added another sample for PL/0.
This commit is contained in:
parent
7cc8d51162
commit
906125e7d3
18
language/pl0/samples/square.pas
Normal file
18
language/pl0/samples/square.pas
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
VAR x, squ;
|
||||
|
||||
PROCEDURE square;
|
||||
BEGIN
|
||||
squ:= x * x
|
||||
END;
|
||||
|
||||
BEGIN
|
||||
x := 1;
|
||||
WHILE x <= 10 DO
|
||||
BEGIN
|
||||
CALL square;
|
||||
! squ;
|
||||
x := x + 1
|
||||
END
|
||||
END.
|
||||
|
Loading…
Reference in New Issue
Block a user