in reply to Re^2: flip flop operator and if statement
in thread flip flop operator and if statement
Hello again iThunder,
if(($p=3)..5)
This assigns 3 (which is non-zero and therefore true) to $p on each loop iteration. So the left-hand side of the flip-flop operator never becomes false, and the if block is always executed.
if (($c=1 and $p=3)..5)
Again, on each loop iteration this assigns 1 to $c and 3 to $p, then ands them together. And since true and true always evaluates to true, the if block is always executed.
This is beginning to look like an XY Problem. What are you really trying to do with the flip-flop operator?
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: flip flop operator and if statement
by iThunder (Beadle) on Sep 20, 2014 at 07:32 UTC | |
by Athanasius (Archbishop) on Sep 20, 2014 at 08:07 UTC | |
by iThunder (Beadle) on Sep 26, 2014 at 23:05 UTC | |
by LanX (Saint) on Sep 20, 2014 at 08:01 UTC | |
by iThunder (Beadle) on Sep 20, 2014 at 08:07 UTC | |
by LanX (Saint) on Sep 20, 2014 at 08:11 UTC | |
by iThunder (Beadle) on Sep 20, 2014 at 17:54 UTC | |
|