|
|
|
|
|
- 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
Warning 36: No BREAK, RETURN or RESULT was detected in the code of the loop
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. 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). 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|