How to format numbers for print()... is javascript different to C?

Hi

I couldn't find anything in the docs about using the print() function. I googled for a javascript reference which said that javascript print() uses the same syntax as for C printf(), but that doesn't seem to work in Unity. Can anyone point me to some docs for numeric precision syntax (%.2f etc.)?

In a nutshell, how would I format this C statement for Unity?

printf("%s is %d and thinks pi = %.2f", "Dave", 42, 3.14159);

( Should print: Dave is 42 and thinks pi = 3.14)

Thanks

Steve

print only takes a single string. If you want more printf style input, use String.Format like this:

print( String.Format("{0} is {1} and thinks pi = {2:F2}", "Dave", 42, 3.14159) );

Documented here: http://msdn.microsoft.com/en-us/library/b1csw23d.aspx

And info on numeric formatting for it here: http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx