- 强类型用法
[code][string] $a=\"安全开发生命周期\"write-output($a)[string] $b=\"机械工业出版社\"write-output($b)[double] $c=58.50write-output($c)[string] $d=\"342.63\"+\"(克)\"write-output($d)[string] $e=\"342.63\"+\"(克)\"write-output($e)
[code]//byte无符号,赋值负数编译无法通过[byte] $a=-1write-output($a)//给int赋值string类型,编译无法通过[int] $b=\"字符串\"write-output($b)//给int赋值double,只保留整数部分[int] $c=3.15write-output($c)
[code]//数组用法[string]$student=\"name:jack\",\"hight:180cm\",\"age:21\",\"major:cs\",\"school:MIT\",\"graduation time:2020-06-01\"write-output($student)