[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sub conditionals_true_when (@@) [PATCH]
From: |
Raja R Harinath |
Subject: |
Re: sub conditionals_true_when (@@) [PATCH] |
Date: |
14 Jun 2001 15:17:38 -0500 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.103 |
Richard Boulton <address@hidden> writes:
> On Wed, Jun 13, 2001 at 11:44:52AM +0300, Kalle Olavi Niemitalo wrote:
>> This bug is also causing the @TRUE@ conditions reported by
>> Richard Boulton in "Bug with conditionals. [PATCH]".
>
> You're right, this does seem to be the main cause of the problem I
> reported.
>
> I tried fixing the problem (by passing by reference instead).
[snip]
> # $BOOLEAN
> -# &conditionals_true_when (@CONDS, @WHENS)
>+# &conditionals_true_when (address@hidden, address@hidden)
> # ----------------------------------------
[snip]
>+sub conditionals_true_when ($$)
> {
> - my (@conds, @whens) = @_;
>+ my ($condsref, $whensref) = @_;
Isn't it cleaner to use
sub conditions_true_when(\@@)
{
my ($condsref, @whens) = @_;
You also get the benefit of type-checking.
> - if ! conditionals_true_when ((@parent_conds), ($vcond));
>+ if ! conditionals_true_when (address@hidden, [$vcond]);
This would then be,
if ! conditionals_true_when(@parent_conds, $vcond)
- Hari
--
Raja R Harinath ------------------------------ address@hidden
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash