Xref: news-dnh.mv.net comp.os.msdos.djgpp:1888 Path: news-dnh.mv.net!mv!news.sprintlink.net!dispatch.news.demon.net!demon!contech.demon.co.uk From: sbehrens AT contech DOT demon DOT co DOT uk (Soenke Behrens) Newsgroups: comp.os.msdos.djgpp Subject: Re: printf doesn't interpret \n etc . . . Date: Mon, 04 Sep 1995 19:05:45 GMT Lines: 22 References: <42ehbc$912 AT oznet03 DOT ozemail DOT com DOT au> Reply-To: sbehrens AT contech DOT demon DOT co DOT uk Nntp-Posting-Host: contech.demon.co.uk To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp firstpr AT ozemail DOT com DOT au (Robin Whittle) wrote: >printf() works fine for me, except when I use a string from somewhere >else, in which case it ignores the \n \t codes, but still works fine >with the %f codes. > > printf(p->txtstring, *p->kval1, *p->kval2, *p->kval3, *p->kval4); Not surprising, really. Check out ISO/C, 5.2.1. Escape sequences are defined for character constants and string literals. In practice, that means that the compiler usually resolves escape sequences, not the library functions which act on characters. >This may not be DJGPP specific - but I don't know where else to ask. It's not DJGPP specific. Soenke -- I don't know what it is he's doing, it must be art