Reading from a file
Greg Osenbach
gosenbach at gmail.com
Wed Feb 11 10:30:19 UTC 2009
Ok, Tanks for the suggestions.
So so lets say the list from my orignal experiment is 120 rows long and
could be from any one of 60 different lists. I need the LastValue from two
of those (at random).
At the end of experiment 1 I pick at random 2 rows from the list, and write
a text file containing:
ListFileName,BlockNumber,LastValue
ListFileName,BlockNumber,LastValue
And later on will just read this text file rather than the log file.
Is see the Input commands loads the contents of the file into a string.
Then what? with e-basic how do I find the two LastValues in said string?
Other languages I have used have functions built in that would directly take
a comma dileminated file and place it in a 2 dimensional array, where I
could then just read array(0,2) and (1,2). I hae not come across anything
in e-basic that might accomplish this, only the input command which looks
like it just will read a cartin number of bytes into a string. Let's assume
that ListFileName and BlockNumber cab be a variable length, which will
change the relative positions of LastValue in the file.
Thoughts?
Thanks,
Greg
On Wed, Feb 11, 2009 at 4:43 AM, David P Vinson <d.vinson at ucl.ac.uk> wrote:
>
> (oops, sorry!)
> I missed "existing log file from previous experiment" in the previous
> email I sent. Of course my suggestion only works if you haven't yet run
> the first experiment.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20090211/a4d447f6/attachment.htm>
More information about the Eprime
mailing list