Loading External Files Into A List - Proper Set-up

Patrick ptarth at gmail.com
Fri Apr 20 02:26:09 UTC 2012


I'm resurrecting an ancient thread, because a problem emerged when I 
followed its instructions. Because I had a difficulty with the ideas 
presented, I'm assuming that sometime in the future someone else may have 
the issue and I can spare them the grief.
 
(XKCD (as usual) provides some amusing interpretation of the situation 
http://xkcd.com/979/)
 
In regards to loading a list from text file this information was provided.
 
On Thursday, January 14, 2010 12:15:34 AM UTC+13, liwenna wrote:

> .... 
>
> For the die-hard coders among us you could/should insert a
> listname.reset either somewhere AFTER the list has run or at the total
> beginning of the above code, before it loads the .txt file into the
> list. ...
>
I had loaded an example scripted in a Eprime List Object, which could be a 
different size than some of the alternative lists. I followed these 
instructions (and because I didn't think everything through) placed the 
List.Reset BEFORE the loading code. This gave me a very unexpected and 
nonobvious error. At a cursory test everything worked correctly, but it 
there was a hidden problem. The problem was that the characteristics of the 
original list was still present and were overwriting infromation about 
the the new List. Examples to clarify the behavior.
 
Problem Free Example
ListX is a List Object referencing List1 (size = 100 lines)
In an inline Object i replace ListX with List2 (size = 100 lines)
When I run ListX, it has 100 samples. All 100 are from List2. (Everything 
is fine)
 
 Too Short Example
ListX is a List Object referencing List1 (size = 100 lines)
In an inline Object i replace ListX with List3 (size = 80 lines)
When I run ListX, it has 100 samples. 80 from List3 and the last 20 lines 
from List1.
 
Too Long Example
ListX is a List Object referencing List1 (size = 100 lines)
In an inline Object i replace ListX with List2 (size = 120 lines)
When I run ListX, it has 100 samples. The last 20 lines from List2 are 
absent from the list.
 
To solve this problem the List.Reset must occur AFTER the List.Load 
statement.
 
Cheers,
Pt

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/2o2oTOsi9mcJ.
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/20120419/dfd6f7de/attachment.htm>


More information about the Eprime mailing list