From: Hal Fulton Date: 2006-08-19T07:27:21+09:00 Subject: Re: Bug in sprintf? Carlos wrote: > >> If _arg_ is a +String+, leading radix indicators (+0+, +0b+, and >> +0x+) are honored. > > [...] > >> so it's expected, documented, and consistent with c. > > > It is not expected, nor documented, because the documentation of sprintf > says: > d | Convert argument as a decimal number. > > ...which is very explicit in that the argument will be interpreted as a > decimal number, not octal. The string of characters is interpreted as a decimal number IF IT IS one. Since you started it with a zero, it's octal. Hal