Board index » delphi » Please help beginner!
ja...@hkstar.com (Jawaz Illavia)
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
ja...@hkstar.com (Jawaz Illavia)
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Please help beginner!
I guess this is a pretty simple question but I've just started using
Pascal. Is there any way of directing the output to both the screen AND a data file? I don't want to have to put 2 writeln's in (one to write to the screen and one to write to a file). If someone could reply ASAP I would be VERY grateful. Thanks Jawaz |
Bob Gibs
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Please help beginner!QuoteJawaz Illavia (ja...@hkstar.com) wrote: : Pascal. Is there any way of directing the output to both the screen : AND a data file? I don't want to have to put 2 writeln's in (one to : write to the screen and one to write to a file). Simultaneously? Nope. Not without a write for each file... Bob Bob Gibson -- gib...@netcom.com |
Martin Anders Hans
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Please help beginner!QuoteJawaz Illavia (ja...@hkstar.com) wrote: As you already have figured out, you can use two writelns. Why not make a PROCEDURE WriteBoth(InStr : STRING); Should works, haven't tried. CU Martin Mail me, if probz shows up :)) |
Nigel Goodwi
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Please help beginner!QuoteIn article <gibsonDHqnx4....@netcom.com> gib...@netcom.com "Bob Gibson" writes: System Programming' by Michael Tischer, has sample code for logging all screen output to a text file. /----------------------------------------------------------\ |
Balazs Scheidl
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Please help beginner!Quoted.jae...@dl3bcq.dinoco.de (Detlev Jaeger) wrote: type var OldOutFunc := TOutputFunc(TextRec(F).InOutFunc); function MyOutFunc(var F: TextRec): Integer; far; That's it. Out redefined output procedure first writes the contents of Hope this will be useful. Balazs Scheidler ---------------------------------------------------------------------- |
dick Wis
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Please help beginner!QuoteIn article <48kq08$...@hawk.pix.za>, bk000...@pixie.co.za (Brady Kelly) writes: ouputting procedures. In the simplest form, they look like this: procedure Emit(S: string); procedure EmitLn(S: string); This merely writes to the screen, and it looks clumsy, but oddly it saves procedure Emit(S: string); Fil, of course, must be an open text file variable. You can write -- |