Re: I found an error in printf
- Posted by xerox_irs at lvcm.com Feb 27, 2003
- 428 views
the problem is that when a whole bunch of charachters are running through that statement and every now and then it looks messed up like that. but now i understand why. ----- Original Message ----- From: Robert Craig <rds at RapidEuphoria.com> Subject: Re: I found an error in printf > > xerox_irs at lvcm.com wrote: > > printf(1,"Unknown Charachter \"%s\"\n",{13}) > > --<outputs>in 2.3 and 2.4 > > "nknown Charachter " > > I'd say that was correct. > 13 is \r, i.e. carriage return. > When it's printed, it moves the > cursor to the left margin, but it does not > move to the next line. After 13, the next character > to be printed is " which overwrites the U in Unknown. > Finally, you output a \n which moves to the next line. > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > > TOPICA - Start your own email discussion group. FREE! >