Skip to content

Digit Separators #20589

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
JohnLBevan opened this issue Oct 27, 2023 · 2 comments
Closed

Digit Separators #20589

JohnLBevan opened this issue Oct 27, 2023 · 2 comments
Labels
Issue-Enhancement the issue is more of a feature request than a bug

Comments

@JohnLBevan
Copy link
Contributor

Summary of the new feature / enhancement

Similar to what we now have in C#, it would be great to introduce digit separators to PowerShell, so we can enter numbers in a more legible way; e.g.

$myVar = 1_000_000

Today we can get away with converting a string as below; but this then makes our code culture dependent.

$myVar = [int]'1,000,000'

This relates to #13590 in that both are to do with formatting numbers for legibility; only this request is for formatting the input/code, whilst #13590 is for formatting the output.

Proposed technical implementation details (optional)

No response

@JohnLBevan JohnLBevan added Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. labels Oct 27, 2023
@mklement0
Copy link
Contributor

I like the idea, but, unfortunately, it looks like this was previously decided against (in the context of introducing support for [bigint] and binary number literals):

@JohnLBevan
Copy link
Contributor Author

Ah, thanks for digging that out @mklement0 ; sorry I'd not spotted befor opening this request. Closing as previously answered.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Oct 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Issue-Enhancement the issue is more of a feature request than a bug
Projects
None yet
Development

No branches or pull requests

2 participants