您可以在PowerShell编号文字上使用的完整后缀列表是什么?
到目前为止,我发现:
╔════════╦═════════╦════════════════════════╗
║ Suffix ║ Example ║ Result ║
╠════════╬═════════╬════════════════════════╣
║ L ║ 1L ║ Type = Int64 ║
║ D ║ 1D ║ Type = Decimal ║
║ KB ║ 1KB ║ 1KB = 1024 ║
║ MB ║ 1MB ║ 1MB = 1048576 ║
║ GB ║ 1GB ║ 1GB = 1073741824 ║
║ TB ║ 1TB ║ 1TB = 1099511627776 ║
║ PB ║ 1PB ║ 1PB = 1125899906842624 ║
╚════════╩═════════╩════════════════════════╝
但我找不到列出所有这些内容的来源。
答案 0 :(得分:8)
根据完整集PowerShell Language Specification (V3)。
l
,kb
,mb
,gb
,tb
,和pb
。d
。据我所知(未发布规范更新)PowerShell V4不会添加任何其他后缀。
答案 1 :(得分:1)
y signed byte data type Added in PowerShell 6.2
uy unsigned byte data type Added in PowerShell 6.2
s short data type Added in PowerShell 6.2
us unsigned short data type Added in PowerShell 6.2
l long data type
u unsigned int or long data type Added in PowerShell 6.2
ul unsigned long data type Added in PowerShell 6.2
kb kilobyte multiplier
mb megabyte multiplier
gb gigabyte multiplier
tb terabyte multiplier
pb petabyte multiplier