Poll on improved format strings.
janderson
askme at me.com
Tue Mar 6 22:42:13 PST 2007
renoX wrote:
> Hello,
>
>
> So my idea would be to have embedded expression like this "... %08d{var1+var2} ..."
In any case I like the idea of having these string in-beded in the text.
I've had to write run-time versions of this many times for localization
and for designers. In these cases (and I assume most games work this
way) there is a separation between design and code, so this would
simplify the process. With this format you could just make all the
variables visible to the write statement (ie player1, player2, enermy1
ect...).
Of course in the cases I've dealt with, the designer/localizer should
use the default string conversion for the given variable. Possibly even
rounding of floats should be specifiable outside and optionally changed
inside.
-Joel
More information about the Digitalmars-d
mailing list