Heya, I'm interested in making my OpenGL engine functions available to VB programmers but I know nothing about how VB handles floats.
I assume they use the good-for-everything VARIANT structure, can anyone provide more information on this issue? Thanks in advance.
Posted on 2004-11-22 16:19:25 by Homer
EvilHomer2k,
actually in VB there's the equivalent to FLOAT in asm, it's called "Single", it is a dword-sized variable and what VB does is to push it as a dword value to pass it to other functions parameters, and it's returned in the TOS of the FPU as a result of a Single type function

i hope i helped :alright:
Posted on 2004-11-22 18:23:18 by gallo
Thanks, that very much helped !!
Now, what about Doubles?
Are they just handled the same way?

(methinks this seems too easy)
Posted on 2004-11-22 22:17:58 by Homer
oh god i think is great to have this forum back!!

hello EvilHomer2k,
you're right it's very easy!
the Double's are just a REAL8 (or double in c++), i mean, a QWORD, and they are handled almost the same: they are passed to a function by pushing its two dword parts: first the high and then the low part, and when it's the result of a Double type function is returned in the TOS of the FPU, just as a Single type function
Posted on 2004-11-28 17:05:05 by gallo
Groovy :lol:
Posted on 2004-11-29 09:29:03 by Homer