
bartc at freeuk
Nov 18, 2009, 3:31 AM
Post #1 of 2
(91 views)
Permalink
|
|
Re: Language mavens: Is there a programming with "if then else ENDIF"syntax?
|
|
Dotan Cohen wrote: > 2009/11/16 Steve Ferg steve.ferg.bitbucket [at] gmail: >> I've often thought that a language with this kind of block-free >> syntax would be nice and intuitive: >> >> if <condition> then >> do stuff >> elif <condition> then >> do stuff >> else >> do stuff >> endif >> >> Note that you do not need block delimiters. >> Does anybody know a language with this kind of syntax for >> ifThenElseEndif? >> > > PHP has exactly this: > > if (condition) { > // stuff > } elseif (otherContition) { > // otherStuff > } elseif (yetAnotherCondition) { > // yetOtherStuff > } The OP explicitly said no block delimiters. Your example uses {..}, and doesn't have endif. -- Bartc -- http://mail.python.org/mailman/listinfo/python-list
|