I once recieved a file where the entire table was sent to me as one line. I t was unbelievably long. The way I solved the issue was using 1 FGETS()
creating a loop and then substringing the entire line while keeping a
generic count:
reading = fgets(lnhandle)
for x = 1 to len(fgets(reading))
m.field1 = substr(reading,x,fieldlength1)
m.field2 = substr(reading, x+fieldlength1+1,fieldlenght2)
etc.
x = fieldlength1 + fieldlength2
endfor
Sandy
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement