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

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

Mathematic Symbol Switch case

Postby Ferla » Sun Sep 09, 2018 2:28 pm

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: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: Mathematic Symbol Switch case

Postby kersing » Sun Sep 09, 2018 2:35 pm

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: 103
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 10 times
Contact:

Re: Mathematic Symbol Switch case

Postby Ferla » Sun Sep 09, 2018 3:18 pm

Thans Kersing
very clear answer