Thread overview
example no longer working because of changed casting rules?
May 24, 2004
Roel Mathys
May 24, 2004
Ivan Senji
May 25, 2004
Roel Mathys
May 25, 2004
Walter
May 24, 2004
The first example does not compile any more on DMD090, I guess a side-effect of changing the casting rules.

(To the bottom of the page: http://www.digitalmars.com/d/index.html )

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
For example:

	int function(char c) fp;	// declare pointer to a function

	void test()
	{
	    static int foo(char c) { return 6; }

	    fp = foo;
	}
	

is exactly equivalent to:

	int function(char c) fp;

	void test()
	{
	    fp = function int(char c) { return 6;} ;
	}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

regards,
roel
May 24, 2004
"Roel Mathys" <roel.mathys@yucom.be> wrote in message news:c8thde$96g$1@digitaldaemon.com...
> The first example does not compile any more on DMD090, I guess a side-effect of changing the casting rules.
>
> (To the bottom of the page: http://www.digitalmars.com/d/index.html )
>
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> For example:
>
> int function(char c) fp; // declare pointer to a function
>
> void test()
> {
>     static int foo(char c) { return 6; }
>
>     fp = foo;

this should be:
fp = &foo;

> }
>
>
> is exactly equivalent to:
>
> int function(char c) fp;
>
> void test()
> {
>     fp = function int(char c) { return 6;} ;
> }
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> regards,
> roel


May 25, 2004
Ivan Senji wrote:
> "Roel Mathys" <roel.mathys@yucom.be> wrote in message
> news:c8thde$96g$1@digitaldaemon.com...
> 
>>The first example does not compile any more on DMD090, I guess a
>>side-effect of changing the casting rules.
>>
>>(To the bottom of the page: http://www.digitalmars.com/d/index.html )
>>
>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>For example:
>>
>>int function(char c) fp; // declare pointer to a function
>>
>>void test()
>>{
>>    static int foo(char c) { return 6; }
>>
>>    fp = foo;
> 
> 
> this should be:
> fp = &foo;
> 
> 
>>}
>>
>>
>>is exactly equivalent to:
>>
>>int function(char c) fp;
>>
>>void test()
>>{
>>    fp = function int(char c) { return 6;} ;
>>}
>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>>regards,
>>roel
> 
> 
> 
right, but the documentation on this page concerning Function Literals should be updated.

http://www.digitalmars.com/d/expression.html

roel
May 25, 2004
"Roel Mathys" <roel.mathys@yucom.be> wrote in message news:c8uk0h$2ddl$1@digitaldaemon.com...
> right, but the documentation on this page concerning Function Literals should be updated.
>
> http://www.digitalmars.com/d/expression.html

Done. Thanks