Oxygen Basic
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Latest OxygenBasic.zip at GitHub
(Click on the Wizard)
Home
Help
Search
Login
Register
Oxygen Basic
»
Programming
»
Example Code
»
General
»
Case Ranges Single Sided
« previous
next »
Print
Pages: [
1
]
Author
Topic: Case Ranges Single Sided (Read 2109 times)
0 Members and 1 Guest are viewing this topic.
Charles Pegge
Guest
Case Ranges Single Sided
«
on:
December 05, 2014, 04:04:10 PM »
Further extension of
case
syntax with comparator symbols < > =
Code: OxygenBasic
float
a=-.51
switch
a
case
< 0 :
print
"<0"
case
<= 0 :
print
"<=0"
case
0 :
print
"0"
case
> 0 :
print
">0"
case
>= 0 :
print
">=0"
case
<>0 :
print
"<>0"
end
switch
select
a
case
< -1.0 :
print
"< -1.0"
case
< -0.5 :
print
"< -0.5"
case
< 0.0 :
print
"< 0.0"
case
< 0.5 :
print
"< 0.5"
case
< 1.0 :
print
"< 1.0"
case
>= 1.0 :
print
"> 1.0"
end
select
Update:
http://www.oxygenbasic.org/o2zips/Oxygen.zip
Logged
JRS
Guest
Re: Case Ranges Single Sided
«
Reply #1 on:
December 05, 2014, 04:33:37 PM »
Nice addition to O2 Charles.
Thanks!
Logged
Print
Pages: [
1
]
« previous
next »
Oxygen Basic
»
Programming
»
Example Code
»
General
»
Case Ranges Single Sided