[DUG] Need help in format function
Colin Johnsun
colin.adug at gmail.com
Thu Mar 4 10:34:59 NZDT 2010
I don't remember reading in the original post that Vikas needed the function
in a multi-threaded app?
In fact, the original FloatToStrF that Vikas used in his original post is
the non-threaded version, so I think it is reasonable to assume that he was
using it in a single threaded fashion. But thanks for pointing out how
useless *Format ( Const Formatting : string; Const Data : array of const)
: string; *is for multi-threaded situations.
Regards,
Colin
On 4 March 2010 08:07, Cameron Hart <Cameron.Hart at flowsoftware.co.nz> wrote:
> And completely useless when it comes to multiple threads...
>
> Atleast use the thread safe version
>
> function Format ( Const Formatting : string; Const Data : array of
> const; FormatSettings : TFormatSettings ) : string;
>
>
>
> Cameron Hart | Development Manager | Flow Software Limited
> P: +64 9 476 3579 | M: +64 21 222 3569 | E:
> cameron.hart at flowsoftware.co.nz
> PO Box 305-237, Triton Plaza, Auckland 0757, New Zealand |
> www.flowsoftware.co.nz
>
> This message is intended for the addressee named above. It may contain
> privileged or confidential information. If you are not the intended
> recipient of this message you must not use, copy, distribute or disclose
> it to anyone.
>
> Please consider the environment before printing this email
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
> On Behalf Of Colin Johnsun
> Sent: Thursday, 4 March 2010 9:44 a.m.
> To: NZ Borland Developers Group - Delphi List
> Subject: Re: [DUG] Need help in format function
>
> Hey Phil :)
>
> You beat me too it!
>
> It's clean, readable and concise.
> Plus there's no mucking around with strings!!
>
> +1 from me :)
>
> cheers, Colin
>
> On Thursday, March 4, 2010, Phil Scadden <p.scadden at gns.cri.nz> wrote:
> > I think it easier to do format( '%.2f', [trunc(value*100)/100]);
> >
> >
> > Notice: This email and any attachments are confidential. If received
> in error please destroy and immediately notify us. Do not copy or
> disclose the contents.
> >
> > _______________________________________________
> > NZ Borland Developers Group - Delphi mailing list
> > Post: delphi at delphi.org.nz
> > Admin: http://delphi.org.nz/mailman/listinfo/delphi
> > Unsubscribe: send an email to delphi-request at delphi.org.nz with
> Subject: unsubscribe
> >
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100304/2cd0ee98/attachment-0001.html
More information about the Delphi
mailing list