the error states "Type-mismatch" and highlights the line of code that I have marked with asterisks. heres the code:
Sub fitFletch(x(), ss, jn, ifn)
ReDim g(jn), h(10000) As Double, w(10000), xm(jn)
For i = 1 To jn
xm(i) = x(i)
Next i
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' stepsize = .000001
stepsize = 0.0000001
' stepsize = .0001
eps = 0.0000000000001
' eps = .0000001
mode = 1
maxfn = 1000
iprint = 1
estfn = func(x()) *********************
Call flet(f, x(), jn, g(), h(), dfn, xm(), stepsize, eps, mode, maxfn, 1 * iprint, w(), 1 * iexit, ifn)
ss = func(x())
Call printstats(x(), iter, jn, ss)
End Sub