comparison tests/code/function_pointer_2.d @ 187:08b6ce45b456

Changed the way static arrays are represented Now uses [3 x i32] rather than [3 x i32]*, and when using constants they are copied before use. Also dixed a test or two
author Anders Halager <halager@gmail.com>
date Fri, 25 Jul 2008 12:53:58 +0200
parents 8ea749b7da91
children
comparison
equal deleted inserted replaced
186:e1e170c2cd44 187:08b6ce45b456
1 1 //fail
2 int main() 2 int main()
3 { 3 {
4 int function(int) f = &foo; 4 int function(int) f = &foo;
5 f(); 5 return f();
6 } 6 }
7 7
8 int foo(int x) 8 int foo(int x)
9 { 9 {
10 return x*x*x;
10 } 11 }