Oxygen Basic
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Latest OxygenBasic.zip at GitHub
(Click on the Wizard)
Home
Help
Search
Login
Register
Oxygen Basic
»
Programming
»
Problems & Solutions
»
Howto Override Default Single in Unprototyped Call?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Howto Override Default Single in Unprototyped Call? (Read 1064 times)
0 Members and 1 Guest are viewing this topic.
Mike Lobanovsky
Guest
Howto Override Default Single in Unprototyped Call?
«
on:
March 21, 2018, 04:47:26 AM »
Charles,
Since an unprototyped function call would default its floating point argument to a
Single
, how am I supposed to override this behavior and pass my argument as an explicit
Double
?
(hint: OpenGL)
TIA
Logged
Charles Pegge
Guest
Re: Howto Override Default Single in Unprototyped Call?
«
Reply #1 on:
March 21, 2018, 05:55:06 AM »
Hi Mike,
You can prefix
convert double
to the param expression or value.
Better still, just say
double ..
. But this requires the next release of Oxygen.dll, which I hope will be out later today.
Logged
Mike Lobanovsky
Guest
Re: Howto Override Default Single in Unprototyped Call?
«
Reply #2 on:
March 21, 2018, 06:22:25 AM »
Great!
Will
double
(or
convert double
) actually preserve the original double precision losslessly or rather regard it as a cast and simply expand the lossy default conversion to 64 bits?
Logged
Charles Pegge
Guest
Re: Howto Override Default Single in Unprototyped Call?
«
Reply #3 on:
March 21, 2018, 06:57:00 AM »
Yes the param expression is processed first and then overrides the default type. But I see a lttle problem with cdecl stack cleanup after doubles...
Logged
Mike Lobanovsky
Guest
Re: Howto Override Default Single in Unprototyped Call?
«
Reply #4 on:
March 21, 2018, 09:26:39 AM »
Solvable? I'd rather we won't have to subside to a palliation...
Logged
Print
Pages: [
1
]
« previous
next »
Oxygen Basic
»
Programming
»
Problems & Solutions
»
Howto Override Default Single in Unprototyped Call?