[fpc-pascal] Format specifier in FPC?

Darius Blaszyk dhkblaszyk at gmail.com
Wed Jun 27 16:00:50 CEST 2018


Thanks Michael! I made a custom function that adds the + in case of a
positive value.

Rgds ,Darius

On Wed, Jun 27, 2018 at 9:02 AM Michael Van Canneyt <michael at freepascal.org>
wrote:

>
>
> 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.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180627/636c2bdf/attachment.html>


More information about the fpc-pascal mailing list