Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Alternate does not print ( ? ) To file
Message
From
06/06/2001 11:52:58
 
 
To
06/06/2001 11:47:55
Vytautas Racas
Norway Registers Development
Kaunas, Lithuania
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00515837
Message ID:
00515842
Views:
11
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform