home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Programa / AGSPC1B2.ZIP / WHILE.PPS < prev   
Encoding:
Text File  |  1996-07-28  |  321 b   |  23 lines

  1. ;
  2. ;  This example illustrates the different uses of the While statement
  3. ;
  4.  
  5. Int A, B
  6.  
  7. ; Simple While statement
  8. A = 0
  9. While (A < 10) Inc A
  10.  
  11. ; Complex while statement
  12. A = 0
  13. While (A < 10) Do
  14.     Print A
  15.     Inc A
  16. EndWhile
  17.  
  18. ; Chained simple While statements 
  19. A = 0
  20. While (A <> 0) While (B <> 0) Inc B
  21.  
  22.  
  23.