On Tue, 01 Dec 2009, David Arturo Macias Corona wrote: Hi,
> [E:\harbour911b\harbour\bin\os2\watcom]pba2.exe > 0: .T. > 1: .T. > 2: .T. > [E:\harbour911b\harbour\bin\os2\watcom]pba2.exe > pba2.txt > 0: .T. > 1: .F. > 2: .T. > [E:\harbour911b\harbour\bin\os2\watcom]pba2.exe 2> pba2.txt > 0: .T. > 1: .T. > 2: .F. Thank you and Maurilio. So we can use it to detect redirection on all platforms. > >In DJGPP builds with COMMAND.COM and BASH also works as expected > >so only OS/2 builds should be verified yet. > Below are results using OpenWatcom, current and older Harbour > > Why empty lines between ? > ------- > 100 > > 200 > > 300 > [...] > ------- I guess you are talking about context of some file to which you redirected output. Just like in Clipper this lines are shown using: chr(13) + <nline> + chr( 13 ) + chr( 13 ) + <nline> ... and your editor or program you used to view that file presents chr(13) as new line. > hbmk2 speedtst.prg > ================== > > hbmk2: Processing environment options: -compiler=watcom > Harbour 2.0.0beta3 (Rev. 13082) > Copyright (c) 1999-2009, http://www.harbour-project.org/ > Compiling 'speedtst.prg'... > Lines 1204, Functions/Procedures 79 > Generating C source output to 'speedtst.c'... Done. Very good. > hbmk2 speedtst.prg > sale.txt 2>&1 > ================== > hbmk2: Processing environment options: -compiler=watcom > Harbour 2.0.0beta3 (Rev. 13082) > Copyright (c) 1999-2009, http://www.harbour-project.org/ > Compiling 'speedtst.prg'... > > 100 > > 200 > > 300 > > 400 > > 500 > > 600 > > 700 > > 800 > > 900 > > 1000 > > Lines 1204, Functions/Procedures 79 > Generating C source output to 'speedtst.c'... Done. If you change editor or viewer to one which does not accept single chr(10) or chr(13) as EOL but only sequence chr(13)+chr(10) then you will see the difference just like on the screen. I.e. try: type sale.txt best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
