Hiya everyone. ^.^
I created an advanced String to List/List to String routine I'm currently using in a couple of my programs and I want to add this to the current pages up at the moment linked near the bottom.
The purpose of this routine, for those who don't know, was mainly three things. One, to increase the possible number of strings from 10 to nearly infinite, since lists are infinite (up to the amount of memory you have :P). Two, to add the possibility of saving strings that don't rely on the system's premade strings. And three, to save space, although that last one's a bit questionable since I didn't test it. xD
The biggest flaw I saw with the routines that currently exist is that they don't take advantage of decimals in lists. You can have up to I believe 14 digits in a list element, but the routines only used 2. This routine takes advantage of that, increasing the possible stored string length from 999 to 6993. :P Although the routine SIZE is bigger, the possible number of character per list is far, far bigger than the extra space taken up by the program, as well as being nearly as fast as the original.
So, any optimizations ya guys can point out or tips with program flow or whatever, just post 'em here. Otherwise I'm gonna post this up and that'll be that.
Also, side note. I noticed this community was starting to die off, so perhaps ya guys want to make a contest or a competition to bring some life back, that'll be pretty cool. ^.^
Remember, this is assuming the characters we wanted saved is in Str1, and the list we want converted in L1.
String to List: (Vars used: A,B, Str0, Str1, L1)
" ABCDEFGHIJKLMNOPQRSTUVWXYZ->Str0 DelVar L1 int(length(Str1)/7->dim(L1 For(A,0,dim(L1 0 For(B,1,min(7,length(Str1)-7A Ans+.1^(2B)inString(Str0,sub(Str1,B+7A,1 End Ans->L1(A+1 End "
List to String: (Vars used: A, B, C, Str0, Str1, L1
" ABCDEFGHIJKLMNOPQRSTUVWXYZ->Str0 " ->Str1 For(A,1,dim(L1 L1(A->B For(C,1,7 Str3+sub(Str0,int(100B),1->Str1 fPart(100B->B If not(int(100Ans 8->C End End sub(Str1,2,length(Str1)-1->Str1 "