Re: I found an error in printf

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu