POV-Ray : Newsgroups : povray.off-topic : All your radix are belong to us! : Re: All your radix are belong to us! Server Time
29 Jul 2024 22:25:03 EDT (-0400)
  Re: All your radix are belong to us!  
From: Darren New
Date: 2 Aug 2011 14:20:24
Message: <4e383fe8$1@news.povray.org>
On 8/2/2011 11:03, Warp wrote:
>      std::cout<<  boost::format("writing %1%, x=%2% : %3%-th try")
>                   % "toto" % 40.23 % 50;
>
>    (OTOH I'm guessing this is less efficient than the direct approach.)

I'm guessing boost::format has to return something that overloads % in the 
same way that cout overloads <<. I'm not sure from your example whether it 
supports the flexible formatting stuff either, which was more my point in 
the example.

>> printf("Here are " MySpecialIntFmt " integers", i);
>
>    Which is inconvenient if you need to use some format specifiers (such
> as printing at least 5 digits, with leading zeros).

Yeah. I never needed to, but I suppose you could use just "i" instead of 
"%i". In any case, it's clearly not flexible enough to handle things the way 
you'd like.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.