[Tutor] OT: [was] A question about None
Alan Gauld
learn2program at gmail.com
Sun Aug 22 07:31:37 EDT 2021
On 22/08/2021 09:29, dn via Tutor wrote:
> back in the good?bad, old days, wasn't there (a language with) an
> if-statement that went something like:
>
> if expression is positive, or zero, or negative:
> goto positive-branch, zero-branch, negative-branch
There are a few I can think of.
Perhaps the most obvious example today is SQL with its DECODE
function.
DECODE(Value, if1, then1,if2,then2,...,ifN,thenN,else)
It's somewhat like a case or switch statement wrapped up in a function.
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
More information about the Tutor
mailing list