Hi Jim,
Like [soundfiler]’s “-resize” flag, this would be a very useful feature for array loading.
You can load a text file and then query its size, something like:
[read -c your_file, bang(
|
[text]
|
[text size]
|
[array size your_array]
Best,
fede
On Apr 6, 2018, at 10:38 AM, Jim Ruxton jim.ruxton@gmail.com wrote:
I am reading a text file into an array. I would have expected the array size to grow to the same as the number of lines/elements in the text file but it seems to default to a size of 100. Is there a way for the size of the array to take on the size of the text file automatically? If not how do I get the number of lines in the text file so I can resize the array accordingly?
Thanks,
Jim
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list