From:                   Frank Newland <[EMAIL PROTECTED]>
> I want to use only 'and' statements. How can I get rid of this OR ??
> My Boolean algebra is not functional at the moment...
> 
> where  ((A)  or (not B ) )

Anything you wish ...

        not( not(A) and B)

#!perl
sub good {
        my ($a,$b) = @_;
        print (($a || !$b) ? 1 : 0, "\n");
}

sub mine {
        my ($a,$b) = @_;
        print (! (!$a && $b) ? 1 : 0, "\n");
}

good 0,0;
mine 0,0;

good 0,1;
mine 0,1;

good 1,0;
mine 1,0;

good 1,1;
mine 1,1;
__END__

Jenda



=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
                                        --- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to