Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Avoid strange women and temporary variables.


devel / comp.lang.fortran / Re: Number Literal Syntax

SubjectAuthor
* Number Literal SyntaxLawrence D'Oliveiro
+* Re: Number Literal Syntaxm_b_metcalf
|`- Re: Number Literal SyntaxLawrence D'Oliveiro
+- Re: Number Literal SyntaxGary Scott
`* Re: Number Literal SyntaxThomas Koenig
 `- Re: Number Literal SyntaxLawrence D'Oliveiro

1
Number Literal Syntax

<urc061$11rr9$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3878&group=comp.lang.fortran#3878

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.fortran
Subject: Number Literal Syntax
Date: Sat, 24 Feb 2024 05:52:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <urc061$11rr9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 05:52:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90cd705a0b104282cd54d6df08a2cdc8";
logging-data="1109865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3C+lRvc0c4i4HHPkKr6sX"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:Npgu/qOh9zlR50I3BoYtt3VGhRM=
 by: Lawrence D'Oliv - Sat, 24 Feb 2024 05:52 UTC

I see that Fortran uses the underscore in integer and real literals as a
special suffix delimiter, followed by a code number or name to indicate
the type of the literal. Pity they didn’t follow the convention in some
other languages, where this is ignored so it can be used as a grouping
delimiter, just for readability, to avoid the “drowning in digits” effect.
E.g. in Python this is a valid integer literal

18_446_744_073_709_551_615

and this is a valid real literal:

3.141_592_653_589_793

Re: Number Literal Syntax

<B_JPSGbR8khBT1tuMLxsxpf1tjU@jntp>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3879&group=comp.lang.fortran#3879

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!pasdenom.info!from-devjntp
Message-ID: <B_JPSGbR8khBT1tuMLxsxpf1tjU@jntp>
JNTP-Route: news2.nemoweb.net
JNTP-DataType: Article
Subject: Re: Number Literal Syntax
References: <urc061$11rr9$1@dont-email.me>
Newsgroups: comp.lang.fortran
JNTP-HashClient: C0Cylfp5YmqAKWXxCmLMVaUtoAM
JNTP-ThreadID: urc061$11rr9$1@dont-email.me
JNTP-Uri: http://news2.nemoweb.net/?DataID=B_JPSGbR8khBT1tuMLxsxpf1tjU@jntp
User-Agent: Nemo/0.999a
JNTP-OriginServer: news2.nemoweb.net
Date: Sat, 24 Feb 24 09:17:51 +0000
Organization: Nemoweb
JNTP-Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
Injection-Info: news2.nemoweb.net; posting-host="459827b78ecfbdc276e19a895244a06eedf2b521"; logging-data="2024-02-24T09:17:51Z/8740909"; posting-account="211@news2.nemoweb.net"; mail-complaints-to="newsmaster@news2.nemoweb.net"
JNTP-ProtocolVersion: 0.21.1
JNTP-Server: PhpNemoServer/0.94.5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-JNTP-JsonNewsGateway: 0.96
From: michaelmetcalf@compuserve.com (m_b_metcalf)
 by: m_b_metcalf - Sat, 24 Feb 2024 09:17 UTC

Le 24/02/2024 à 06:52, Lawrence D'Oliveiro a écrit :
> I see that Fortran uses the underscore in integer and real literals as a
> special suffix delimiter, followed by a code number or name to indicate
> the type of the literal. Pity they didn’t follow the convention in some
> other languages, where this is ignored so it can be used as a grouping
> delimiter, just for readability, to avoid the “drowning in digits” effect.
> E.g. in Python this is a valid integer literal
>
> 18_446_744_073_709_551_615
>
> and this is a valid real literal:
>
> 3.141_592_653_589_793

Well, whatever the merits of this may be, I don't believe that, back in
the mid-1980s when Fortran 90 was more-or-less defined, there was any
'convention' to follow. Python, for instance, was released only in 1991.

Regards,

Mike

Re: Number Literal Syntax

<urdd75$1b4np$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3880&group=comp.lang.fortran#3880

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: garylscott@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: Number Literal Syntax
Date: Sat, 24 Feb 2024 12:40:37 -0600
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <urdd75$1b4np$1@dont-email.me>
References: <urc061$11rr9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 18:40:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d7b80872363671bef2bc5ad87adca2ce";
logging-data="1413881"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FQx4HLXHBNezFmYV0BlmNDNs13mxtRSs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:BH29EBgRF+tZxMoALf+ryJdi1wo=
In-Reply-To: <urc061$11rr9$1@dont-email.me>
Content-Language: en-US
 by: Gary Scott - Sat, 24 Feb 2024 18:40 UTC

On 2/23/2024 11:52 PM, Lawrence D'Oliveiro wrote:
> I see that Fortran uses the underscore in integer and real literals as a
> special suffix delimiter, followed by a code number or name to indicate
> the type of the literal. Pity they didn’t follow the convention in some
> other languages, where this is ignored so it can be used as a grouping
> delimiter, just for readability, to avoid the “drowning in digits” effect.
> E.g. in Python this is a valid integer literal
>
> 18_446_744_073_709_551_615
>
> and this is a valid real literal:
>
> 3.141_592_653_589_793

In fixed form, probably 3.141 592 653 589 793

might have worked

I don't find this "drowning" problem to be a problem. In any case, the
common symbol for grouping numbers is the comma, although not typically
after the decimal point.

Sorry for the direct email sent to MM. Thunderbird changed the menu
such that the first option (reply (meaning reply to sender, not reply))
goes to email and the second option "followup" goes to group. I think
that's dumb, but you'd think I could remember it from one post to the
next :(

Re: Number Literal Syntax

<urdm6h$1d2g9$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3881&group=comp.lang.fortran#3881

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.fortran
Subject: Re: Number Literal Syntax
Date: Sat, 24 Feb 2024 21:13:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <urdm6h$1d2g9$1@dont-email.me>
References: <urc061$11rr9$1@dont-email.me> <B_JPSGbR8khBT1tuMLxsxpf1tjU@jntp>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Feb 2024 21:13:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="90cd705a0b104282cd54d6df08a2cdc8";
logging-data="1477129"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185esMNrYDXhh5ylzw4a+8L"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:nNtQIVlLu9EMoV1n9AB/flMb/8g=
 by: Lawrence D'Oliv - Sat, 24 Feb 2024 21:13 UTC

On Sat, 24 Feb 24 09:17:51 +0000, m_b_metcalf wrote:

> Well, whatever the merits of this may be, I don't believe that, back in
> the mid-1980s when Fortran 90 was more-or-less defined, there was any
> 'convention' to follow.

Ada was probably the language that pioneered it.

Re: Number Literal Syntax

<urg2i9$o08p$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3884&group=comp.lang.fortran#3884

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-d00d-0-4d61-4b3d-f917-ba7e.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Number Literal Syntax
Date: Sun, 25 Feb 2024 18:57:13 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <urg2i9$o08p$1@newsreader4.netcologne.de>
References: <urc061$11rr9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 25 Feb 2024 18:57:13 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-d00d-0-4d61-4b3d-f917-ba7e.ipv6dyn.netcologne.de:2001:4dd7:d00d:0:4d61:4b3d:f917:ba7e";
logging-data="786713"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 25 Feb 2024 18:57 UTC

Lawrence D'Oliveiro <ldo@nz.invalid> schrieb:
> I see that Fortran uses the underscore in integer and real literals as a
> special suffix delimiter, followed by a code number or name to indicate
> the type of the literal. Pity they didn’t follow the convention in some
> other languages,

That would, I belive, have required a time machine. The other
languages could have followed Fortran: Fortran still has such a
method: Blanks are not significant in fixed form, so

a = 123.456 789

is perfectly legal. It would be possible to introduce that into free
form without too much hassle.

So, I think we should ask latecomers like Python to change.

Re: Number Literal Syntax

<urg7g7$21p1q$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3885&group=comp.lang.fortran#3885

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.fortran
Subject: Re: Number Literal Syntax
Date: Sun, 25 Feb 2024 20:21:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <urg7g7$21p1q$2@dont-email.me>
References: <urc061$11rr9$1@dont-email.me>
<urg2i9$o08p$1@newsreader4.netcologne.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 25 Feb 2024 20:21:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5d3a24d1dc8cf78704609d9d7dcc21b3";
logging-data="2155578"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180qC/GlnuFmDbYwTmYzQne"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:mJp06yaBmqCX8DbCQm9eeliVP7g=
 by: Lawrence D'Oliv - Sun, 25 Feb 2024 20:21 UTC

On Sun, 25 Feb 2024 18:57:13 -0000 (UTC), Thomas Koenig wrote:

> So, I think we should ask latecomers like Python to change.

Python could. It already has implicit concatenation of string literals; it
could do the same for numerics.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor