Re: [eclipse-users] sprintf?

From: Joachim Schimpf (Independent Contractor) <jschimpf_at_cisco.com>
Date: Tue, 11 Sep 2007 10:37:17 +0100
Warwick Harvey wrote:
> ...
> Examples where I've used sprintf:
 > ...

We can add it for the next release.

By the way, there is a little known library lib(fromonto)
which implements (among others) the following shorthand:

?- printf("Result %.2f", [6.9]) onto_string S.
S = "Result 6.90"
Yes (0.00s cpu)

[However, it works by temporarily redirecting the 'output'
stream, so a proper sprintf is still the cleaner solution]


-- Joachim
Received on Tue Sep 11 2007 - 10:37:28 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET