PowerShell中数字后缀的完整列表是什么?

PowerShell中数字后缀的完整列表是什么?,powershell,number-literal,Powershell,Number Literal,您可以在PowerShell数字文字上使用的后缀的完整列表是什么? 到目前为止,我发现: ╔════════╦═════════╦════════════════════════╗ ║ Suffix ║ Example ║ Result ║ ╠════════╬═════════╬════════════════════════╣ ║ L ║ 1L ║ Type = Int64 ║ ║ D ║ 1D ║

您可以在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 ║
╚════════╩═════════╩════════════════════════╝
但是我找不到一个能列出所有这些的资料来源。

根据这是一套完整的资料

  • §2.3.5.1.1整数文字包括:
    l
    kb
    mb
    gb
    tb
    pb
  • §2.3.5.1.2实文字添加
    d
据我所知(尚未发布规范更新),PowerShell V4没有添加任何其他后缀。

这些后缀是


“你有没有试过看这个?应该都看了。@Richard awesome,不知什么原因没能找到。”。从规范来看,似乎没有其他后缀。你想做个回答让我接受吗?或者我自己来回答。@AndreyShchekin现在我不那么着急了。。。还请注意,实数上的
l
使其成为十进制(如
d
)而不是长的。漂亮的ASCII艺术表格!(+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