🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5698

Re: ansi printf questions

#5698
From: Bob Larson
Date: Mon, 06 Feb 1989 07:19
15 lines
980 bytes
Thanks to all who answered %i is the same as %d in *printf.  (They
do differ in *scanf.)

One further question:  On a machine with 16 bit short and 32 bit int,
what should:

printf("%hd", 65537);

print?  65537 (ignore the h)?  1 (truncate to short)?  unspecified?

-- 
Bob Larson	Arpa: Blarson@Ecla.Usc.Edu	blarson@skat.usc.edu
Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson
Prime mailing list:	info-prime-request%ais1@ecla.usc.edu
			oberon!ais1!info-prime-request
Technical Details
Message-ID: <15188@oberon.USC.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!oberon!skat.usc.edu!blarson
References: <15159@oberon.USC.EDU> <9591@smoke.BRL.MIL> <372@twwells.uucp> <9594@smoke.BRL.MIL>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!oberon!skat.usc.edu!blarson
From: blarson@skat.usc.edu (Bob Larson)
Newsgroups: comp.std.c
Subject: Re: ansi printf questions
Message-ID: <15188@oberon.USC.EDU>
Date: 6 Feb 89 07:19:55 GMT
References: <15159@oberon.USC.EDU> <9591@smoke.BRL.MIL> <372@twwells.uucp> <9594@smoke.BRL.MIL>
Sender: news@oberon.USC.EDU
Reply-To: blarson@skat.usc.edu (Bob Larson)
Organization: USC AIS, Los Angeles
Lines: 15