[Mathlib-develop] Changes to JMathLib
Status: Beta
Brought to you by:
st_mueller
From: mark <msp...@ya...> - 2003-09-02 18:53:44
|
Hi, This is a bit later than I intended but I just committed a set of changes= to=20 JMathLib. These are: New error code, Now if a function hasn't been implemented, like Factorise= ,=20 instead of just returning 0 it should throw a not implemented error. Return Function implemented - The return function throws a Control except= ion=20 which is caught by the UserFunction object. Any parameters are passed as = the=20 function return values. User Function change: instead of storing the variable list and code seper= ately=20 the User function now stores a Context Object. I was doing some experimenting with coroutines, using a yield function to= exit=20 the function so that it's state would be saved. However I couldn't find a= =20 reliable way to store the last expression that had been executed so that=20 hasn't been committed. Load Function - The load function can be used to reload a m-file if it ha= s=20 been modified. It'll make testing m-files easier since you can test chang= es=20 without having to rerun the interpreter. The FunctionManager now uses a hash map to store any user functions. Best Regards Mark Sparshatt =20 |