Array data after file close

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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`



.



Relevant Pages

  • Re: cloneNode() not getting script tag content
    ... the elements under the form tag. ... With the script tags I am filling out a javascript associative array: ...
    (comp.lang.javascript)
  • Re: valid VMA ranges and mincore()
    ... it appears to be filling in values of -1 into ... -1 from the system call and set errno to ENOMEM. ... Linux: http://linux.about.com/library/cmd/blcmdl2_mincore.htm ... - Filling in values of -1 into the array will confuse existing applications, ...
    (freebsd-hackers)
  • my doesnt totally isolate
    ... I seem to have misunderstood something about 'my'. ... the impression that when you defined a variable in a function or ... block using 'my' the variable was totally private and totally ... In the first invocation of zzzarray @aaa start out undefined, ...
    (comp.lang.perl.misc)
  • Re: Many newbie questions regarding python
    ... "Rogério Brito" wrote in message ... technique of programming called dynamic programming where initializing all ... A sparse array? ... Even if an array could be constructed by assigning to arbitrary elements, the gaps created would still need filling in with None or Unassigned. ...
    (comp.lang.python)
  • Re: Using GetDIBits is not loading all the picture in the array
    ... Correction - Noticed that the GetDIBits is only filling the first part ... The y variable refers to height index, ... when this is updated to the next count the array will load only few ...
    (comp.lang.basic.visual.misc)