in reply to Re: 'or' versus '||' - Unexpected Results
in thread 'or' versus '||' - Unexpected Results
My areas of confusion span the far reaches of the known universe, however for this problem, I can live with just 3 :-)
I'm interested to understand why the '|' math operation decided to return a 3 for me, when given two non-numbers to operate on. This was the fun part.
Thanks for the precedence pointer - I always seem to forget about that (duh - basic stuff)...
The context confusion is the key - thanks for untangling my knotted mind. I see that this works:
However, this won't work when the canvas is empty. Is there a way to write this that will work for both empty and non-empty canvas?my @list2 = @{$c->bbox('all') || (1,2,3)};
Thanks
-Craig
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: 'or' versus '||' - Unexpected Results
by ikegami (Patriarch) on Jun 24, 2008 at 16:58 UTC | |
by kyle (Abbot) on Jun 24, 2008 at 19:47 UTC | |
by massa (Hermit) on Jun 24, 2008 at 18:14 UTC | |
by ikegami (Patriarch) on Jun 24, 2008 at 18:40 UTC | |
by massa (Hermit) on Jun 24, 2008 at 19:57 UTC | |
|
Re^3: 'or' versus '||' - Unexpected Results
by massa (Hermit) on Jun 24, 2008 at 17:02 UTC |