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: 120
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
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: 1936
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
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: 120
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Contact:

Re: Mathematic Symbol Switch case

Post by Ferla »

Thans Kersing
very clear answer

Post Reply