i was looking around but haven’t found anything that helps me to do this.
i have a long list of number with commas. i would want to sum all these values together, but my zl sum doesn’t accept commas. could someone guide me to the objects that i can cut and paste from a text program, into textedit (max obejct) to remove commas and then gives me the output of the sum.
Maybe like this?
----------begin_max5_patcher---------- 415.3ocuUFsaCBBEF9Z8ofv0cMBV05dP1MKMKnxrrnnQwrt1z28gG001Mqil 04MX3vQ3+7c9UNXagiJ1wqwnGQOirrNXaYAgZCX0O2Bmy1Emwpgzvxl7HdEd Q2R5YEMpLtBVj1G80BopVrmCwVszoObWlpOJ4cGHVHU3EHbDSlhQa5ypjoh2 JjouTwiUcIRVGn2DD0ec6i.Xz0eoyWuiHAzVQzaODhOSDRVNbV3m3UILI6LY KjCplzF6nsc6vBSo.+c8gMrcJ9NPo38Yn5lbygCgdc3zRFinBwu8gmS2jwoR vMSE58iJQ2Gf.1javtDP.eBco204h+r3VhZTpB43TfLY4ZPYtxEZ7NCiiUld yfwOspnobds9DenE6ENk02cVr9475ZVJ+GfgnEl1DpaSS29MFMSgEpCvCBAL C9cLJbbrP+SXA1QblP98KO.U0F+RVUWzTEOTC8+PBcRWI7ZkPxTB8WImxI7h b1JRR3vxCvIWjTVnuCoWBnMi12LUQtFnnfYUQ9FnH2YWQjeQQzYUQdFvH+YU Qz+4tldxQ6OA9veNkC -----------end_max5_patcher-----------
Beware: if the list if really long, you may have to change the maximum list length in the zl objects.
I’m at work, so I can’t check Patrick’s suggestion (he may be saying the same thing), but I’ve done some things with [atoi] into [zl filter] into [itoa] to remove spaces and other characters from messages. You just need to figure out what a comma is as an integer and then make that the filtered number.
Or use [accum]?
thanks for the tip and patch. yes i forgot about itoa and atoi. yes accum works as well. thanks for the advice.
have a nice day.