[PD] sending a string to textfile

padawan12 padawan12 at obiwannabe.co.uk
Tue Feb 20 19:49:24 CET 2007

[list prepend add]
[list trim]

is probably what you want.

On Mon, 19 Feb 2007 22:55:33 -0600
John Harrison <john.harrison at 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 at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

More information about the Pd-list mailing list