-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add more examples to about_Operators #8280
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
Conversation
|
Docs Build status updates of commit b71e9b2: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
sdwheeler
left a comment
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.
See my comments below and the comments in #8281
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md
Outdated
Show resolved
Hide resolved
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md
Outdated
Show resolved
Hide resolved
| # Hexadecimal | ||
| [Int] '0XF' -EQ 0XF -AND [Int] '#F' -EQ 0XF -AND [Int] '&HF' -EQ 0XF | ||
| # Binary | ||
| [Int] '0B1111' -EQ 0B1111 |
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.
Hex and binary numbers are covered, in detail, in about_Numeric_Literals. And use lower case letters for the radix.
0xFF3C
0b1101011
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.
Observe that #F is not a numeric literal but [INT] '#F' is valid.
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.
Yes, but this documentation is not about all the different ways the type-casting can convert values. This is about the existence of the [type] cast operator. These more explicit examples belong elsewhere.
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 gave these specific examples as a hint that conversions are weird (sometimes) and the coder should be prepared to handle unexpected results. I have removed the examples at your request.
|
Thanks for the submission. Also, see my comments in #8282. Also, when submitting changes to a file, the changes need to be made to all versions of the file. You have submitted two PRs for the same file (about_Operators). Please combine the changes in one PR. If you want to wait for feedback before copying the changes to the other versions, mark the PR as a Work-in-Progress [WIP] as described in the PR template. After the feedback you can make the necessary changes to all version and update the PR. |
Also, remove spurious conversion examples and improve style as requested.
|
Docs Build status updates of commit 62df05c: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
|
Docs Build status updates of commit 2a142a6: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
sdwheeler
left a comment
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.
This change looks good. Please copy the changes to the other versions.
|
Docs Build status updates of commit c811392: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
Port from 7.1
|
Docs Build status updates of commit 7e1174e: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
|
Docs Build status updates of commit 5ac9c20: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
Backport from 7.1
|
Docs Build status updates of commit 958a739: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
Backport from 7.1
|
Docs Build status updates of commit 11e857c: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
PR Summary
I find it frustrating to see a cast and having to evaluate its value, so I decided to provide explicit results.
Also, fun with hexadecimal strings (℅ BaseNumberConverter).
PR Context
Select the area of the Table of Contents containing the documents being changed.
Conceptual content
Cmdlet reference & about_ topics
PR Checklist
WIP:or[WIP]to the beginning of thetitle and remove the prefix when the PR is ready.