[DGD]Bug?

Felix A. Croes felix at dworkin.nl
Sun Sep 5 17:58:29 CEST 1999


On Sat, 4 Sep 1999, Jason Cone wrote:

> I was just doing some routine coding, and ran across a compile-time error
> that had me going crazy for about 15 minutes.  That being, the following
> code gives a 'syntax error' on line 15.  If I put a valid code segment
> immediately after line 14, all is fine.  And by 'valid code segment', I mean
> anything save a comment (comments yield the same result as the following
> code).  I'm certain that there are no C compilers that would find fault with
> the 'switch' construct as listed below.  Am I wrong?

Probably.  "There are no C compilers that ..." is rather a sweeping
statement :)


> 1:  static void create
> 2:  (
> 3:      void
> 4:  )
> 5:  {
> 6:      int nTest;
> 7:
> 8:      switch (nTest)
> 9:      {
> 10:         case 1:
> 11:             send_message("1\n");
> 12:             break;
> 13:
> 14:         case 2:

DGD requires that you insert a `;' here.

> 15:     }
> 16: }


Regards,
Dworkin


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list