develooper Front page | perl.perl6.language | Postings from July 2001

if then else otherwise ...

Thread Next
From:
raptor
Date:
July 28, 2001 08:35
Subject:
if then else otherwise ...
Message ID:
000901c1176a$16accc40$0500a8c0@xxx
hi,

we have <=> and 'cmp' operators but we don't have the conditional constroct
to use better their result :
May be forthcomming switch will solve this in some way, but isn't it better
to have shortcut like this :

if (cond)
{ }
else {}
otherwise {}


i.e.
if cond == 1  then  'then-block'
if cond == 0  then  'else-block'
if cond == -1  then  'otherwise-block'

If the "if" construct doesn't have "otherwise" it behave like the current
"if-else"..


=====
iVAN
raptor@unacs.bg
=====


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About