Skip to content

Conversation

@yecril71pl
Copy link
Contributor

@yecril71pl yecril71pl commented Oct 30, 2021

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

  • Overview and Install
  • Learning PowerShell
    • PowerShell 101
    • Deep dives
    • Sample scripts
    • Remoting
  • Release notes (What's New)
  • Windows PowerShell
    • WMF, ISE, release notes, etc.
  • DSC articles
  • Community resources
  • Gallery articles
  • Scripting and development
    • Language Spec
    • Legacy SDK

Cmdlet reference & about_ topics

  • Preview content
  • Version 7.1 content
  • Version 7.0 content
  • Version 5.1 content

PR Checklist

  • I have read the contributors guide and followed the style and process guidelines
  • PR has a meaningful title
  • PR is targeted at the staging branch
  • All relevant versions updated
  • Includes content related to issues and PRs - see Closing issues using keywords.
  • This PR is ready to merge and is not Work in Progress
    • If the PR is work in progress, please add the prefix WIP: or [WIP] to the beginning of the
      title and remove the prefix when the PR is ready.

@opbld33
Copy link

opbld33 commented Oct 30, 2021

Docs Build status updates of commit b71e9b2:

✅ Validation status: passed

File Status Preview URL Details
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)

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:

Copy link
Collaborator

@sdwheeler sdwheeler left a 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

Comment on lines 348 to 351
# Hexadecimal
[Int] '0XF' -EQ 0XF -AND [Int] '#F' -EQ 0XF -AND [Int] '&HF' -EQ 0XF
# Binary
[Int] '0B1111' -EQ 0B1111
Copy link
Collaborator

@sdwheeler sdwheeler Nov 11, 2021

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

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@sdwheeler
Copy link
Collaborator

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.

@sdwheeler sdwheeler changed the title More cast examples, add results [WIP] Add more examples to about_Operators Nov 11, 2021
Also, remove spurious conversion examples and improve style as requested.
@opbld31
Copy link

opbld31 commented Nov 12, 2021

Docs Build status updates of commit 62df05c:

✅ Validation status: passed

File Status Preview URL Details
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)

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:

@opbld32
Copy link

opbld32 commented Nov 12, 2021

Docs Build status updates of commit 2a142a6:

✅ Validation status: passed

File Status Preview URL Details
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)

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:

Copy link
Collaborator

@sdwheeler sdwheeler left a 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.

@opbld31
Copy link

opbld31 commented Nov 15, 2021

Docs Build status updates of commit c811392:

✅ Validation status: passed

File Status Preview URL Details
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)

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:

@opbld32
Copy link

opbld32 commented Nov 15, 2021

Docs Build status updates of commit 7e1174e:

✅ Validation status: passed

File Status Preview URL Details
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)

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:

@opbld31
Copy link

opbld31 commented Nov 15, 2021

Docs Build status updates of commit 5ac9c20:

✅ Validation status: passed

File Status Preview URL Details
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)
reference/7.2/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.2)

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:

@opbld31
Copy link

opbld31 commented Nov 15, 2021

Docs Build status updates of commit 958a739:

✅ Validation status: passed

File Status Preview URL Details
reference/7.0/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7)
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)
reference/7.2/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.2)

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:

@opbld30
Copy link

opbld30 commented Nov 15, 2021

Docs Build status updates of commit 11e857c:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-5.1)
reference/7.0/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7)
reference/7.1/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.1)
reference/7.2/Microsoft.PowerShell.Core/About/about_Operators.md ✅Succeeded View (powershell-7.2)

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:

@yecril71pl yecril71pl changed the title [WIP] Add more examples to about_Operators Add more examples to about_Operators Nov 15, 2021
@yecril71pl yecril71pl requested a review from sdwheeler November 16, 2021 10:14
@sdwheeler sdwheeler merged commit f789b5a into MicrosoftDocs:staging Nov 16, 2021
@yecril71pl yecril71pl deleted the patch-2 branch November 16, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants