Page 1 of 1

A way to set a position in a string

Posted: Mon Jul 20, 2009 9:37 pm
by albert_redditt
I'm working on a calculator for long strings and i have to add the strings backwards and then loop through and reverse the string into another string.

a reverse string function would be nice also.
and a qbasic like mid$(string,position) = character or string would be nice.

Re: A way to set a position in a string

Posted: Tue Jul 21, 2009 12:07 am
by Demivec
albert_redditt wrote:...and a qbasic like mid$(string,position) = character or string would be nice.
If only in need of replacing portions of a string and not increasing or decreasing the length of a string, then the advance function CopyMemoryString() can be used.

Thanks i guess??????

Posted: Tue Jul 21, 2009 4:40 am
by albert_redditt
I already got the mul procedure working

i just added the strings right to left and then reversed the string.

its not pretty code but on a 2GHz dual core it blazes.

I posted the mul procedure here on the boards somewhere.

its two topics above the tailbite forum.

Re: Thanks i guess??????

Posted: Tue Jul 21, 2009 9:43 am
by Michael Vogel
albert_redditt wrote:I already got the mul procedure working

i just added the strings right to left and then reversed the string.

its not pretty code but on a 2GHz dual core it blazes.

I posted the mul procedure here on the boards somewhere.

its two topics above the tailbite forum.
Nice start :!:
You may want to have a look at a thread called "Huge #'s" where some people also tried to write fast routines which handle huge numbers...

Michael