[fpc-pascal] Format specifier in FPC?

Michael Van Canneyt michael at freepascal.org
Wed Jun 27 09:02:31 CEST 2018



On Wed, 27 Jun 2018, Darius Blaszyk wrote:

> Hi,
>
> I have the following format specifier in C : %+.05f. What would be the FPC
> equivalent?
>
> A float is printed like this: -0.70711
>
> The specified '+' will explicitly print out the sign for the float
> independent if it is a positive or negative.

It should be %.5f in FPC.
But the + cannot be mimicked. FPC does not have this option.

Michael.



More information about the fpc-pascal mailing list