PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Reason
  • Correction
  • Example
  • The OTHER CASE statement is not the last statement
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
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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment