Oxygen Basic

Programming => Bugs & Feature Requests => Topic started by: Peter on April 06, 2013, 11:04:19 AM

Title: Low-Level
Post by: Peter on April 06, 2013, 11:04:19 AM
Deleted
Title: Re: Low-Level
Post by: Charles Pegge on April 06, 2013, 12:52:51 PM
You may use quad* for QueryPerformanceCounter if you so wish.
Title: Re: Low-Level
Post by: Charles Pegge on April 07, 2013, 07:36:31 PM

When functions are unprototyped,  compund types will be passed byref, and strings will be passed by strptr, floating-pt numbers are passed as double.

Opengl uses both floats and doubles for many of its params, so prototypes are needed here. Also some array values have to be passed byref.

Here is a demo of what happens when a rectangle is passed to an unprototype function

type rectangle long left,top,right,bottom

function f(...)
indexbase 1
rectangle r at param[1]
print r.left "   " r.top "   " r.right "   " r.bottom
end function


rectangle t={10,20,30,40}

f t   'auto pass byref
f @t  'explicit pass byref