On Sun, 19 May 2013, Antonio Elias wrote:
Sorry if my question is stupid. I am an undergraduated student and I
performaced a function with my own estimator for my final project. Now I
would like to create a monte carlo silumation for testing the behaviour of
my parameters but I read in the manual that a loop does not allow a
function inside. Would be possible do it?
You cannot _define_ a function inside a loop. But you can
call a function from a loop just fine, which I presume is what
you really want to do.
<hansl>
function scalar trivial (scalar x)
return 2*x
end function
# main script
loop i=1..10
scalar k = trivial(i)
endloop
</hansl>
Allin Cottrell