Two standard libraries?

Daniel Keep daniel.keep.lists at gmail.com
Tue Jul 31 20:16:06 PDT 2007



Chris Nicholson-Sauls wrote:
> renoX wrote:
> Here's an odd thought: "%{08x:X}"
> Wherein the {}'s mean, "this is looking at a variable outside", and the
> ':' means "everything after this point is the variable's name".
> 
> -- Chris Nicholson-Sauls

I actually played with something similar for a while, but eventually
discarded it.  The problem was that there are times when you don't care
to format some expression, you just want to output the thing.  I didn't
like that you'd have to carry around the leading ':' when you're not
using it.

OTOH, this is pretty similar to what Tango uses in its formatter.  IIRC,
it's something like {n:f} where ':f' is your optional format string and
'n' is the position of the thing you want to format.  Or it might be the
other way around; I dunno :P

	-- Daniel



More information about the Digitalmars-d mailing list