Thanks everyone. Makes sense now.
>Hi Randy,
>
>No bug here. STR(n) returns not "0" but "_________0" (nine spaces + 0) and PADL(STR(n),2,"0") takes 2 left charactes from it.
? PADL(ALLT(STR(n)),2,"0")
>* or
>? PADL(TRANS(n),2,"0")
should return result you wanted.
>
>>We are using VFP7 SP1.
>>Here's what we are seeing...
>>
>>
>>?PADL("0",2,"0")
>>
>>Returns "00"
>>
>>
>>n=0
>>?STR(n)
>>
>>Returns "0"
>>
>>
>>n = 0
>>?PADL(STR(n),2,"0")
>>
>>Returns ""
>>Should this not return "00"?