Is there difference between "%ld" and "%i" argument for sprintf object?
Is there difference between "%ld" and "%i" argument for sprintf object?
Also I'd appreciate if you can point a web page where I can learn about that kind of stuff (I couldn't find a relevant explanation in Reference).
Many thanks,
Masa
sprintf easily looks like an alien within max as it is an exposed c function. for more details you can.refer to any sprintf reference on the web.
regarding your question: %d and %i are synonyms within sprintf. they both refer to the c data type integer. %ld explicity allows socalled long ints which are integers as well but with a larger value range.
right now i don't remember if ints in max are if type int or long (int). as the max reference suggest to use %ld for int i assume they are long ints.
j
here's an overview: http://docs.roxen.com/pike/7.0/tutorial/strings/sprintf.xml (not a complete ref but easy to read... )
in the example
sprintf("They are %.2f and %10.3f.", x, y);
x and y after the comma would be translated into the inlets of the max object (x = first inlet, y = second inlet)
Thank you very much for your kind explanation Jan.