That would be correct, you can ditch the alltrim.
>That works well. thanks Mark
>I don't think you need the alltrim, the @T does that
>
>This is still 4 lines of code (Store decimals, set decimals, then reset decimals) when it can be done in 1, but I do like the idea!
>
>Cheers
>Will
>
>>This works better. Run this code in a test PRG.
>>lnMask = 99999999
>>FOR lnI = 1 to LEN(TRANSFORM(lnMask))
>> SET Decimals TO lnI - 1
>> ? RIGHT(ALLTRIM(TRANSFORM(lnMask/INT(10**(lnI-1)), '@T')), 8)
>>ENDFOR
>>RETURN
Mark McCasland
Midlothian, TX USA