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 262 times)
jbm417
Newbies
*
Offline



Posts: 3
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
Ex Member
*



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
 
Visual Micro
Administrator
*****
Offline



Posts: 10657
United Kingdom
Re: Case statement range
Reply #2 - Jan 31st, 2020 at 11:41am
 
For anyone else making a report like this please follow the guide in yellow above which will show us your toolchain and board etc. The intellisense can be configured slightly differently depending on this info so we need it to assist.

Please always provide this info when making compiler or intellisense reports otherwise we can't help.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print