mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-12 14:07:20 +02:00
Add datatype to param()
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($Text = "")
|
||||
if ($Text -eq "" ) { $Text = read-host "Enter the text to write" }
|
||||
param([string]$Text = "")
|
||||
|
||||
try {
|
||||
if ($Text -eq "" ) { $Text = read-host "Enter the text to write" }
|
||||
|
||||
[char[]]$TextArray = $Text
|
||||
foreach($Char in $TextArray) {
|
||||
write-output $Char
|
||||
|
Reference in New Issue
Block a user