Select Case Statement (New Features)

by Jim ⌂ @, Russell, KY, Friday, January 10, 2014, 21:56 (1261 days ago) @ GJ

I just added a case stricture to the SVN 1.0.0.8 and will be testing it, getting the errors cleaned up, and documenting over the next few days/weeks.

It should be in the next binary release (probably sometime in February).

It works like the CASE structure in an old dialect of BASIC I used many years ago. It came from the PICK/Universe database language and looks like:

for t = 1 to 10
begin case
case t < 5
print t + " is less than 5"
case t >=5 and t < 8
print t + " is between 5 and 7 inclusive"
case 1
print t + " is something else"
end case
next t

The "case 1" works like otherwise/default/else in some other case structures. Should I implement "else" as a synonym for "case 1"?

Jim


Complete thread:

 RSS Feed of thread

powered by my little forum