[comp.lang.c] Manx vs. SAS/Lattice

peter@sugar.hackercorp.com (Peter da Silva) (04/22/91)

In article <stephen.672004888@cia.docs.uu.se> stephen@cia.docs.uu.se (Stephen Cooper) writes:
> {
>   SHORT xy[MAXPOINTS * 2];
>   struct Border BezierBorder =
>   {0, 0, 1, 0, COMPLEMENT, MAXPOINTS, &xy, NULL};

I think this is an illegal auto aggregate initialization. I'm surprised it
let you get away with it. I'm crossposting to comp.lang.c so the language
lawyers can have at it.

> {
>   SHORT xy[MAXPOINTS * 2];
>   struct Border BezierBorder =
>   {0, 0, 1, 0, COMPLEMENT, MAXPOINTS, NULL, NULL};

At least here the aggregate is a constant, that it can copy in. I'm still
surprised it worked. I wouldn't code like that. Try making xy and BezierBorder
static.
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

jk@cs.man.ac.uk (John Kewley ICL) (04/23/91)

What is the derivation of the term Manx (apart from one who was born in
the Isle of Man)? Do the authors come from the Isle of Man?

--
        J.K.
 
John M. Kewley, ICL, Wenlock Way, West Gorton, Manchester. M12 5DR
Tel:   (+44) 61 223 1301 X2138  Email: jk@cs.man.ac.uk / jk@nw.stl.stc.co.uk