> Marco van de Voort wrote:
> >>> SysUtils.Format ('%.4D', Some_Int);
> >> Sounds like I found a case where 'C' is more intuitive than pascal ;-).
> >
> > With a C mindset, yes. There a leading 0 can have meaning. In Pascal an
> > extra leading zero never has meaning.
>
> It's a formatting string
Marco van de Voort wrote:
>>> SysUtils.Format ('%.4D', Some_Int);
>> Sounds like I found a case where 'C' is more intuitive than pascal ;-).
>
> With a C mindset, yes. There a leading 0 can have meaning. In Pascal an
> extra leading zero never has meaning.
It's a formatting string, not a number o
> >
> > SysUtils.Format ('%.4D', Some_Int);
>
> Sounds like I found a case where 'C' is more intuitive than pascal ;-).
With a C mindset, yes. There a leading 0 can have meaning. In Pascal an
extra leading zero never has meaning.
> Seriously, isn't "Format" an imitation of C's printf ? At leas
On Tuesday 20 June 2006 11:39, Micha Nelissen wrote:
> Vinzent Hoefler wrote:
> > On Tuesday 20 June 2006 10:44, Micha Nelissen wrote:
> >> How can I zero-pad using Format ?
> >
> > RTFM. :-)
> >
> > SysUtils.Format ('%.4D', Some_Int);
>
> Sounds like I found a case where 'C' is more intuitive than
I was compiling Lazarus with gtk2 (I have gtk2.8.17) in Linux and I got the
following errors when linking:
-===
/usr/lib/fpc/2.1.1/units/i386-linux/gtk2/gtk2.o: In function
`GTK2_GTK_TYPE_FILE_CHOOSER_DEFAULT$$LONGWORD':
gtk2.pas:(.text+0xb9b1): undefined reference to
`_gtk_file_chooser_default
Vinzent Hoefler wrote:
> On Tuesday 20 June 2006 10:44, Micha Nelissen wrote:
>
>> How can I zero-pad using Format ?
>
> RTFM. :-)
>
> SysUtils.Format ('%.4D', Some_Int);
Sounds like I found a case where 'C' is more intuitive than pascal ;-).
Seriously, isn't "Format" an imitation of C's print
Michael Van Canneyt wrote:
>
> in fpc it's a dot.
>
> Try
> %.4d
>
> This is in the docs:
> http://www.freepascal.org/docs-html/rtl/sysutils/format.html
Thanks, that works.
I did read that page, but only saw 'padded with spaces' and assumed
Precision was only applicable to floating point value
On Tuesday 20 June 2006 10:44, Micha Nelissen wrote:
> How can I zero-pad using Format ?
RTFM. :-)
SysUtils.Format ('%.4D', Some_Int);
Vinzent.
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fp
On Tue, 20 Jun 2006, Micha Nelissen wrote:
Hi,
How can I zero-pad using Format ? In C, using printf it's done using an
extra 0 digit in for the width: '%04d' with parameter 3 will print
'0003'. Wouldn't this be useful for FPC's Format as well, or is there
another way ?
in fpc it's a dot.
T
Hi,
How can I zero-pad using Format ? In C, using printf it's done using an
extra 0 digit in for the width: '%04d' with parameter 3 will print
'0003'. Wouldn't this be useful for FPC's Format as well, or is there
another way ?
Micha
___
fpc-devel mailli
Hello all,
The mailinglists are back on-line.
Daniël___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
11 matches
Mail list logo