I bring another question to the echo...
I am trying to find a way to compare data in a file to a text file. Here's a
sample of what I am trying to do:
------CUT-------
TYPE SampleDataFile
Field1 AS STRING * 50
Field2 AS INTEGER
Field3 AS INTEGER
END TYPE
DIM Sample AS SampleDataFile
A% = FREEFILE
OPEN "TEST.TXT" FOR INPUT AS #A%
'TEST.TXT can vary in number of lines.
'would like to put this in memory without writing to disk.
WHILE NOT EOF(A%)
INPUT #A%, Entry1$, Entry2%
'Where to put the data????
WEND
B% = FREEFILE
OPEN "TEST.DAT" FOR RANDOM AS #B% LEN = LEN(Sample)
NumRecs% = LOF(B%)/LEN(Sample)
FOR C% = 1 TO NumRecs%
GET #B%, C%, Sample
L1$ = Sample.Field1 'assign a work string
L2% = Sample.Field2
'In this part, I want to compare L2% with
'each entry in A% & look for a match with Entry2%
'If L2% = Entry2%, I want to increment Sample.Field3
NEXT C%
CLOSE #B%
'Finally, in this part I will create a text file showing the results
'Need a way to retrieve them from memory.
END
----------CUT-----------
...anyone....?????
-Ron
... The deeper the sorrow, the less tongue hath it.
-+- QuikEdit 2.41R+
--- TriToss (tm) Professional 11.0 - #229
---------------
* Origin: * Dynasty BBS * The Home of Crazy Nights Software * (1:110/1065.0)
|