Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!moss@BRL.ARPA From: moss@BRL.ARPA (Gary S. Moss (SLCBR-VL-V)) Newsgroups: comp.lang.c Subject: Re: Long integers Message-ID: <9266@brl-adm.ARPA> Date: Mon, 14-Sep-87 10:23:21 EDT Article-I.D.: brl-adm.9266 Posted: Mon Sep 14 10:23:21 1987 Date-Received: Tue, 15-Sep-87 04:49:49 EDT Sender: news@brl-adm.ARPA Lines: 12 George, The format %ld is wrong when using the PRINTF family of functions. The reason for this is that integer arguments are *always* widened to LONG when passed in to a function, so the %d format is meant for LONGS. This is also true for %f. I am not certain, but pretty sure that I have gotten wrong behavior when using %ld in this context on certain hardware. This is contrary to the SCANF family where you *need* the %ld because you are placing the result in an address whose type is not known to the function. ~moss