Combining integers into one message?

Nick Vann's icon

I'm designing a calculator for my class project. Right now I'm thinking of approaching something like this:

Create a first message (sending number messages to a receive object & generating a message) which then gets run through an action (+, -, *, /) and is then triggered by a second message (generated the same way as the first).

I can't figure out how to effectively pack the numbers into a cohesive message (I want to be able to use decimal points). Here's what I have so far:

Calculator-.maxpat
Max Patch
musinou's icon

[sprintf]
[expr] might be useful too

There is no use to have 20 [send]s, you could use only one if they are all have the same name.

Christopher Dobrian's icon

>> I can’t figure out how to effectively pack the numbers into a cohesive message
For that, I suggest to look up "pack" in the manual.

Nikolas K's icon

Hi Nick,

Max Patch
Copy patch and select New From Clipboard in Max.

There is probably a far more elegant solution to this, but of the top of my head

Hope this helps...

Nikolas

Nick Vann's icon

Hello all -

Many thanks for your help. I streamlined the multiple "send out" objects into one, sent them into a sprintf, and it seems to be working. Onwards!