home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
norge.freeshell.org (192.94.73.8)
/
192.94.73.8.tar
/
192.94.73.8
/
pub
/
computers
/
cpm
/
alphatronic
/
ALGOL-M.ZIP
/
GOTOTEST.ALG
< prev
next >
Wrap
Text File
|
1999-03-13
|
512b
|
28 lines
BEGIN
COMMENT THIS PROGRAM DOESN'T DO MUCH EXCEPT TEST GOTO STATEMENTS;
INTEGER A,B,C;
INTEGER I;
FOR I:=1 STEP 1 UNTIL 10 DO
BEGIN
IF I=8 THEN GO TO NEXTSTMT;
WRITE(I);
END;
NEXTSTMT:WRITE("NEXTSTMT");
WHILE 1=1 DO
BEGIN
I:=I+1;
IF I=12 THEN GO TO NEXTSTMT ELSE
GO TO LASTSTMT;
END;
LASTSTMT:WRITE("LASTSTMT");
BEGIN
READ(A);
WRITE(I);
IF A=5 THEN GOTO QUIT;
GO TO NEXTSTMT;
QUIT:WRITE("END");
END;
END
EOF