PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Reason
  • Correction
  • Examples
  • Using a LOOP without END
  • Nested statements: a LOOP statement and an IF statement are nested
Products
WINDEVWEBDEV - Server codeWEBDEV - Browser codeWINDEV MobileReports and Queries
Platforms
WindowsLinuxWindows MobileUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple Watch
Languages
JavaPHPAjaxUser code (UMC)External language
Databases
HFSQLHFSQL Client/ServerStored proceduresOLE DBODBCNative Accesses
Error 24: No END statement is associated with this LOOP
Reason
You are using a loop statement (LOOP). This statement must end with the END keyword.
Correction
Check the code of your loop statement and add the END keyword if necessary.
Examples

Using a LOOP without END

Code triggering the error
LOOP
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        IF ALine = EOT THEN BREAK
        ProcessLine(ALine)


Possible correction

Add the END keyword at the end of the loop.
LOOP
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        IF ALine = EOT THEN BREAK
        ProcessLine(ALine)
END

Nested statements: a LOOP statement and an IF statement are nested

Code triggering the error
LOOP
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        IF ALine = EOT THEN
                BREAK
        ProcessLine(ALine)
END
Possible correction
Check whether all the nested statements are properly ended (with the END statement for example). In our example, the IF statement has no associated END statement. Add an END statement.
LOOP
        // Read a line in the text file
        ALine = fReadLine(FileNum)
        IF ALine = EOT THEN
                BREAK
        END
        ProcessLine(ALine)
END
Minimum version required
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment