Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a function define like

VB
Public Function F(ByVal a As Double, ByVal b As Double, ByVal c As Double, ByVal x As Double) As Double
     y = ax ^ 3 + bx ^ 2 + cx + d
    Return y
   End Function


How could i creat a function allow me to read the parameter a,b,c,d and return an unary function?for example a=1,b=1,c=3,d=4

VB
Public Function F(ByVal x As Double) As Double 
y = 1x ^ 3 + 2x ^ 2 + 3x + 4 
Return y 
End Function

or in other way how could i creat a function return a function of type

VB
Func(Of Double,Double)
Posted
Comments
YvesDaoust 4-Jun-13 11:13am    
Are you sure you need to do that ? If passing 4 arguments instead of 1 is an issue for you, you can pass a, b anc c as global parameters (and keep calling the function F).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900