jit.lcd – bug? How to get rid of decimals?

Dec 2, 2011 at 12:36pm

jit.lcd – bug? How to get rid of decimals?

in the attached Patch I create a message “write 0.3 blabla”
in the hit.lcd window it always appears as 0.3000000
How can I work around this?

Thanx for help

(max5, 5.1.9, MacBookpro, OSX 10.7.2)

#60414
Dec 2, 2011 at 1:42pm

[sprintf write %1.f bla]

– Pasted Max Patch, click to expand. –

more here http://www.cplusplus.com/reference/clibrary/cstdio/printf/

#217391
Dec 2, 2011 at 4:50pm

Thanks, but unfortunatel this doesn’t solve the problem.
I had already tried with this. Funny enough the message looks right, but the jit.lcd brings out the decimals again.

Any other idea?

Kind Regards

#217392
Dec 2, 2011 at 5:15pm

you must force sprint to output a symbol with the “symout” argument.
(and then prend the “write” message :

– Pasted Max Patch, click to expand. –
#217393

You must be logged in to reply to this topic.