Game Development Community

F32, S32, U32

by Kyle "Nonsense" Watson · in Technical Issues · 10/14/2002 (9:57 am) · 7 replies

What are the F32, S32, U32 types? What do they do?
thanks for your help in advance

-kyle watson

#1
10/14/2002 (10:13 am)
I haven't gotten a chance to use torque as much as I'd like to, but these similiar data types are found in most multiplatform apis and sdks. F32 refers to a 32 bit floating point. S32 refers to a signed 32 bit integer. U32, as you've probably guessed, refers to an unsigned 32 bit integer. They do this because of inconsistencies in the number of bits when changing different platforms. Thus defining their own data types allow for less errors when porting over to Linux, or BSD, or whatever they decide to port the engine over to next. If these concepts are new to you, you should read some more books about c/c++, and do a few smaller projects before trying to create something large with torque. I say this as constructive criticism, because I've been programming for quite some time and still the torque engine is hard for me to get a grasp on at times.
#2
10/14/2002 (11:47 am)
I wouldnt give up jsut because you dont know what U32 or F32 means... sheesh, what a defeatist attitude. ;)

I had no idea either, but I still managed to work with the torque engine, and now, almost a year later, I am pretty comfortable with it.
#3
10/14/2002 (12:04 pm)
Lol i've read c++ books and never seen this. Besides I think I'm a pretty damn good programmer and I never saw this used untill I looked through torque. It took me a second of looking at hte declarations of S32 etc... to figure out what they meant but that's all. That's no measure on how well you know how to program by any means.

--KallDrexx
#4
10/14/2002 (2:41 pm)
don't worrie i've done stuff with c++ for 4 years i just felt lazy :(, thanks for the help :)
-kyle
#5
10/14/2002 (4:31 pm)
Hello Kyle :)
Don't worry, I didn't knew about S32, etc before touching torque either....

Kall... are you really THAT proud of yourself? It's like saying... it's not that im god but i'm the best coder in the whole world ya know...
Maybe it's me but that didn't sound very good to me....

Regards
#6
10/14/2002 (4:46 pm)
lol no but i was feeling lazy so I needed to motivate myself :)

--KallDrexx
#7
10/14/2002 (5:32 pm)
Oh no I didn't mean to criticize anyone's coding ability for not knowing a trifle torque specific declaration. I'm sorry if anyone took it that way. I was just suggesting that if someone doesn't feel comfortable in their language, then it's going to be an even higher learning curve using torque to learn, and that it might be easier to work with some smaller projects first. If you know the language well and just didn't realize the declarations were for data types, then, by all means, knock yourself out. :) I apologize once again for not using a few disclaimers and if I bummed anyone out.