Re: [eclipse-users] sprintf?

From: Joachim Schimpf (Independent Contractor) <jschimpf_at_...5...>
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 : Mon Jul 09 2018 - 02:05:29 CEST