On Sunday 02 September 2001 12:48 am, Uri Guttman wrote:
>
> i don't consider sort/map/grep blocks to be basic like the others. also
> sort/map can take espressions which is a different syntax.
Yes, I'm not addressing sort/map/grep/do as much as demonstrating a block
that appears in one of those expressions. I will note that. They were
grouped within basic constructs because, well, frankly I didn't have
anywhere else to put them. (Block Expressions, perhaps?)
>
> what about eval BLOCK? i think that is being renamed to throw/catch but
> it takes a code block too.
Yep. Missed it. And that's a big one.
>
> BCW> Conditional Statement Modifiers
>
> BCW> 6. [ LABEL: ] expr if expr;
> BCW> 7. [ LABEL: ] expr until expr;
> ^^^^^
> unless
Thanks.
>
> BCW> Looping Statement Modifiers
>
> BCW> 8. [ LABEL: ] expr while expr;
> BCW> 9. [ LABEL: ] do { block } while expr; # Note 2
>
> i see the note, but that is not special. just a simple expression with a
> modifier. now, if the do BLOCK while() were to support loop semantics,
> it would be special here.
Evaluation order.
>
> BCW> 10. [ LABEL: ] expr until expr;
> BCW> 11. [ LABEL: ] do { block } until expr; # Note 3
>
>
> BCW> Iterative Statement Modifiers
>
> BCW> 12. [ LABEL: ] expr for[each] list; # Note 4
>
>
> BCW> Conditional Block Constructs
>
> BCW> 13. [ LABEL: ] if ( expr ) { block }
> BCW> [ [ elsif ( expr ) { block } ] ... ]
> BCW> [ else { block } ]
> BCW> 14. [ LABEL: ] until ( expr ) { block }
> ^^^^^
>
> unless (again :-)
Ugh. What was I on?
>
>
>
> BCW> A statement consists of zero or more expressions, followed by an
> BCW> optional modifier and its expression, and either a statement
> BCW> terminator (';') or a block closure ('}' or EOF).
>
> how do you have multiple expressions in a statement? when you combine
> expressions you just get one larger expression.
I was specifically addressing the statement modifiers (trailing ifs,
UNLESSes!!!!, whiles, etc.). The modifiers themselves aren't really
expressions.... although they take them. If they were, then
'expr if expr while expr' would be legal.
>
> also perl has statement separators, not terminators. with that
> definition you don't need to mention block close or EOF.
I never really thought about it that way. Excellent point. I shall make
that change.
>
> BCW> Flow Control Expressions
>
> BCW> A. goto
> BCW> B.
>
> B. was intentionally left blank.
I got tired. :-)
--
Bryan C. Warnock
[EMAIL PROTECTED]