-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #10906 - Document range limits #10907
Fixes #10906 - Document range limits #10907
Conversation
Learn Build status updates of commit 5262c6d: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
enumeration for your start and end values. | ||
evaluate to an integer or a character. The endpoints of the range must be | ||
convertible to signed 32-bit integers (`[int32]`). Larger values cause an | ||
error. Also, if the range is captured in an array, the count of resulting is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turnaround, but the word "numbers" is presumably missing after "count of resulting", and "the" is missing before "maximum size".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh!
evaluate to an integer or a character. The endpoints of the range must be | ||
convertible to signed 32-bit integers (`[int32]`). Larger values cause an | ||
error. Also, if the range is captured in an array, the count of resulting is | ||
limited to maximum size of an array in .NET, which is `[int]::MaxValue - 56`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention that this limit only applies to PowerShell (Core) / .NET (Core). In Windows PowerShell / .NET Framework, it is 256MB - 8
(268435448
): E.g., (1..268435448).Count
works (if you have the patience), whereas (1..268435449).Count
fails.
PR Summary
Document range limits
..
): make it clear that integer endpoints refers to[int32]
, specifically #10906PR Checklist