ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Errors / WLanguage errors
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help