Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

Format routines

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro
to Andrew Johnson: Does anyone know how to write the extended Format Routines? I was trying to do the…

I thought it seemed like something was missing... lol

This is
from:http://216.239.51.100/search?q=cache:ZfaAK0EUMgQC:www.quickreferences.yucom.be/QRC/Delphi%2520Technical%2520Reference%2520Card%25207.20.pdf+format+delphi+float+string+%25f+%25m+%25n&hl=en&ie=UTF-8

But I included the text in case the link above wont work without my google cookie. The original PDF is gone but Google indexed the text:

format('%.3d', [<integer:4>]); '004'
format('%2.2d%2.2d%4d', [1,1,2000]); '01012000'
format('%.0n', [<real: 1234567>]); '1,234,567'
format('%.2n', [<real: 12345.675>]); '12,345.68'
format('%m', [<real: 12.34567>]); '$12.35'
format('%x', [<integer: 43>]); '2B'
format('%p', [<pointer>]); '8 chr adr'
format('%s' string.', ['some']); 'Some string.'
format('{%-4.3s} {%4.2s}', ['L123', 'R123']); '{L12 } { R1}' format('%2:s %1:s %0:s', ['1st', '2nd', 3rd']); '3rd 2nd 1st' format('{%*.*f}', [<len:9>, <dec:4>, 100*pi]); '{ 314.1593}'

Andrew Johnson wrote 21 lines
Does anyone know how to write the extended Format Routines? I was trying to do the following : FormatFloat('#,##0',[FPosition]) And realized that FormatFloat doesn't exist in FPC! I checked and none of these seem to be(FloatToCurrency et al) in SysUtils. This causes me some difficulty! ;-) Any ideas welcome. Andrew _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Thanks, Tony Maro Dir. System Services N&L Enterprises, LLC (256) 882-8827

Reply by email

Andrew Johnson

Does anyone know how to write the extended Format Routines?

I was trying to do the following :

FormatFloat('#,##0',[FPosition])

And realized that FormatFloat doesn't exist in FPC! I checked and none of these seem to be(FloatToCurrency et al) in SysUtils. This causes me some difficulty! ;-)

Any ideas welcome.

Andrew

_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply by email

Florian Klaempfl
to Andrew Johnson
you wrote 7 lines
Does anyone know how to write the extended Format Routines? I was trying to do the following : FormatFloat('#,##0',[FPosition]) And realized that FormatFloat doesn't exist in FPC!

Maybe somebody could contribute them :)

I checked and none of these seem to be(FloatToCurrency et al) in SysUtils. This causes me some difficulty! ;-)

Reply by email