home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / pascal_tut / pas / labels < prev    next >
Encoding:
Text File  |  1992-11-14  |  485 b   |  27 lines

  1. PROGRAM label_illustration;
  2.  
  3. LABEL 274,repeat_loop,help,dog;
  4.  
  5. VAR counter : BYTE;  (* This limits us to a maximum of 255 *)
  6.  
  7. BEGIN
  8.   WRITELN('Start here and go to "help"');
  9.   GOTO help;
  10.  
  11. dog:
  12.   WRITELN('Now go and end this silly program');
  13.   GOTO 274;
  14.  
  15. repeat_loop:
  16.   FOR counter := 1 TO 4 DO WRITELN('In the repeat loop');
  17.   GOTO dog;
  18.  
  19. help:
  20.   WRITELN('This is the help section that does nothing');
  21.   GOTO repeat_loop;
  22.  
  23. 274:
  24.   WRITELN('This is the end of this spaghetti code');
  25.  
  26. END.
  27.