PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Reason
  • Correction
  • Example
  • Using the BREAK keyword to interrupt a procedure
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 34: 'Break' is not allowed outside the loops
Reason
The BREAK keyword was used to interrupt a procedure.
Reminder: The BREAK keyword must only be used to interrupt a loop.
Correction
To exit from a procedure, use RETURN or RESULT (if a value must be returned to the calling process).
Example

Using the BREAK keyword to interrupt a procedure

Code triggering the error
PROCEDURE Compare(Number1, Number2)
IF Number1 > Number2 THEN
        Info(Number1 + "is greater than" + Number2)
        BREAK
END
Possible correction
The BREAK keyword must be replaced by the RETURN keyword.
PROCEDURE Compare(Number1, Number2)
IF Number1 > Number2 THEN
        Info(Number1 + "is greater than" + Number2)
        RETURN
END
Minimum version required
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment