DSprintf string format
by Guimo · in Torque Game Engine · 02/26/2008 (3:02 pm) · 4 replies
Hi,
I was wondering which special characters the dSprintf function will allow. I mean, it looks like it supports %i and %d and after trying I found it supports %ul. Does anybody knows which other codes will it support?
I have searched the code for this function implementation but found nothing so please if anybody knows tell me.
Also, does the dAtoi function is able to handle unsigned long numbers? There is no dAtol function.
Luck!
Guimo
I was wondering which special characters the dSprintf function will allow. I mean, it looks like it supports %i and %d and after trying I found it supports %ul. Does anybody knows which other codes will it support?
I have searched the code for this function implementation but found nothing so please if anybody knows tell me.
Also, does the dAtoi function is able to handle unsigned long numbers? There is no dAtol function.
Luck!
Guimo
About the author
#3
http://www.cplusplus.com/reference/clibrary/cstdio/sprintf.html
02/26/2008 (5:48 pm)
I always check this website when I forget. It's got a nice long list of the options, as well as some formatting parameters.http://www.cplusplus.com/reference/clibrary/cstdio/sprintf.html
#4
Luck!
Guimo
02/26/2008 (7:25 pm)
MMMMM I thought dSprintf was a Torque implementation of the sprintf function... but now I sed is just a call to _vsnprintf ... interesting...Luck!
Guimo
Torque Owner Stefan Lundmark
%s = String/array of 8bit integers.
%b = Boolean
%u = Unsigned 32bit integer
%c = Signed 8bit integer
There are more but those are what I could remember.