Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!husc6!xait!mirror!rayssd!galaxia!amanpt1!mrr From: mrr@amanpt1.zone1.com (Mark Rinfret) Newsgroups: comp.sys.amiga Subject: Re: Don't forget the comma Summary: It's a FEATURE Message-ID: <526@amanpt1.zone1.com> Date: 24 Oct 88 11:50:31 GMT Article-I.D.: amanpt1.526 References: <8810192323.AA21251@jade.berkeley.edu> Organization: HyperView Systems Lines: 28 In article <8810192323.AA21251@jade.berkeley.edu>, FSJTM@ALASKA.BITNET (...Ar Henchou Kuzh...) writes: > [] > Has anyone else run into this "feature" of Manx C? > It happens with both 3.4b and 3.6a (at least, the ones I have). > Minimal case - > > char *array[] = { "s1" "s2" }; > > That's it. > Now, it seems obvious to me (and every other compiler I > have used) that this is a syntax error. But the Manx compiler never even > burps. What it does do is concat "s1" and "s2" into "s1s2" and put just the > one pointer into array. Believe it or not, this is a FEATURE, not a bug. Look in paragraph 3.7 of the "Compiler" section of your reference manual. The heading is "String merging" - what the compiler does when it finds adjacent character strings. I suppose this is useful for defining long strings which don't fit on one line. The example in the book illustrates the construction of a string containing preprocessor defined symbols. Mark -- < Mark R. Rinfret, mrr@amanpt1.ZONE1.COM | ...rayssd!galaxia!amanpt1!mrr > < HyperView Systems Corp. Home: 401-846-7639 > < 28 Jacome Way Work: 401-849-9390 x301 > < Middletown, RI 02840 Hypermedia R Us! >