<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">>From:</SPAN></B> András Murányi <muranyia@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">>To:</SPAN></B> PD List <pd-list@iem.at><BR><B><SPAN style="FONT-WEIGHT: bold">>Sent:</SPAN></B> Wed, June 30, 2010 2:25:04 PM<BR><B><SPAN style="FONT-WEIGHT: bold">>Subject:</SPAN></B> Re: [PD] Problem with Textfile and line with float<BR></FONT>><BR>>You can also see what Chris McCormick's s-abstractions can do for you. I use s-map to handle big 'tables' (many rows of long lists they are). It doesn't need 'list' at the beginning of the lines :)<BR><BR>>Andras<BR></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">The [textfile] object, which is used inside [s-map], doesn't need 'list' at the beginning of the lines, either. </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">However, once [textfile] outputs a message that looks like ill-formed to Pd, you'll get an error and </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">won't be able to do anything with the data. (Try reading text-float.txt from the original post with [s-map] </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">and sending it a "find x" message-- you'll get the error originally mentioned in this thread.)</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">Since it's impossible to know whether an arbitrary text file will generate ill-formed messages when </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">output by [textfile], it'd be useful if there were an object that could output each line of a text file as a list (or </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">maybe there already is an external that does this?).</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">"float foo 1 2 3" in text file -> "list float foo 1 2 3" in Pd</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">"symbol foo" in text file -> "list symbol foo" in Pd</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">"list" -> "list list"</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">"bang" -> "list bang"</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">etc.</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">Then something like [s-map] could take a list output by such an object and use [list split 1] to get at </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">the first element of the data without any error.</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">(I was about to try screwing around with the code of [textfile] to see if I could achieve this with my </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">[lack of] c skills, but my linux box just died.)</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">-Jonathan</DIV></DIV></div><br>
</body></html>