Array data after file close
- From: "Pop`" <nodoby@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 14 Jul 2007 22:28:07 GMT
Hi,
I suppose the Subject should be more like "Pop's lost it again!" <g>.
Apparently, when filling an array from a file, the array's data ceases to
exist as soon as the file is closed?
I was under the impression that DA() would continue to exist within this
procedure until it was either cleared or ReDim'd.
What's happening that causes it to reset all the fields to ""?
In the code below, the first "Print DA(i) works. But in the second
occurrence of PrintDA(i), the data is gone; it's become "".
The following code (pre/post code missing but all shown is contiguous):
------------
ReDim DA(8) As String
Do While Not EOF(1)
Line Input #1, DA(i)
Print DA(i); ' This prints the expected data
' Text1 = Item
Loop
Close #1
For i = 1 To 8
Print DA(i) ' All it's printing is "" here?!
Next i
-------------------
Where'd the data go??
TIA,
Pop`
.
- Follow-Ups:
- Re: Array data after file close
- From: Kevin Provance
- Re: Array data after file close
- From: MikeD
- Re: Array data after file close
- From: Steve Gerrard
- Re: Array data after file close
- Prev by Date: Re: newbie: array passing problem
- Next by Date: Re: Array data after file close
- Previous by thread: VB console application with icon
- Next by thread: Re: Array data after file close
- Index(es):
Relevant Pages
|