stray CR (carriage return) outputted by DOS version

DOS specific questions.
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

stray CR (carriage return) outputted by DOS version

Postby rugxulo » Jan 05, 2011 7:43

Code: Select all

print "Hello, world!"


It's printing an extra CR (carriage return) in addition to the normal line ending CR+LF pair.

Hello, world! 0xD 0xD 0xA ' it shows the literal chars, this here is only for clarity


I consider that a bug. (The Win32 compiler doesn't do this, BTW, outputs CR+LF only.)
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Postby sir_mud » Jan 07, 2011 19:53

Are you using the latest version? I know a similar problem was fixed a long time ago
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Postby rugxulo » Jan 08, 2011 9:02

Yes, it's the latest version.

Code: Select all

[ WinXP ] Sat 01/08/2011> fbc -version
FreeBASIC Compiler - Version 0.21.1 (08-11-2010) for dos (target:dos)
Copyright (C) 2004-2010 The FreeBASIC development team.
Configured as standalone
objinfo enabled using C BFD wrapper


[ WinXP ] Sat 01/08/2011> fbc hello.bas

[ WinXP ] Sat 01/08/2011> hello > hello.txt

[ WinXP ] Sat 01/08/2011> debug hello.txt
-d
0B12:0100  48 65 6C 6C 6F 2C 20 77-6F 72 6C 64 21 0D 0D 0A   Hello, world!...
Fox
Posts: 353
Joined: Aug 08, 2006 13:39
Location: Lille, France
Contact:

Re: stray CR (carriage return) outputted by DOS version

Postby Fox » Jan 08, 2011 11:16

rugxulo wrote:It's printing an extra CR (carriage return) in addition to the normal line ending CR+LF pair.


Hi Rugxulo,

I reported this problem a long time ago (back in 2006):
http://www.freebasic.net/forum/viewtopi ... highlight=

However, my report doesn't seem to catch the attention of FB developers... maybe you will have more luck ;)
dkl
Site Admin
Posts: 3221
Joined: Jul 28, 2005 14:45
Location: Germany

Postby dkl » Jan 08, 2011 21:34

Here's the bug added to our bugtracker at Sourceforge, so it won't get lost (again):
Extra CR printed on dos/win32

The stray CR also appears in the FB runtime's error messages, even on Windows. It's the same problem there: The FB runtime prints \r\n to something opened in text mode, and it gets turned into \r\r\n. I'm thinking the FB runtime should just use \n for everything text-mode related. Well, time to experiment.

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 4 guests