Re: [fpc-pascal] Value:x:y syntax

2021-02-10 Thread Ralf Quint via fpc-pascal

On 2/9/2021 7:26 AM, Luis Henrique via fpc-pascal wrote:



I guess one can call it optional formatting specifiers.  See documentation: 
https://www.freepascal.org/docs-html/rtl/system/str.html

I think I was lazy and didn't look in the right place, thanks Michael and 
Christo.


This is standard Pascal real number formatting since at least the mid 
'70s...


Ralf



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Value:x:y syntax

2021-02-09 Thread Luis Henrique via fpc-pascal
09.02.2021, 09:15, "Christo Crause" :
> On Tue, Feb 9, 2021 at 2:11 PM Luis Henrique via fpc-pascal 
>  wrote:
>> At 
>> https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html I 
>> saw the syntax "value: x: y".
>>> str(value:6:3, valuestr);
>> What is the name of this and where is it documented?
>> I did tests and saw that Y determines the width of the precision part, but I 
>> can't see any effect of X.
>
> I guess one can call it optional formatting specifiers.  See documentation: 
> https://www.freepascal.org/docs-html/rtl/system/str.html

I think I was lazy and didn't look in the right place, thanks Michael and 
Christo.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Value:x:y syntax

2021-02-09 Thread Christo Crause via fpc-pascal
On Tue, Feb 9, 2021 at 2:11 PM Luis Henrique via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:

> At
> https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html
> I saw the syntax "value: x: y".
> > str(value:6:3, valuestr);
> What is the name of this and where is it documented?
> I did tests and saw that Y determines the width of the precision part, but
> I can't see any effect of X.
>

I guess one can call it optional formatting specifiers.  See documentation:
https://www.freepascal.org/docs-html/rtl/system/str.html
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Value:x:y syntax

2021-02-09 Thread Michael Van Canneyt via fpc-pascal



On Tue, 9 Feb 2021, Luis Henrique via fpc-pascal wrote:


At https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html I saw the 
syntax "value: x: y".

str(value:6:3, valuestr);

What is the name of this and where is it documented?


It is documented in the official documentation:

https://www.freepascal.org/docs-html/current/rtl/system/str.html

The write procedure also supports these formatting options, they are also
documented:

https://www.freepascal.org/docs-html/current/rtl/system/write.html


Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Value:x:y syntax

2021-02-09 Thread Luis Henrique via fpc-pascal
At https://lists.freepascal.org/pipermail/fpc-devel/2021-February/043569.html I 
saw the syntax "value: x: y".
> str(value:6:3, valuestr);
What is the name of this and where is it documented?
I did tests and saw that Y determines the width of the precision part, but I 
can't see any effect of X.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal