How Stop an infinite loop?
Please
Code: Select all
WHILE("TRUE")
$result=GETFILE("*.*")
IF($result!="OK")
PRINT("ERROR in GetFile, exiting")
# Exit with error code 1
EXIT(1)
ELSE
PRINT("All files downloaded. Waiting 2 seconds")
SLEEP(2)
END IF
DELETEFILE("*.*")
END WHILE
Please
Hi,
Try:
Good luck -
-A
Try:
Code: Select all
If I'm following what you are trying to do properly that should change the conditional for the loop so that it stops executing.$blnLoop=="TRUE"
WHILE($blnLoop=="TRUE")
 $result=GETFILE("*.*")
 IF($result!="OK")
PRINT("ERROR in GetFile, exiting")
# Exit with error code 1
EXIT(1)
ELSE
PRINT("All files downloaded. Waiting 2 seconds")
SLEEP(2)
END IF
$delresult=DELETEFILE("*.*")
IF($result!="OK")
 $blnLoop="FALSE"
END IF
END WHILE
Good luck -
-A