[ExM Users] readdata

Justin M Wozniak wozniak at mcs.anl.gov
Fri Jun 27 10:49:17 CDT 2014


file_lines() isn't in the manual- I will add it now.

file_lines() automatically cuts out comments with # and omits empty lines.

You can also read() the whole file as a string and split() it up yourself.

On 06/27/2014 10:38 AM, Tim Armstrong wrote:
> No, not currently.  For your purposes the file_lines function would 
> work: (string s[]) file_lines(file f)
>
> I.e.
>
> out = file_lines(input("test.txt"));
>
> Performance won't be great for large files.
>
>
> On Fri, Jun 27, 2014 at 10:20 AM, Ketan Maheshwari <ketan at mcs.anl.gov 
> <mailto:ketan at mcs.anl.gov>> wrote:
>
>     Is there a T equivalent of K's readData function:
>
>     string bigarray[];
>     bigarray = readData("alistofmillionitems.txt");
>
>
>     Thanks,
>     Ketan
>
>     _______________________________________________
>     ExM-user mailing list
>     ExM-user at lists.mcs.anl.gov <mailto:ExM-user at lists.mcs.anl.gov>
>     https://lists.mcs.anl.gov/mailman/listinfo/exm-user
>
>
>
>
> _______________________________________________
> ExM-user mailing list
> ExM-user at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/exm-user


-- 
Justin M Wozniak

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/exm-user/attachments/20140627/21ea3780/attachment.html>


More information about the ExM-user mailing list