home *** CD-ROM | disk | FTP | other *** search
/ Speccy ClassiX 1998 / Speccy ClassiX 98.iso / amiga_system / tools / ncomm3.0 / scripts / count.script < prev    next >
Encoding:
Text File  |  1978-05-22  |  385 b   |  22 lines

  1. ;NComm script that demonstrates three different ways to count from 1 to 100
  2.  
  3. SET $sum="0"
  4.  
  5. WHILE !$sum == "100" DO
  6.     SET $sum = $sum+"1"#
  7.     MESSAGE "While: "$sum"\n"
  8. ENDWHILE
  9.  
  10. SET $sum="0"
  11.  
  12. REPEAT
  13.     SET $sum = $sum+"1"#
  14.     MESSAGE "Repeat: "$sum"\n"
  15. UNTIL $sum == "100"
  16.  
  17. SET $sum="0"
  18.  
  19. SUM: SET $sum = $sum+"1"#
  20.      MESSAGE "Goto: "$sum"\n"
  21.      IF !$sum == "100" THEN GOTO SUM
  22.