deltaquattro <deltaquattro@[EMAIL PROTECTED]
> wrote:
> On 17 Apr, 21:31, nos...@[EMAIL PROTECTED]
(Richard Maine) wrote:
> > Oh, but I forgot to mention on somewhat related method that I've used
in
> > comparable situations. Pass a single adjustable-size array for such
> > auxillary data.
> But this requires me to modify the interfaces in quad and in all the
> subroutines it calls, doesn't it? Because I now have to pass
>
> func(x,p)
>
> where p is the array of reals (parameters) instead than func. thanks
Yes, it does require a modification like that. However, it only requires
the single modification, which then works for a broad category of
functions. You don't have to remodify quad for every particular
function. It is basically just a way of formulating an interface to
"function of x plus some auxilary data" in a way that a single interface
can handle a lot of those kinds of cases. As it turns out, in my case, I
was't modifying old code. I was writing new code, which needed a
simillar flexibility. I wrote the code to have this kind of interface in
the first place.
The approaches with C void pointer and with polymorphism also require a
comparable modification, so this method is very much in the same
category from that perspective. That's why I called it "somewhat
related." See my prior post for (very brief) commentary about
distinctions among them.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain


|