WITH statement in C

u557676751ea at deneb.UUCP u557676751ea at deneb.UUCP
Sun Jul 13 04:17:33 AEST 1986


> 
>      I dislike Pascal as much as the next C hacker, but one feature that could
> be useful to add to C is something akin to the Pascal "WITH" statement.  Since
> I haven't seen or read X3J11, I don't know if any new features are being added
> to the language.  By using  such a construct, one avoids long statements when
> using deeply nested structures/unions or the kludgy method of using defines.
> I would mail this to a committee member, but I don't the address of any and
> I figure one of them will probably read this.  In general, I don't advocate
> adding new features to a language (after all, eventually it just turns into
> creeping featurism :-), but some improvements are O.K.  I know everybody
> seems that they want some pet construct/function/option in the ANSI standard,
> so I'm no better than anyone else.  I'm only curious as to why nobody has
> mentioned the desire for this construct (or bitched about its abscence :-)
> 
> Daryl Clevenger
> 
> P.S.
>     I am not a frustrated Pascal user either, I detest the language.
>     Also, no complete signature line, since I have no idea what the path
>     to my site is through UUCP or anything but direct ARPA mail.


How about this?

    {
	someptr *foo;

        foo = &(incredibly->long->and->complicated->nested->structure);
        foo->bar = 0;
        foo->bar2 = x;
        .
        .
        .
    }



- Mark Nagel

ucdavis!u557676751ea at ucbvax.berkeley.edu               (ARPA)
...!{dual|lll-crg|ucbvax}!ucdavis!deneb!u557676751ea   (UUCP)



More information about the Comp.lang.c mailing list