home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASSRC.ZIP / LABELS.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  844b  |  42 lines

  1.                                 (* Chapter 6 - Program 5 *)
  2. program Label_Illustration;
  3.  
  4. label 274,Repeat_Loop,Help,Dog;
  5.  
  6. var Counter : byte;  (* This limits us to a maximum of 255 *)
  7.  
  8. begin
  9.    Writeln('Start here and go to "help"');
  10.    goto Help;
  11.  
  12. Dog:
  13.    Writeln('Now go and end this silly program');
  14.    goto 274;
  15.  
  16. Repeat_Loop:
  17.    for Counter := 1 to 4 do Writeln('In the repeat loop');
  18.    goto Dog;
  19.  
  20. Help:
  21.    Writeln('This is the help section that does nothing');
  22.    goto Repeat_Loop;
  23.  
  24. 274:
  25.    Writeln('This is the end of this spaghetti code');
  26. end.
  27.  
  28.  
  29.  
  30.  
  31. { Result of execution
  32.  
  33. Start here and go to "help"
  34. This is the help section that does nothing
  35. In the repeat loop
  36. In the repeat loop
  37. In the repeat loop
  38. In the repeat loop
  39. Now go and end this silly program
  40. This is the end of this spaghetti code
  41.  
  42. }