PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Reason
  • Tip
  • Examples
  • Using the LOOP statement without a BREAK statement
  • Using the WHILE statement without condition and without BREAK statement
  • Loop used to get information about a serial port
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning 36: No BREAK, RETURN or RESULT was detected in the code of the loop
Reason
A LOOP or WHILE statement is used in the current code. No statement is used in this code to force the exit from the loop: a deadlock may occur.
Tip
Check whether your loop is not an endless loop and whether it is possible to force the exit from the statement block (by using the BREAK, RETURN or RESULT statement for example).
Examples

Using the LOOP statement without a BREAK statement

Code triggering the "Warning"
LOOP
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        ProcessLine(ALine)
END


Possible correction

Add a line allowing you to process the exit from the loop (in this example, code used to find out whether the end of the file has been reached).
LOOP
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        IF ALine = EOT THEN BREAK
        ProcessLine(ALine)
END

Using the WHILE statement without condition and without BREAK statement

Code triggering the error
WHILE ALine<>EOT
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        ProcessLine(ALine)
END
Possible correction
Add a line allowing you to process the exit from the loop (in this example, code used to find out whether the end of the file has been reached).
WHILE ALine<>EOT
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        IF ALine = EOT THEN BREAK
        ProcessLine(ALine)
END

Loop used to get information about a serial port

Code triggering the error
// Event for calling a procedure (with EndProgram)
LOOP
// Loop process to retrieve the information
Multitask
END
Possible correction
No correction is required. EndProgram is used to end the process.
Minimum required version
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment