PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Reason
  • Correction
  • Example
  • The OTHER CASE statement is not the last statement
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 17: OTHER CASE must be the last statement used in SWITCH
Reason
You are using a conditional statement such as SWITCH ... CASE. The "OTHER CASE" statement must be the last CASE used.
Correction
Move the statement block starting with "OTHER CASE" at the end of the conditional SWITCH statement.
Example

The OTHER CASE statement is not the last statement

Code triggering the error
SWITCH ProductType
CASE "1"
    Message("Food product")
OTHER CASE
    Message("Exceptional bargain")
CASE "2"
    Message("Cleaning product")
END


Possible correction
Move the statement block starting with "OTHER CASE" at the end of the conditional SWITCH statement.
SWITCH ProductType
CASE "1"
    Message("Food product")
CASE "2"
    Message("Cleaning product")
OTHER CASE
    Message("Exceptional bargain")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment