Article View: net.lang.c
Article #9566Re: empty array declarations
From: Craig S. Anderson
Date: Wed, 15 Oct 1986 22:25
Date: Wed, 15 Oct 1986 22:25
25 lines
1342 bytes
1342 bytes
In article <1370@watmath.UUCP> rbutterworth@watmath.UUCP (Ray Butterworth) writes:
>
>If you really want to be daring, get rid of the "if (dimtab...!=0)"
>in the second change. Then it will complain about things like
> func(a)
> char a[];
> {
>which really should be "char *a".
That is only your opinion. K&R states on page 95 that:
"As formal parameters in a function definition,
char s[];
and
char *s;
are exactly eqivalent; which one should be written is determined largely
how expressions will be written in the function..."
--
Craig Anderson
Advanced Micro Devices, Inc.
(408) 749-3007
UUCP: {ucbvax,decwrl,ihnp4,allegra,intelca}!amdcad!csanders
#include <disclaimer.h>
Technical Details
Message-ID:
<13387@amdcad.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!nike!ucbcad!ucbvax!amdcad!csandersReferences:
<252@whuxcc.UUCP> <1370@watmath.UUCP>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!rutgers!nike!ucbcad!ucbvax!amdcad!csanders From: csanders@amdcad.UUCP (Craig S. Anderson) Newsgroups: net.lang.c Subject: Re: empty array declarations Message-ID: <13387@amdcad.UUCP> Date: Wed, 15-Oct-86 18:25:07 EDT Article-I.D.: amdcad.13387 Posted: Wed Oct 15 18:25:07 1986 Date-Received: Thu, 16-Oct-86 00:01:15 EDT References: <252@whuxcc.UUCP> <1370@watmath.UUCP> Reply-To: csanders@amdcad.UUCP (Craig S. Anderson) Distribution: net Organization: Advanced Micro Devices, Sunnyvale, California Lines: 25