Re: Language mavens: Is there a programming with if then else ENDIFsyntax?
Dotan Cohen wrote: 2009/11/16 Steve Ferg steve.ferg.bitbuc...@gmail.com: 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
Re: Language mavens: Is there a programming with if then else ENDIFsyntax?
The OP explicitly said no block delimiters. Your example uses {..}, and doesn't have endif. Just out of habit. I think that PHP, like C, lets you avoid the block deliminators so long as the block all fits on one line. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- http://mail.python.org/mailman/listinfo/python-list