Page 1 of 1

Mathematic Symbol Switch case

Posted: Sun Sep 09, 2018 2:28 pm
by Ferla
Hello
you can help me understand the best way
in the swith case the possibility to insert the < and > symbols mathematicians.
I have to indicate:
case 1
x <10 displays on lcd string "0"
case 2
x <100 displays on lcd string "00"
otherwise x = 0
Thanks
Ferla

Re: Mathematic Symbol Switch case

Posted: Sun Sep 09, 2018 2:35 pm
by kersing
In a switch you can only compare with a single numeric value. For ranges (less, greater) you need to use (multiple) decision statements.

Re: Mathematic Symbol Switch case

Posted: Sun Sep 09, 2018 3:18 pm
by Ferla
Thans Kersing
very clear answer