# END SWITCH End Branching of a Program

> Source: https://manual.pvxplus.com/directives/end-switch

## Format

**END SWITCH**

## Description

Use the **END SWITCH** directive to stop the branching that has been activated in an application by a **SWITCH** directive.

## See Also

**[SWITCH Branch Control](https://manual.pvxplus.com/directives/switch)**  
**[BREAK Immediate Exit of Loop](https://manual.pvxplus.com/directives/break)**  
**[CASE Define Branch Points](https://manual.pvxplus.com/directives/case)**  
**[DEFAULT Branch If No Matching Case](https://manual.pvxplus.com/directives/default)**

## Example

```
PROCESS_TAXCODE:
     LiquorTax=0,SalesTax=0,ServiceTax=0
     switch ucs(TaxCode$)
          case "X","Z" ! two codes are tax exempt
               break ! stop processing for case "X" here
          case "L" ! liquor pays all liquor,sales and service tax
               LiquorTax=cost*LiquorTaxRate
! no break here, logic falls through
          case "S" ! pays sales and service tax
               SalesTax=cost*SalesTaxRate
! no break here, logic falls through
          case "V" ! service tax
               ServiceTax=cost*ServiceTaxRate
               break ! end processing for this case and any that fell through
          default ! enter here if case not found
               msgbox "Unknown tax code","Error"
     end switch
     TotalTax=LiquorTax+SalesTax+ServiceTax
     return
```
