Function call via string parameter in other function ? 
Author Message
 Function call via string parameter in other function ?

Hi there,

It is possible a function call to specify via a string parameter in a
second function. I have found 'CallByName', can I via this function also
other parapeter to deliver to my function.
Furthermore, It is possible a program to compile with an empty or dummy
function reference. And which later in a second copiled modul is defined
and linked to the empty reference. The sense is the later choice of
userdefined method.
I think in the first approach above, the userdefined method must exist
and is to compile with the main programm at the beginning.

Thank you in advance
Ivo
----------------------------------------------------



Fri, 13 Sep 2002 03:00:00 GMT  
 Function call via string parameter in other function ?
You cannot escape from defining the parameters to the function before you
can do anything but the actual code could be placed in a DLL.

The DLL can be called during development and yield a test result.
When the actual function is known, replace the test code of the DLL with
the actual code and then it will work as planned...

Quote:

> Hi there,

> It is possible a function call to specify via a string parameter in a
> second function. I have found 'CallByName', can I via this function also
> other parapeter to deliver to my function.
> Furthermore, It is possible a program to compile with an empty or dummy
> function reference. And which later in a second copiled modul is defined
> and linked to the empty reference. The sense is the later choice of
> userdefined method.
> I think in the first approach above, the userdefined method must exist
> and is to compile with the main programm at the beginning.

> Thank you in advance
> Ivo
> ----------------------------------------------------

--
Posted via CNET Help.com
http://www.help.com/


Fri, 13 Sep 2002 03:00:00 GMT  
 Function call via string parameter in other function ?
"H.Salomons" schrieb:

Quote:
> You cannot escape from defining the parameters to the function before you
> can do anything but the actual code could be placed in a DLL.

> The DLL can be called during development and yield a test result.
> When the actual function is known, replace the test code of the DLL with
> the actual code and then it will work as planned...


> > Hi there,

> > It is possible a function call to specify via a string parameter in a
> > second function. I have found 'CallByName', can I via this function also
> > other parapeter to deliver to my function.
> > Furthermore, It is possible a program to compile with an empty or dummy
> > function reference. And which later in a second copiled modul is defined
> > and linked to the empty reference. The sense is the later choice of
> > userdefined method.
> > I think in the first approach above, the userdefined method must exist
> > and is to compile with the main programm at the beginning.

> > Thank you in advance
> > Ivo
> > ----------------------------------------------------

> --
> Posted via CNET Help.com
> http://www.help.com/

Thanks,

But I think it is'nt wat I want or I dont understand your meaning.
The story is, I want to write an optimisation function for a wide range of
problems. The optimisation method need a quality function which described the
aim of the optimisation. This quality function is defined by the user and the
name is not known at the time point where the optimisation function is
written. I look for a possibility to give the users my optimisation method and
they can call my function with theirs fitness function without changing the
code of the method. I want make the use as simple as possible.
It is not possible to deliver the function pointer of the user defined quality
function to the optimisation method? I believe to remember me in C++ this
works well. I am a newcomer in BASIC and look for a solution for all kinds of
BASICs.
I have do this in MATLAB with 'feval' but this is an interpreter programming
language ;-)

Thank you in advance
Ivo
----------------------------------------------------



Sun, 15 Sep 2002 03:00:00 GMT  
 Function call via string parameter in other function ?
i think you want a callback function.
CallByName has to do with object properties.

Mr. X


Quote:
> Hi there,

> It is possible a function call to specify via a string parameter in a
> second function. I have found 'CallByName', can I via this function also
> other parapeter to deliver to my function.
> Furthermore, It is possible a program to compile with an empty or dummy
> function reference. And which later in a second copiled modul is defined
> and linked to the empty reference. The sense is the later choice of
> userdefined method.
> I think in the first approach above, the userdefined method must exist
> and is to compile with the main programm at the beginning.

> Thank you in advance
> Ivo
> ----------------------------------------------------



Tue, 17 Sep 2002 03:00:00 GMT  
 Function call via string parameter in other function ?
Writing a 'general' optimization function. Now I get what you want. I guess
that you should first look around for available source. There are numerous
people that have written free software and uptimization must be one of
them.

But if you want to pursue this kind of programming: I am also re-inventing
the wheel for the ump{*filter*}th time...

Your customer's optimization function only yields a float as result. The
customer has to match your parameters, so it is up to the customer to
comply, so the only thing that you can pass is a vector containing the
information that the user needs in his optimization. The function that you
have to call in your optimization package has to be passed as a function
pointer (speaking in "C").

There is a problem: pointers to functions only work if VB calls a .dll, so
an all-VB solution I could not give. Therefore I would advise to look
around and see how others solved it...

--
Posted via CNET Help.com
http://www.*-*-*.com/



Fri, 20 Sep 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Calling Function in CBF from Toolbar via a Public Function

2. Calling Windows API functions with string parameters from Access

3. Using string versus variant as function parameters

4. PB: Implementing a function with optional string parameters

5. Calling query using VBA function via ASP

6. Err while calling Oracle Stored function via ADO/ASP

7. Calling query using VBA function via ASP

8. Passing a string parameter to an external function in a DLL

9. Retrieve file via FTP api function call in the background

10. using string array as function parameter

11. error 3001 - parameter query with function call (bug?)

12. Create menu item calling a function with parameters

 

 
Powered by phpBB® Forum Software