Zeiger auf Nested Functions

Id: problem.tex,v 1.1 2004/11/16 12:32:07 waldmann Exp

int twice 
  ( int fun (int)
  , int x ) 
{ 
  return 
    fun (fun (x)); 
}
int f0 ( int x0 ) {
  return x0 * x0;
}

int f1 ( int x1 ) {
  int f2 ( int x2 ) {
    return x1 + x2;
  }
  return twice (f2, 5);
}

Für twice(f0,4) reicht Zeiger auf den Code von f0,

für twice(f2,5) nicht --



Johannes Waldmann 2005-01-28