digitalmars.D.bugs - example no longer working because of changed casting rules?
- Roel Mathys (20/21) May 24 2004 The first example does not compile any more on DMD090, I guess a
- Ivan Senji (4/24) May 24 2004 this should be:
- Roel Mathys (5/47) May 24 2004 right, but the documentation on this page concerning Function Literals
- Walter (3/6) May 25 2004 Done. Thanks
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 24 2004
Ivan Senji wrote:"Roel Mathys" <roel.mathys yucom.be> wrote in message news:c8thde$96g$1 digitaldaemon.com...right, but the documentation on this page concerning Function Literals should be updated. http://www.digitalmars.com/d/expression.html roelThe 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 )this should be: fp = &foo;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:c8uk0h$2ddl$1 digitaldaemon.com...right, but the documentation on this page concerning Function Literals should be updated. http://www.digitalmars.com/d/expression.htmlDone. Thanks
May 25 2004