Article View: comp.sys.atari.st
Article #26158Re: gnuplot (is there life after Megamax 1.1?)
From: jsgray
Date: Sat, 11 Apr 1987 22:16
Date: Sat, 11 Apr 1987 22:16
15 lines
1451 bytes
1451 bytes
In article <813@viper.UUCP> john@viper.UUCP (John Stanley) writes:
>In article <461@cernvax.UUCP> jmg@cernvax.UUCP () writes:
> >In doing this I have found two (more!) bugs in Megamax:-
> > sizeof("anystring") returns 4 (the size of the pointer!!!!), not 10.
>Excuse me, but this doesn't sound like a bug... If you take a look at
>K&R page 94, "In fact, any reference to an array is converted by the
>compiler to a pointer to the beginning of the array." This means you're
>taking sizeof a pointer, which is in fact 4...(Remember, in C a string
>is no different from a null terminated array of characters.)
Excuse me, but it is a bug. K&R p. 188: "When applied to an array, the
result is the total number of bytes in the array." What sort of consulting
do you do?
Jan Gray jsgray@watrose University of Waterloo (519) 885-1211 x3870
Technical Details
Message-ID:
<8640@watrose.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watrose!jsgrayReferences:
<461@cernvax.UUCP> <813@viper.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!utgpu!water!watnot!watrose!jsgray From: jsgray@watrose.UUCP Newsgroups: comp.sys.atari.st Subject: Re: gnuplot (is there life after Megamax 1.1?) Message-ID: <8640@watrose.UUCP> Date: Sat, 11-Apr-87 17:16:10 EST Article-I.D.: watrose.8640 Posted: Sat Apr 11 17:16:10 1987 Date-Received: Sat, 11-Apr-87 21:46:25 EST References: <461@cernvax.UUCP> <813@viper.UUCP> Reply-To: jsgray@watrose.UUCP (Jan Gray) Distribution: world Organization: U. of Waterloo, Ontario Lines: 15 Keywords: gnuplot, megamax, bugs