Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Case statement range (Read 2193 times)
jbm417
Newbies
*
Offline


Posts: 3
Joined: Dec 2nd, 2019
Case statement range
Dec 2nd, 2019 at 3:26am
Print Post  
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
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Case statement range
Reply #2 - Jan 31st, 2020 at 11:41am
Print Post  
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 TopicPrint