Mathematic Symbol Switch case

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Mathematic Symbol Switch case

Post 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

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Mathematic Symbol Switch case

Post 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.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Mathematic Symbol Switch case

Post by Ferla »

Thans Kersing
very clear answer

Post Reply