Article View: net.lang.c
Article #9266need help with a delcaration
From: BJORNDAS%CLARGRAD.BITNET
Date: Sat, 06 Sep 1986 18:36
Date: Sat, 06 Sep 1986 18:36
19 lines
923 bytes
923 bytes
Very simple question here, folks. What is the correct way to
declare the variable in the called function below:
main()
{
char c = 'W';
foo(c);
}
foo(ch)
char ch; /* Or should this be "int ch;" because it gets promoted? */
{}
On my micro it MUST be declared an int; I think this is screwy, but
I'm not an expert.
---
Sterling Bjorndahl, Claremont Graduate School
BJORNDAS @ CLARGRAD on BITNET
Technical Details
Message-ID:
<3594@brl-smoke.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!smoke!BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDUShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!smoke!BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDU From: BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDU Newsgroups: net.lang.c Subject: need help with a delcaration Message-ID: <3594@brl-smoke.ARPA> Date: Sat, 6-Sep-86 14:36:25 EDT Article-I.D.: brl-smok.3594 Posted: Sat Sep 6 14:36:25 1986 Date-Received: Sun, 7-Sep-86 03:50:20 EDT Sender: news@brl-smoke.ARPA Lines: 19