I am writing a standard windows app in Delphi 7.
If I was writing a console app, I can call the following to output to the cmd line or output file.
write
I did summarize this topic in a report with a running script too:
http://www.softwareschule.ch/download/maxbox_starter70.pdf as a second backup:
https://www.slideshare.net/maxkleiner1/nogui-maxbox-starter70
the main routine has a nativewriteline to separate from writeline:
for it:=1 to 50 do if IsPrime(it) then NativeWriteln(IntToStr(it)+' is prime');