I'm attempting to use the linked list class in the Eiffel Base, and am
having problems. I'm hoping someone can help. Basically, I'm reading
in a file and adding names to the list, but every time I add to the
list (using force or extend), it writes over the entire list and makes
every entry the name I just read.
Example:
my_list:LINKED_LIST[STRING]
from
input.start
to
input.exhausted
do
input.read_line
my_list.force(input.last_string)
input.forth
end
if my input was
smith
johnson
Then the list would be johnson, johnson. instead of smith, johnson
Why?