I found a bug which shows up when using
unprototyped procedures:
return (te-ts) / freqDue to an uncleared flag,This affects the return type of the next function - turning it into a float.
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: