need help
Hasan Aljudy
hasan.aljudy at gmail.com
Tue Apr 25 04:45:16 PDT 2006
Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jarrett Billingsley schrieb am 2006-04-25:
>
>>"Boris Wang" <nano.kago at hotmail.com> wrote in message
>>news:e2k46n$1dkm$1 at digitaldaemon.com...
>>
>>>The first printf can't display the information, and the second do.
>>
>>Uhh, yes it does. For me, anyway.
>>
>>But I think the real question here is - why are you using printf instead of
>>writef? ;)
>
>
> <snip>
>
>> for ( int i = 1; i < args.length; i++ )
>> {
>> writef( args[i], ' ' );
>> }
>
>
> That's usually not a good idea(unchecked format strings...), instead use:
>
> for ( int i = 1; i < args.length; i++ )
> {
> writef("%s ", args[i]);
> }
>
> Thomas
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFETcyD3w+/yD4P9tIRAoLlAJsHZWWhbEADKVfC3blCpG0cY9HStwCeNWZZ
> IL9fNNCb5TazTmklf8blE3c=
> =nRGq
> -----END PGP SIGNATURE-----
or
writef( arg ~ ' ' );
More information about the Digitalmars-d-learn
mailing list