I like mine.
Rot(a,b) Func local c seq(char(mod(ord(a[c]+b,256)),c,1,dim(a))->a Return join(a,"") EndFunc
Yes, that is TI-BASIC. It only calls one non-built-in function, and that's "join" which is not at all complicated to make.
Let's see if I can recall it from memory...
Join(a,b) Func local c ""->c While dim(a)>0 c&b&a[1]->c right(a,dim(a)-1)->a EndWhile Return c EndFunc
Actually, I don't think that's the method I used before, but I can't imagine why. This one's probably faster.
|