Oxygen Basic
Programming => Problems & Solutions => Topic started by: Charles Pegge on July 10, 2012, 12:31:00 AM
Title:
Return division problem
Post by:
Charles Pegge
on
July 10, 2012, 12:31:00 AM
I found a bug which shows up when using
unprototyped
procedures:
return (te-ts)
/
freq
Due to an uncleared flag,This affects the return type of the next function - turning it into a float.
Code: OxygenBasic
function
TimeLapse(
quad
*ts,*te)
as
double
return
(te-ts)/freq
'SECONDS
end
function
'
'...
function
ShiftKey()
as
sys
return
0xffff
and
GetAsyncKeyState(VK_SHIFT)
end
function
Charles
Problem fixed below: