hi everybody.

i want to include multi thread programmaming inside my proyects
(webforms applications with pb 11.5 or pb12 .net IDE), know that
framework 2.0 has semaphores, threads, loks, etc.. but i can't get it
yet adding into my proyect succesfully!!

i did try this, but how do it???

the .net class have to be in c#? (using visual studio?)

is posible also inside the PB 12 .NET IDE, i mean how is the syntax?

is a delegate the funtion, where's the declaration?

// .NET class declaration part in C# (in a external assembly)
delegate double Func(double[] a);

// PowerScript consuming part
public function double of_sum( double a_v[] )
double sum
for i = 0 to i < a_v.Length step 1
sum = sum + a_v[i]
return sum
end function

public subroutine test() // multi-thread, no callback
double a[] = {1.0,2.0,3.0,4.0,5.0}
Func D = of_sum
System.AsyncCallback nullValue // no callback
integer stateValue // some value that can be passed to callback,
here not used
System.IAsyncResult ar = D.BeginInvoke( a, nullValue, stateValue
) // start thread
double result = D.EndInvoke( ar ) // wait for thread to return
result (join)
end subroutine

one example will be wanderfull

thanks in advance again folks, and happy code!!