New topic: [PHP to RS] complicated operation order
<http://forums.realsoftware.com/viewtopic.php?t=41316> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message Caronte3D Post subject: [PHP to RS] complicated operation orderPosted: Fri Nov 04, 2011 1:07 pm Joined: Mon Jun 20, 2011 11:54 am Posts: 16 Hi! newbie ahead ¿How to convert this PHP code to RealStudio?: $varL=$varW<<18|$varT<<12|$varO<<6|$varQ; $varN=$varL>>16&255; I figured this, but could be wrong because I don't understand it very well and don't work: varL=bitwise.BitOr(bitwise.BitOr(bitwise.BitOr(bitwise.ShiftLeft(varW,18),bitwise.ShiftLeft(varT,12)),bitwise.ShiftLeft(varO,6)),varQ) varN=bitwise.ShiftRight(varL,16) _________________ "Some Day Everything Will Be Digital" Caronte. Web: nicodigital.com Top timhare Post subject: Re: [PHP to RS] complicated operation orderPosted: Fri Nov 04, 2011 1:44 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 10382 Location: Portland, OR USA I think it's varN = Bitwise.BitAnd(Bitwise.ShiftRight(varL,16), 255) Top Caronte3D Post subject: Re: [PHP to RS] complicated operation orderPosted: Fri Nov 04, 2011 2:02 pm Joined: Mon Jun 20, 2011 11:54 am Posts: 16 Thanks but don't work either. I think the problem could be the logic operation order (shift bits first or do the "OR" first) but don't find the solution. _________________ "Some Day Everything Will Be Digital" Caronte. Web: nicodigital.com Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
