princepawn has asked for the wisdom of the Perl Monks concerning the following question:
However, once back at my computer, some of the examples in the documentation did not work as advertised. It states that for the following operations:
That "no alcohol" and "under-age" are printed. But in fact, "no alcohol" and "no-entry" are printedif (all(1,2,3)*any(5,6) < 21) { print "no alcohol" } if (all(1,2,3)*any(5,6) < 18) { print "no entry" } if (any(1,2,3)*all(5,6) < 18) { print "under-age" }
If you do some diagnostics and instrument the program:
$R1 = all(1,2,3)*any(5,6); $R2 = all(1,2,3)*any(5,6); $R3 = any(1,2,3)*all(5,6); print $R1; print "\n"; print $R2; print "\n"; print $R3; print "\n";
You get the following output:
all(any(5,6),any(10,12),any(15,18)) all(any(5,6),any(10,12),any(15,18)) any()
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Quantum::Superpositions does not work as advertised
by merlyn (Sage) on Oct 19, 2000 at 14:50 UTC | |
by mitd (Curate) on Oct 20, 2000 at 10:43 UTC |