ENDSELECT | END SELECT
 
Syntax

SELECT [CASE] expression
[CASE expressionlist]
    [statements]
[CASE ELSE]
    [statements]
ENDSELECT

ENDSELECT or END SELECT syntax are allowed

Description

ENDSELECT is used to terminate the SELECT..CASE statement.
Example

SELECT choice
CASE 1
        PRINT "number is 1"
CASE 2
        PRINT "number is 2"
CASE 3, 4
        PRINT "number is 3 or 4"
CASE 5 TO 10
        PRINT "number is in the range of 5 to 10"

CASE <= 20
        PRINT "number is in the range of 11 to 20"

CASE ELSE
        PRINT "number is outside the 1-20 range"
ENDSELECT
 
Differences from other BASICs

  • ENDSELECT is used to terminate the SELECT in PBASIC
  • END SELECT used in Visual BASIC
See also