Skip to content

Lexical analysis: Floating point literal leading zero example #140065

@jhgarrison

Description

@jhgarrison

Documentation

2.6.2. Floating-point literals

Unlike in integer literals, leading zeros are allowed in the numeric parts. For example, 077.010 is legal, and denotes the same number as 77.10.

The leading zero on the fractional part is significant and is not ignored. Probably should read

Unlike in integer literals, leading zeros are allowed in the integer part. For example, 077.010 is legal, and denotes the same number as 77.01.

... but I'll leave that up to someone else.

Linked PRs

Metadata

Metadata

Labels

docsDocumentation in the Doc dir

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions