Hi all

I have got a dynamic array declared as :

public tmpChase() as single

It is going to be a multidimensional array and the data is being read from a standerd "," (comma???) delimeted text file. I read the data using :

VB Code:
  1. Nr = FreeFile
  2.     Open strOpen For Input As #Nr
  3.         Do While Not EOF(Nr)
  4.             'Array aanpassen
  5.            
  6.             ReDim Preserve tmpChase(MaxChannels, tmpMaxStep)
  7.            
  8.             For i = 0 To MaxChannels
  9.                 Input #Nr, Inputstring
  10.                 tmpChase(i, tmpMaxStep) = CSng(Inputstring)
  11.             Next i
  12.            
  13.             tmpMaxStep = tmpMaxStep + 1
  14.         Loop
  15.     Close #Nr

so the code reads goes to the first line in the text file, reads al the values and then goes to the next line. Before it starts to read again the array is made bigger and i use Preserve because i want to keep the old data. No problems with the code so far and everything works alright.

Except when the values that are being read contain a decimal point. When i check they array right after a field is being read then i get the correct answer (let''s say 1.5). But when i later on test again i loose the decimal value and only get 5. I think this has something to do with Redim Preserve. But they array has been declared as single, so it shouldn't be a problem

Regards,

per-i