According to what I have found this means that the value of lps is bitshifted to the left (I think only 1), and the '=' is for an assignment. But that means that in the code it is used:
the loop is unendless for the reason that, according to my knowledge, as long as lps 'shifted to the left' is 1 then run the loop.
grtz
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
do while lps <> 0
lps = lps * 2
' loop body..
loop
What do you mean with "falls off"?
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
[quote="Seb McClouthWhat do you mean with "falls off"?[/quote]
The << operator is intended to perform bit shifting WITHOUT rotation. The proccessor has an assortment of bit shifting instructions, some with rotation and some without, some that transfer the high or low bit to the carry flag or copy the carry flag into the high or low bit. Few languages provide built in operators for all of this functionality. The most common is the simple shifting without rotation, so is your case is the only bit set is the high bit, the shift will cause it to "fall off" and the result will be a bit field with all the bits set to 0.
SUB CalibrateDelay
Do While LoopsPerSec! <> 0 'needs to be! for use with Delay
LoopsPerSec! = LoopsPerSec! * 2
ticks = jiffies
Delay LoopsPerSec!
ticks = jiffies - ticks
If LoopsPerSec! >= HZ THEN 'HZ = 100
Print "Passed."
EXIT LOOP
ELSE
Print "Failed."
EXIT LOOP
END IF
LOOP
END SUB
'The Delay Sub I'm using:
SUB Delay (loops!)
T! = Timer + loops!
PT! = Timer
Do: Loop Until Timer >= T! Or Timer < PT!
END SUB
Fairly easy said... it does nothing. Can someone enlight me/help me out?
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.