"internal error"?


[Prev][Next][Index][Thread]

"internal error"?



hi all, this is my first post here.
i needed to write a routine to calculate the "midpoints" of data in a list, and
devised the following formula (for my ti-89, AMS 2.03):
seq(sum(lst,x,x+1)/2,x,1,dim(lst)-1)

so if lst was {1,3,5,7}, executing seq(sum(lst,x,x+1)/2,x,1,dim(lst)-1) returns
{2,4,6}

But when I put this code inside a function, it says "Internal Error". What's
going on? This error isn't listed in the manual, and i can't find anything wrong
with my code. I can write the routine some other way, but i still want to know
what the error is. Here's the code for my function (the "!=" is the "not equal
to" sign):

midpoint(lst)
Func
If remain(dim(lst),2)!=0 then
Return "ERROR IN LIST"
Else
Return seq(sum(lst,x,x+1)/2,x,1,dim(lst)-1)
EndIf
EndFunc
===== ===  ==   =    = ====  = = = == = = =  = = ==   = = =
...from the aspiring geek, the $al-Man
(AKA NineTurningMirrors, AKA ByteChild)
alien-angel@the-pentagon.com - smoke_jaguar@email.com
ICQ #: 58895095  -  http://members.nbci.com/ZeroMaster/
====== = = = ====== = ===== = === == =
Never put off until tomorrow what you can avoid altogether.

******************************************************************
* To UNSUBSCRIBE, send an email TO: listserv@lists.ppp.ti.com
* with a message (not the subject) that reads SIGNOFF CALC-TI
*
* Archives at http://peach.ease.lsoft.com/archives/calc-ti.html
******************************************************************