Skip to content

Commit

Permalink
* DEBUG.TXT set flushfunc for win32 debug writeln.
Browse files Browse the repository at this point in the history
  • Loading branch information
mse2 committed Jul 12, 2012
1 parent 12eb10d commit 8409251
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions DEBUG.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,16 @@ to 0x2F
(it's the scancode of VK_HELP which is not present on most PC keyboards )

- reboot

In win-32, WRITELN called from within a program won't be printed in the IDE
internal console (because of some STDIO flushing issues on pipes)
unless the below code is inserted at beginning of the startup file
of the program:

{$ifdef mswindows}
     TextRec(Output).FlushFunc:= TextRec(Output).InOutFunc;
{$endif}

Also, You should place {$apptype console} compiler directive at beginning
of each unit calling WRITELN otherwise You may either encounter "File not
found" exception or to see silent nothing.

0 comments on commit 8409251

Please sign in to comment.