i use ltrim$(rtrim$(str$(number))) to get rid of the heading and ending space that str$ is returning, and i wonder if there is not a more efficient way to do this because it take a lot more time cause i'm calculate numbers larger than 10000 characters long and its taking eternity to calculate...
FOR r = nomchi TO 1 STEP -1
tempo = (suite(r) * expo) + reste
suitetotal(r) = VAL(RIGHT$(STR$(tempo), 1))
IF LEN(LTRIM$(RTRIM$(STR$(tempo)))) > 1 THEN
reste = VAL(LEFT$(LTRIM$(RTRIM$(STR$(tempo))), LEN(LTRIM$(RTRIM$(STR$(tempo))))-1))
ELSE
reste = 0
END IF
NEXT
miguel
migoul@hotmail.com
FOR r = nomchi TO 1 STEP -1
tempo = (suite(r) * expo) + reste
suitetotal(r) = VAL(RIGHT$(STR$(tempo), 1))
IF LEN(LTRIM$(RTRIM$(STR$(tempo)))) > 1 THEN
reste = VAL(LEFT$(LTRIM$(RTRIM$(STR$(tempo))), LEN(LTRIM$(RTRIM$(STR$(tempo))))-1))
ELSE
reste = 0
END IF
NEXT
miguel
migoul@hotmail.com