home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser-CD 2000 January / LCD_01_2000.iso / anwend / luna146 / _english / scripts / fornext.lus < prev    next >
Text File  |  1999-10-13  |  657b  |  21 lines

  1.  
  2. ; Luna script with loops and variables.
  3. ; Variables are integers (long), identified with the percent character '%'.
  4.  
  5. ; With the statement "for i%=65" a variable named "i%" will be created 
  6. ; and this will be assigned the value 65 to initialise the loop.
  7. ; A variable is nothing more than a description that has a small memory 
  8. ; block allocated to it by the program. This memory block can then be 
  9. ; assigned values, or values can be read from it.
  10.  
  11. ; A For/Next-loop may also contain further loops, if their variables
  12. ; have a different description to the higher order loop.
  13.  
  14. ; Example:
  15.  
  16. for i%=65 to 76
  17.   keypress(i%,0)
  18. next i%
  19. end()
  20.  
  21.