[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>

I'm really sorry if this isn't the place to talk about this. I've

25 messages 2005/03/21
[#4606] Re: New block syntax — "David A. Black" <dblack@...> 2005/03/21

Hi --

[#4629] Re: New block syntax — "Sean E. Russell" <ser@...> 2005/03/30

On Monday 21 March 2005 16:17, David A. Black wrote:

[#4648] about REXML::Encoding — speakillof <speakillof@...>

Hi.

15 messages 2005/03/31
[#4659] Re: about REXML::Encoding — "Sean E. Russell" <ser@...> 2005/04/04

On Thursday 31 March 2005 09:44, speakillof wrote:

Re: Strange argc check in stable snapshot

From: Paul Brannan <pbrannan@...>
Date: 2005-03-10 14:16:54 UTC
List: ruby-core #4552
On Thu, Feb 24, 2005 at 03:14:21AM +0900, Steven Jenkins wrote:
> This is perfectly legal C. There's nothing special about main() except 
> that the loader uses it as the entry point. Any other function can call 
> it, including itself.
> 
> The argc in question is nonnegative by convention only. Someone could 
> just make a mistake and call it with the wrong argument.

5.1.2.2.1 Program startup

2 If they are declared, the parameters to the main function shall obey the
following constraints:

- The value of argc shall be nonnegative.

The standard is a little ambiguous, in that it does not specify whether
parameters must obey these constraints when calling main recursively,
but the way I read it, this is not legal.

As a side note, calling main recursively is legal in C but not in C++.

Paul



In This Thread

Prev Next