Article View: comp.lang.misc
Article #21Re: Robots...
From: Mike Meyer
Date: Fri, 30 Oct 1992 03:32
Date: Fri, 30 Oct 1992 03:32
36 lines
1642 bytes
1642 bytes
In <1992Oct29.163702.9849@texhrc.uucp>, pyeatt@Texaco.com (Larry D. Pyeatt) wrote:
> In article <SPACKMAN.92Oct28142448@disco-sol.dfki.uni-sb.de>, spackman@disco-sol.dfki.uni-sb.de (Stephen Spackman) writes:
> |> both have really
> |> stupid type declaration syntax.
>
> What could be simpler and more clear than:
>
[Pascal deleted - or is that wishfull thinking :-]
> or in C:
>
> typedef float[26] mytype;
> typedef char[201] yourtype;
Well, to start with, those are wrong. That should be:
typedef float mytype[26] ;
typedef char yourtype[201] ;
Which just goes to show you that it isn't all that simple and clear.
> would print out the value of the first element in the array, while the C
> statement
>
> printf("%f\n",mine['a']);
>
> would print out some weird value from the 97th position of an array which
> only contains 26 elements. It would not complain, hiccup, warn, or
> otherwize help you find your error.
> you have to write
You need to get a better compiler. Mine responds to the above with the
message:
test.c 7 Warning 83: reference beyond object size
<mike
Technical Details
Message-ID:
<mwm.2gwf@contessa.palo-alto.ca.us>Path:
arc1-ca.pugleaf.net!sparky!uunet!ukma!usenet.ins.cwru.edu!agate!apple!decwrl!contessa!mwmReferences:
<1992Oct18.131021.1165@kth.se> <SPACKMAN.92Oct28142448@disco-sol.dfki.uni-sb.de> <1992Oct29.163702.9849@texhrc.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!usenet.ins.cwru.edu!agate!apple!decwrl!contessa!mwm From: mwm@contessa.palo-alto.ca.us (Mike Meyer) Subject: Re: Robots... Newsgroups: comp.lang.misc Distribution: world References: <1992Oct18.131021.1165@kth.se> <SPACKMAN.92Oct28142448@disco-sol.dfki.uni-sb.de> <1992Oct29.163702.9849@texhrc.uucp> X-NewsSoftware: Amiga Yarn 3.4, 1992/08/12 15:49:52 Message-ID: <mwm.2gwf@contessa.palo-alto.ca.us> Date: 29 Oct 92 19:32:52 PST Organization: Missionaria Phonibalonica Lines: 36