switch { } need help

It more or less is, but it's not exactly the same. The Arduino IDE provides preprocessing of your source before it is compiled to automate some declarations for you, and the Wiring API is also specific to Arduino.