On Thu, Sep 29, 2011 at 7:25 PM, Abigail <abigail@abigail.be> wrote:
>> Possibly, EXPR should be replaced throughout with terms that are
>> descriptive of use. E.g. "exit VALUE". This would be consistent with
>> the use of "FILEHANDLE", "DIRHANDLE", "VARIABLE", "REF", "BLOCK", etc.
>
> Is '1 == 0' a value? If so, it doesn't solve the ambiguity of 'exit 1 == 0'.
> But if '1 == 0' isn't a value, it doesn't explain why 'exit(1 == 0)' is valid.
I said 'VALUE' because that is what is in the text:
Evaluates EXPR and exits immediately with that value.
(This is extra confusing because the word "evaluates" implies that
EXPR could be more than a scalar value -- which it can be, but only if
you parenthesize it to avoid operator precedence issues)
One could say 'exit EXITCODE' or something, I suppose.
Short of rewriting perlfunc to use 'exit(EXPR)' or having an explicit
statement of how things are prototyped, I don't see any easy answers
to make documentation clearer. How about this ultra redundant form:
exit EXITCODE
exit( EXPR )
-- David
Thread Previous
|
Thread Next