Question
How to declare a new Data Type?
I have a new Data type ( fxn ) declared in delphi, and i
would like to convert the code to actionscript
how can i declare in actionscript such a new data type, and after - to use as i do in delphi
thanks!
quote:
type fxn=procedure(t:extended;x:array of extended;var f:array of extended);
.....
procedure fp(t:extended;x:array of extended;var f:array of extended);
begin
f[0]:=x[1];
f[1]:=-sin(x[0])*(g/ll);
end;
....
procedure r_kutta6(eps,t0:extended;x0:array of extended;fnx:fxn;
var t:extended;var x:array of extended);
begin
...
fnx(t0,x0,f); //means fp(t0,x0,f); - when applying the procedure.
...
end;
...
r_kutta6(0.0001,t0,xx0,fp,t,xx);
how can i declare in actionscript such a new data type, and after - to use as i do in delphi
thanks!