Modulus operator expanded to Foreach-Object

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
CermakPOI
Posts: 41
Last visit: Wed Jan 31, 2024 2:57 am

Modulus operator expanded to Foreach-Object

Post by CermakPOI »

Product, version and build: PowerShell Studio 2016 5.2.128
(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: 64
Operating system: Win 10
32 or 64 bit OS: 64
PowerShell Version: 5.1.14393.206

I have "Alias Tab Expansion" enabled and would like to keep it enabled.

The Modulus % operator is sometimes (after an unspecific number of saves)
if (($NumProfileConnection) % 2 -eq 0) { $NetSuffix = 2 } else { $NetSuffix = 1 }
expanded to
if (($NumProfileConnection) Foreach-Object 2 -eq 0) { $NetSuffix = 2 } else { $NetSuffix = 1 }
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Modulus operator expanded to Foreach-Object

Post by davidc »

Thank you for reporting this issue. It will be resolved in the next service release.
David
SAPIEN Technologies, Inc.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: Modulus operator expanded to Foreach-Object

Post by DevinL »

Hey CermakPOI,

I'd just like to let you know we've since released the latest version with the fix for this bug and if you have any further issues to please feel free to post again.
DevinL
SAPIEN Technologies, Inc.
This topic is 7 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.