home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- * * 09/92 DOFOR.PRG *
- *****************************************************************
- * * Author's Name: Jeb Long *
- * * *
- * * Description: *
- * * This program compares the speed between DO and FOR *
- * * *
- *****************************************************************
- *
- SET TALK OFF
- start = SECONDS()
- counter = 1
- DO WHILE counter < 10000
- counter = counter + 1
- ENDDO
- DOfinish = SECONDS()
- FOR counter=1 TO 10000
- ENDFOR
- FORfinish = SECONDS()
- ? "For 10000 iterations:"
- ? " DO WHILE loop took", DOfinish-start, "seconds"
- ? " FOR loop took ", FORfinish-DOfinish, "seconds"
- RETURN