in reply to (MeowChow) Re: 'Holy in one' another Golf Game!
in thread 'Holy in one' another Golf Game!
Here I'm presuming $a and $b are two values, and that a third parameter $c indicates which bit is required, such that if $c were 4, the 4th bit was extracted (24 or 16) and returned as is, with the 4th bit being either 1 or 0 as was in the input.sub X { (1<<pop)&(pop|pop) }
sub X{ ($_=pop)&pop|~$_&pop }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(MeowChow) Re3: 'Holy in one' another Golf Game!
by MeowChow (Vicar) on Jul 27, 2001 at 13:10 UTC | |
by tadman (Prior) on Jul 27, 2001 at 13:30 UTC | |
by MeowChow (Vicar) on Jul 27, 2001 at 13:51 UTC |