digitalmars.D.bugs - example no longer working because of changed casting rules?
- Roel Mathys <roel.mathys yucom.be> May 24 2004
- "Ivan Senji" <ivan.senji public.srce.hr> May 24 2004
- Roel Mathys <roel.mathys yucom.be> May 24 2004
- "Walter" <newshound digitalmars.com> May 25 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 )
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 24 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 )
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
should be updated. http://www.digitalmars.com/d/expression.html roel
May 24 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
May 25 2004








"Walter" <newshound digitalmars.com>