Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with LineNumberReader  RSS feed

 
Brian Snyder
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a snippet of code. I am able to generate a random line number and read four lines in a row (they represtent 4 multiple choice answers). When I try to place them into an array, however, I always get the first 20 elements in the file, not the line numbers I want.
Why am I not getting the proper line numbers loaded into my array?
Thanks in advance.

Here's the whole thing....

[This message has been edited by Brian Snyder (edited March 01, 2001).]
 
Brian Snyder
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed it folks. It now can read from a file whose numbers 1 to 76 are typed one line at a time to represent answers to multiple choice questions being grouped 4 at a time. It also remembers which ones are which without any repitition.
ANy suggestions if there were say some questions with 4 answers, some with 5 or even less or more??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!