Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Low level
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00598183
Message ID:
00598203
Vues:
20
>>>Hello All,
>>>I'm getting some pretty weird behavior from my code and I hope someone out there will see what I'm missing.
>>>Everything in this code I have checked from the command window and it all works fine. But within the application, it all fails
>>
>>>=adir(my)
>>>For fcounter = 1 to <b>alen(my,1)</b>
>>>	l_status = .t.
>>>	l_process = .f.
>>>	thisfile = my(fcounter,1)
>>>	wait wind 'Checking file ' + thisfile nowait
>>>*the tt here returns a positve number	
>>>        tt = fopen(thisfile)
>>>	If tt < 0
>>>		Repl probs.desc with 'Unable to open file for checking'
>>>		l_status = .f.
>>>		=fclose(tt)
>>>		Loop
>>>	Endif
>>>
>>>=fseek(tt,0)
>>>	Do while not feof(tt)
>>
>>>**Here is the problem I'm always at feof() and I can't close the file either!!
>>>What's going on!
>>>
>>Hi Sandy,
>>
>>First, alen(my,1) returns the number of rows in an array.
>>Second, you don't need fseek because after file is open the pointer is at the beginning of the file. It sounds like your file is empty if its at the eof right away. What's the value of my(fcounter,2) - the size of the file? Do you get any errors when you try to close file?
>
>Could you answer my questions?

You can use UPDATE button to update your messages :))
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform