What is the point of objects like int and float?

musicmovement's icon

I hope this question doesn't seem to naive, but it seems that message boxes can do (almost?) anything the int and float objects can do.

Is there a situation where int and float are absolutely better than message boxes?

thanks for any insight!

Jean-Francois Charles's icon

There are several differences. int & float's type is fixed: that comes handy sometimes. Also, they do not use the same GUI resources as a message box, or a number box: this can be an advantage, too.

daddymax's icon

A fairly (very) simple answer, but if i need an object to dynamically change numbers (with mouse scrolling and/or keyboard input) I'd always go for an int or float over a message box simply because its easier and more direct. That said, you are probably right insofar as the message object can probably do everything these objects do.

Roman Thilenius's icon

they are faster because of no GUI.

and they are the more useful as registers; the message object did not have a second inlet until some years ago.

and to complete jfc´s lists, the int objet can truncate floats to int and the float objetc turns ints into floats. messagebox takes everything.

musicmovement's icon

All good and enlightening points! Thank you so much!

Pedro Santos's icon

I've used [int] and [float] instead of message boxes for a while to temporarily store values and trigger them afterwards, but never found an equivalent object to do it with symbols. Then I remembered to use zl.reg, since a symbol can be interpreted as a 1 element list... Now I'm almost message box free! ;-)