Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote:
> # a flip-flop
> $x = 1;
> $x = !$x; # now $x is '' (which can be treated like 0)
> $x = !$x; # now $x is 1
>
> # another flip-flop
> $x = 1;
> $x = 1 - $x; # now $x is 0
> $x = 1 - $x; # now $x is 1
>
>Those are the typical flip-flops I've seen.
>
>I can't see
>
> if ($x) { $x = 0 }
>
>having much of a purpose unless there was some else { ... } clause
>attached to it. If there's no else { ... } clause, you could just write
>
> $x = 0;
>
>and be done with it.
A was thinking more about structures rather then $x manipulating, but this
is also nice to know.
--
Matija