Liste des Groupes | Revenir à cl c |
Bart wrote:C already has this (I've added parentheses for clarity):>as to if when thinking of it the if construct has such parts
It's a mess. By contrast, my if statements look like this:
>
if then elsif then ... [else] fi
>
>
'elsif' is a part of the syntax. The whole thing can return a value.
There is a compact form (not for elsif, that would be too much) as shown
above.
if X then S else E
and the keyword if is not necessary imo as the expression x return logical value them then can be used on this without if
X then {}
X else {}
i would prefer to denote (at least temporerely) then as ->
and else as ~> then you can build construct like
a -> b -> c -> d ~> e ~> f
when the arrows take logical value of the left
(if a true then b, if be true then c if c true then d,if
d false then e and if e false then f)
but some need also to use else to some previous espression and
i think how it could be done but maybe just parenthesis can be used
a (->b->c) ~>z
if a true then b and if b true then c but if a false then z
Les messages affichés proviennent d'usenet.