fMichaleczek / PowerShellLab

11 stars 0 forks source link

type handling error in PowershellLab demo #1

Open lc9er opened 4 years ago

lc9er commented 4 years ago

Stumbled across this on Twitter. In playing around with it, there's some incorrect behavior around types.

Example:

> $mynum = 5
> $mynum * 10
5
5
5
5
5
5
5
5
5
5

if a type is specified, it works as expected:

> [int]$mynum = 5
> $mynum * 10
50
fMichaleczek commented 4 years ago

@lc9er it's more a preview to show I'm working on it :) But very thank you for your interest.

Yes, at the moment, I need to make a PowerShell Host for XtermJS, under the hood, I make an Out-String so : $i = 5 is converted to $i = 5 | Out-String, it's why it's buggy.

$mynum = 5 ;""
$mynum * 10
lc9er commented 4 years ago

Ok. Understood! Thanks for your response. I’m looking forward to future development.

On Sat, Oct 17, 2020 at 12:51 PM Flavien notifications@github.com wrote:

@lc9er https://github.com/lc9er it's more a preview to show I'm working on it :) But very thank you for your interest.

Yes, at the moment, I need to make a PowerShell Host for XtermJS, under the hood, I make an Out-String so : $i = 5 is converted to $i = 5 | Out-String, it's why it's buggy.

$mynum = 5 ;"" $mynum * 10

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fMichaleczek/PowerShellLab/issues/1#issuecomment-711045024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2BFH5SDUISZPGAJTS6Q73SLHDSHANCNFSM4SUO2XWQ .