Re: Actions

Marc Martin (marc.martin@msd.ds.boeing.com)
Tue, 04 Jun 1996 13:47:24 -0700

Al- I played around with Actions a while back, and didn't have any problem getting them to work "as
advertised" under Windows 95. However, I eventually decided that the way they are *meant* to work is
not the way I would *like* them to work, so I abandoned the whole thing. Here are some code fragments
of how I would implement an integration, with the Action calling itself at every integration step...

--
Marc Martin, marc.martin@msd.ds.boeing.com

VAR begTime, dt, endTime: LONGREAL;

TYPE IntegrateAction = POINTER TO RECORD(Services.ActionDesc) time: LONGREAL; END;

PROCEDURE ( a: IntegrateAction ) Do; BEGIN IntegrateStep( dt, a.time ); IF a.time < endTime THEN Controllers.DoLater( a, Controllers.now ); ELSE (* done *); END; END Do;

PROCEDURE Integrate; VAR a: IntegrateAction; BEGIN NEW( a ); a.time := begTime; Controllers.DoLater( a, Controllers.now ); END Integrate;