Author Topic: Return division problem  (Read 1200 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4205
    • Oxygen Basic
Return division problem
« 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
  1.   function TimeLapse(quad *ts,*te) as double
  2.   return (te-ts)/freq 'SECONDS
  3.  end function
  4.   '
  5. '...
  6.  
  7.   function ShiftKey() as sys
  8.   return 0xffff and GetAsyncKeyState(VK_SHIFT)
  9.   end function
  10.  

Charles

Problem fixed below: