Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!elroy!devvax!jackm From: jackm@devvax.JPL.NASA.GOV (Jack Morrison) Newsgroups: comp.lang.c Subject: Re: C/dbx problem under Ultrix 2.0 Message-ID: <1298@devvax.JPL.NASA.GOV> Date: 12 Feb 88 15:29:09 GMT References: <881@ima.ISC.COM> Reply-To: jackm@devvax.JPL.NASA.GOV (Jack Morrison) Organization: Jet Propulsion Laboratory, Pasadena, CA. Lines: 31 Keywords: C, dbx, Ultrix Summary: improper declaration? In article <881@ima.ISC.COM> marc@symetrx.UUCP writes: >While hacking with some source the other day, I discovered some strangeness >in dbx given a couple different variations of the following program: > >main() >{ > static struct foo_t { char *a,*b; } foo[] = { > "foo", "bar", > "hello", "world", > "what's", "up", > }; > printf("%s %s\n",foo[1].a,foo[2].b); >} > Sorry to post, but mail address was not known. Did you try declaring foo[] correctly, as in static struct foo_t { char *a,*b; } foo[] = { { "foo", "bar" }, { "hello", "world" }, { "what's", "up" } }; ??? Many compilers won't accept it the way you've shown. What that has to do with dbx, though... -- Jack C. Morrison Jet Propulsion Laboratory (818)354-1431 jackm@jpl-devvax.jpl.nasa.gov "The paycheck is part government property, but the opinions are all mine."