![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've pretty much converted Daniel Moth's AsyncCalcPiCF project to VB.net but for this one gotcha: b = b>>1; converts to b = Machine.Shift.Right(b,1) and my compiler burps on the Machine as not be declared. What could be the CF VB.NET translation? TIA Harry |
#3
| |||
| |||
|
|
Exactly why do you need to bit shift for threading? My guess is that this is simply part of his sample for the math, making some power-of-two division faster than by actual division. b = b >> 1 is the same as saying b /= 2 (or b = b / 2), just faster (though the compiler may well optimize / 2 to a shift operation anyway, in which case they would be identical). -- Chris Tacke, eMVP Join the Embedded Developer Community http://community.opennetcf.com "Harry Simpson" <harry.simpson (AT) phgt (DOT) net> wrote in message news:OaxYooYTIHA.5288 (AT) TK2MSFTNGP04 (DOT) phx.gbl... I've pretty much converted Daniel Moth's AsyncCalcPiCF project to VB.net but for this one gotcha: b = b>>1; converts to b = Machine.Shift.Right(b,1) and my compiler burps on the Machine as not be declared. What could be the CF VB.NET translation? TIA Harry |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |