help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Numerical Differentiation and Integration of Array Data


From: Francesco Potortì
Subject: Re: Numerical Differentiation and Integration of Array Data
Date: Mon, 05 Dec 2011 18:07:18 +0100

>> Yes, function pointers have always been available in the C language.
>> 
>> Are there general purpose languages where you do not have function
>> pointers or an equivalent construct?
>
>This is totally off-topic as regarding to Octave so if yo prefer you can 
>answer off-list,
>but I'm curios:  how to do someting like this in C?
>
>function f = fun (x, p)
>f = x + p;
>endfunction
>
>p = 3;
>specialized_fun = @(x) fun (x, p)  


double f (double x, double p)
{
   return x+p;
}

double (*specialized_fun)(double, double) = f;


 <http://www.newty.de/fpt/index.html>

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111)
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Fax:    +39.050.315.2040  
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


reply via email to

[Prev in Thread] Current Thread [Next in Thread]