Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Alternate does not print ( ? ) To file
Message
 
 
À
06/06/2001 11:47:55
Vytautas Racas
Norway Registers Development
Kaunas, Lithuania
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00515837
Message ID:
00515842
Vues:
12
Hi!

I always used following approach:

SET PRINTER TO MyFile.txt
SET PRINTER ON
** Do checks
? 'Error message'
SET PRINTER OFF
SET PRINTER TO

In addition, SET CONSOLE OFF can cause the problem. Usually, to make a log file, I do the fopen()/fclose() and a function called 'WriteToLog' do the real writing. Or just collect all in the VFP string than StrToFile it when finished.

HTH.


>Problem: I want to run some checks and print errors to text file.
>Code:
>
>SET CONSOLE OFF
>SET ALTERNATE TO SomeFile
>** Do checks
>? 'Error message'
>SET ALTERNATE TO
>
>'Error message' appears on screen.
>Fox creates file 'SomeFile' but it is empty.
>
>What I have missed?
>
>Thans
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform