Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
Page Index Toggle Pages: 1
Send Topic Print
Case statement range (Read 36 times)

Posts: 1
Case statement range
Dec 2nd, 2019 at 3:26am
Just downloaded the VM extension to VS2019 & moved an Arduino Uno sketch over. Noticed that the case range construct  case 10 … 20 generates an error. I know I can write the code differently - if statements for example - but wondered if there are any plans to support the case range construct?

TIA, joe
Back to top
IP Logged
Jo Sto
Junior Member

Posts: 62
Re: Case statement range
Reply #1 - Dec 4th, 2019 at 4:03pm
This construct is not standard C ++, it is a GNU-C extension (see https://www.geeksforgeeks.org/using-range-switch-case-cc/).
It is compiled for me (Teensyduino) without error, you only see intellisense errors. (Intellisense is independent of the compiler)
Back to top
IP Logged
Page Index Toggle Pages: 1
Send Topic Print