I have a very simple problem which I can't seem to figure out.
I have a message coming in from a receive object as defined by the user. It is what I would consider a string. A typical example: The best song ever: #1
I want to write this to a text file. If the user sticks the word "add" in front of their text, I can pass it directly to the textfile object and it works fine. But without the word "add" already in front on the text, I can't for the life of me figure out how prepend the string with the word "add" to send the entire string to then send on to the textfile object.
If I do |add $1( in the above example, only "best" is passed on. If I do |add $0 $1( in the above example, "0 best" is passed on.
Advice?
-John
John Harrison wrote:
I can't for the life of me figure out how prepend the string with the word "add" to send the entire string to then send on to the textfile object.
string | [list prepend add] | [list trim] | [textfile]
[list prepend add] | [list trim]
is probably what you want.
On Mon, 19 Feb 2007 22:55:33 -0600 John Harrison john.harrison@wichita.edu wrote:
I have a very simple problem which I can't seem to figure out.
I have a message coming in from a receive object as defined by the user. It is what I would consider a string. A typical example: The best song ever: #1
I want to write this to a text file. If the user sticks the word "add" in front of their text, I can pass it directly to the textfile object and it works fine. But without the word "add" already in front on the text, I can't for the life of me figure out how prepend the string with the word "add" to send the entire string to then send on to the textfile object.
If I do |add $1( in the above example, only "best" is passed on. If I do |add $0 $1( in the above example, "0 best" is passed on.
Advice?
-John
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list