Tuesday, August 29, 2006

New TI68K AMS functions may break old programs

AMS 3.10 for the TI68K calculators (Voyage 200, TI-89 Titanium, etc) includes some new functions, most of dubious value. One particular dubious function, root(), caused one of my old programs to break. I had ported a polynomial root finder, polyroot(), using Laguerre's method, and it included a local function called root(). polyroot() ran fine under AMS 3.10 until I unarchived it and edited it a bit. This caused the "missing (" error after the Local declaration. Obviously, the built-in root() conflicted with my local root().

The solution is obvious: don't use built-in function or system variable names as locals in TI Basic programs. An even better policy is to avoid names which may become functions in future AMS releases. I renamed root() to root1(), and all was well.

0 Comments:

Post a Comment

<< Home