Just another Perl shrine | |
PerlMonks |
Re: help porting a line of bitwise C code to perlby BrowserUk (Patriarch) |
on Mar 07, 2008 at 05:32 UTC ( [id://672680]=note: print w/replies, xml ) | Need Help?? |
Not enough information. Are the values token4 = 0 & token5 = 32 the values passed into func(), or the values returned by func()? Because if those are the values coming out of func(), your C program is broken:
But if the values you've given are the values going into func(), then as you've only supplied a declaration (was that form ever legal C?), we cannot tell what might come out for those inputs. Further more, the only way I can interpret that declaration of func(), is that it is expecting a pointer to an unsigned char as its input. And the likelyhood of 0 and 32 being valid pointers is minimal. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|