Re: why still use C?
From: cody (dont.spam.me.deutronium_at_gmx.de)
Date: 10/16/03
- Next message: Peter Bennett: "Re: Need help with my program"
- Previous message: Mark Tarka: "Re: Fundamental Reason for High Achievements of Jews"
- In reply to: Mark Gordon: "Re: why still use C?"
- Next in thread: Irrwahn Grausewitz: "Re: why still use C?"
- Reply: Irrwahn Grausewitz: "Re: why still use C?"
- Reply: Mark Gordon: "Re: why still use C?"
- Reply: James Kuyper: "Re: why still use C?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Oct 2003 23:57:20 +0200
"Mark Gordon" <spamtrap@flash-gordon.me.uk> schrieb im Newsbeitrag
news:20031015232209.128f9a60.spamtrap@flash-gordon.me.uk...
> On Wed, 15 Oct 2003 22:17:35 +0200
> "cody" <dont.spam.me.deutronium@gmx.de> wrote:
>
> Please don't trim the attributions since it prevents people from seeing
> who said what.
>
> > > int test(int size)
> > > {
> > > int *new = malloc(size); /* two non-C++isms in this line */
> > > return 1 //*
> > > -1 + 1; /* 0 in C99, 1 in C++ */
> > > }
> >
> > is the missing semicolon at the end of a block allowed in C?
>
> A semicolon is required to terminate every C statement, however in C99
> there is no missing semicolon in the above.
>
> HINT: C99 added a form of // commenting.
int test(int size)
{
int *new = malloc(size); /* two non-C++isms in this line */
return 1 //* <-- the c version misses a semicolon here,
additionally //* will imho produce no valid comment in c.
-1 + 1; /* 0 in C99, 1 in C++ */
}
-- cody [Freeware, Games and Humor] www.deutronium.de.vu || www.deutronium.tk
- Next message: Peter Bennett: "Re: Need help with my program"
- Previous message: Mark Tarka: "Re: Fundamental Reason for High Achievements of Jews"
- In reply to: Mark Gordon: "Re: why still use C?"
- Next in thread: Irrwahn Grausewitz: "Re: why still use C?"
- Reply: Irrwahn Grausewitz: "Re: why still use C?"
- Reply: Mark Gordon: "Re: why still use C?"
- Reply: James Kuyper: "Re: why still use C?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|