Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
load data from file as data of separate databases
#2
Do the records in your file contain the three types of data? That is, does your file have records that contain the age, the comments, and then the score?
Example: Is each data record designed something like this:
* AGE in positions 1 to 3
* COMMENTS in positions 5 to 19
* SCORE in positions 20 to 22

If the records are something like that, then you can read each record and extract the AGE, COMMENTS, SCORE on one pass through the file. Then maybe your program could be:
Code:
open "data.txt" for input as #1
do while not eof(1)
     line input #1,d$
     age$ = left$(d$,3)
     cmt$ = mid$(d$,5,15)
     scr$ = mid$(d$,20,3)
     ' Then if you want to print each:
     print age$;space$(2);scr$
loop
system
*****
Reply


Messages In This Thread
load data from file as data of separate databases - by Moneo - 11-07-2004, 07:36 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)