[PD] how to write different types to [text]

Christof Ressi info at christofressi.com
Sun Mar 27 18:22:39 CEST 2022


> There is no way to get the rest of the message. I think [text get] 
> could simply output all sublists consecutively. By checking the right 
> outlet you know if a message spans a whole line (= 0), or is part of a 
> comma seperated list of messages (= 1).

To be more precise: it should output all sublists when you request a 
*whole line* (field number = -1).

If you have the following text:

1 2 3, foo bar baz, 5 6 7;

[0( -> [text get] would output "1 2 3" (type 1), "foo bar baz" (type 1) 
and "5 6 7" (type 0)

But how would you access individual sublists?

I guess you should be able to do [3 3( -> [text get] to get the second 
sublist, but [3 4( -> [text get] should probably trigger an out-of-range 
error.

But we do not know the indices and sizes of the individual sublists!

Maybe [text size] could have an extra outlet to provide that 
information? Maybe output a list of indices?

This definitely needs a bit of thinking...

Christof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220327/3d68b00c/attachment.htm>


More information about the Pd-list mailing list