Language mavens: Is there a programming with "if then else ENDIF"syntax?

bartc bartc at freeuk.com
Wed Nov 18 12:31:45 CET 2009


Dotan Cohen wrote:
> 2009/11/16 Steve Ferg steve.ferg.bitbucket at 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 




More information about the Python-list mailing list