🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9283

Re: need help with a delcaration

#9283
From: SCHEUTZOW,MICHAEL J
Date: Mon, 08 Sep 1986 13:58
20 lines
1075 bytes
In article <3594@brl-smoke.ARPA> BJORNDAS%CLARGRAD.BITNET@WISCVM.WISC.EDU writes:
>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: <2225@gitpyr.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!gatech!gitpyr!gt6294b
References: <3594@brl-smoke.ARPA>

Show 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!gatech!gitpyr!gt6294b
From: gt6294b@gitpyr.UUCP (SCHEUTZOW,MICHAEL J)
Newsgroups: net.lang.c
Subject: Re: need help with a delcaration
Message-ID: <2225@gitpyr.UUCP>
Date: Mon, 8-Sep-86 09:58:15 EDT
Article-I.D.: gitpyr.2225
Posted: Mon Sep  8 09:58:15 1986
Date-Received: Tue, 9-Sep-86 23:55:14 EDT
References: <3594@brl-smoke.ARPA>
Reply-To: gt6294b@gitpyr.UUCP (SCHEUTZOW,MICHAEL J)
Organization: Georgia Institute of Technology
Lines: 20