Reading from a file

Peter Quain pquain at une.edu.au
Wed Feb 11 22:15:48 UTC 2009


ListFileName,BlockNumber,LastValue are all attributes. maybe just 
write them to text file as seperate lines. you'll get 6 lines 
(strings). then just read in lines 3 and 6 when you start exp-2. Or 
if you want to know in exp-2 which lastvalues came from which list 
and which block in exp-1, read all lines into an array and set the 
attributes from the array.


At 09:30 PM 11/02/2009, you wrote:

>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 
><<mailto:d.vinson at ucl.ac.uk>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.
>
>
>
>
>
>>
>
>
>No virus found in this incoming message.
>Checked by AVG.
>Version: 7.5.552 / Virus Database: 270.10.20/1943 - Release Date: 
>10/02/2009 7:20 AM

--~--~---------~--~----~------------~-------~--~----~
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/20090212/01b12fd0/attachment.htm>
-------------- next part --------------


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.552 / Virus Database: 270.10.22/1946 - Release Date: 11/02/2009 11:13 AM


More information about the Eprime mailing list