Hello all,
What is everyone's favorite way to format text in simple ways, a la something like sprintf?
I'm just trying to put together names of arrays like 'myTable-1' and 'myTable-2' out of the symbol 'myTable' and an int '1' or '2'.
thanks!
ali
Hello all,
What is everyone's favorite way to format text in simple ways, a la something like sprintf?
I'm just trying to put together names of arrays like 'myTable-1' and 'myTable-2' out of the symbol 'myTable' and an int '1' or '2'.
Perhaps [makefilename] does what you want.
Rad, thank you @Peter. 'makefilename' IS very sprintf like.
@Matt . The message box trick will work for most cases also;
thank you all!
On Sun, Sep 3, 2017 at 1:46 PM, Peter P. peterparker@fastmail.com wrote:
- Ali Momeni batchku@gmail.com [2017-09-03 19:39]:
Hello all,
What is everyone's favorite way to format text in simple ways, a la something like sprintf?
I'm just trying to put together names of arrays like 'myTable-1' and 'myTable-2' out of the symbol 'myTable' and an int '1' or '2'.
Perhaps [makefilename] does what you want.
Ali Momeni wrote:
Hello all,
What is everyone's favorite way to format text in simple ways, a la something like sprintf?
actually PD's message box can be manipulated in pretty powerful ways, more than MAX's message box can do. see the subpatch "pd changing-messages" in the message-help.pd file !
that combined with [makefilename] does pretty much everything i need for text formatting.
[makefilename] also has an undocumented padding method.
f.e.: sending the float number 13 to
|makefilename %05d|
will output the symbol "00013"
you can even create $0-messages with this little trick:
|list $ 0 somename( | |$1$2-$3-rrr( | |print TRYIT|
[cyclone/sprintf]
and we're adding more features to it in the next release
2017-09-03 17:22 GMT-03:00 oliver oliver@klingt.org:
Ali Momeni wrote:
Hello all,
What is everyone's favorite way to format text in simple ways, a la something like sprintf?
actually PD's message box can be manipulated in pretty powerful ways, more than MAX's message box can do. see the subpatch "pd changing-messages" in the message-help.pd file !
that combined with [makefilename] does pretty much everything i need for text formatting.
[makefilename] also has an undocumented padding method.
f.e.: sending the float number 13 to
|makefilename %05d|
will output the symbol "00013"
you can even create $0-messages with this little trick:
|list $ 0 somename( | |$1$2-$3-rrr( | |print TRYIT|
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/ listinfo/pd-list