I know that there is a page using LinReg to do it, but even for shorter numbers, this program takes pretty long to execute…has anyone found a faster way to do it?
The only way I can think of is to isolate each digit to use sub() with.
Where the number you want to convert is X:
:" :For(A,int(log(X)),1,-1 :Ans+sub("0123456789",1+10fPart(.1int(X/(10^A))),1 :End :Disp Ans
EDIT: It will have a space character in front of it; get rid of it with sub()
Depending on what form the number will be in, you could definitely make some faster codes. If it is only ever a positive integer, for example, you could do something like this:
;C is the number to convert "0→Str1 Repeat not(C sub("0123456789",1+10fPart(.1C),1)+Str1→Str1 iPart(.1C→C End sub(Str1,1,length(Str1)-1
This is basically another version of Mr. Dino's code :)
47%? Take a look and try to imagine how cool 100% will be. This has won zContest 2011 and made news on TICalc. This compromise between Assembly and BASIC parses like BASIC and is fast like assembly. Grammer 2
Oh I see what you did there! That's smart :D Actually, Xeda, I found your NumStr command in BatLib which solved my problem as well, but this is a nice way to do it in BASIC. I looked it up on this site, and the answer the page gave took a long time to run in comparison.