Break to end of switch

Command groupFlag affectedReversibleExecute on clientPlatform(s)
ConstructsNONOYESAll

Syntax

Break to end of switch

Description

This command causes Omnis to jump out of the current Case statement (i.e. terminate the Case before the end of Case is reached), and resume method execution after the End Switch command. You use it in conjunction with the Switch and Case commands.

Example

# If lCount equals 1 or 2 the ok message following the Break to end of switch never gets shown

Switch
 
lCount

  
Case
 
1

    
OK message
 
{
lCount equals 1
}

    
Break to end of switch

    
OK message
 
{
I never run
}

  
Case
 
2

    
OK message
 
{
lCount equals 2
}

    
Break to end of switch

    
OK message
 
{
I never run
}

  
Default
    
OK message
 
{
lCount not equal to 1 or 2
}

End Switch