Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Deep Toaster on October 08, 2010, 07:46:14 pm
-
For one reason or another, XDE needs a routine that can search backwards for the first 0 (in other words, length( but searching backwards). I don't understand completely how length( itself works. Can anyone write one for me? TiA (no, the other one)!
And a length(XX)r would be a nice feature for Axe, btw. Just an informal feature request :)
EDIT: Actually, never mind. I just realized I have Calcsys. Sorry to bug everyone.
EDIT2: If anyone wants, I can post the routine here.
-
can't this be written in axe?
.called as sub(LEN,[starting location])
.returns # of bytes from the starting location to the next 0 data element going backwards, not including the byte at the pointer itself.
.if you want to include the byte at the pointer itself, change 0->C to 1->C.
Lbl LEN
0->C
While {C-1->C+r1}
End
abs(C)
-
Yeah, but I figured an actual routine would be a lot faster. It's just 7 bytes!
-
am I the only one who was reminded of xLib xLib Revolution when I saw "(XX)r" ? :P
-
Heh, didn't plan that :D