PowerShell 是否具有 Infinity 值

编程入门 行业动态 更新时间:2024-10-28 18:29:02
本文介绍了PowerShell 是否具有 Infinity 值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

PowerShell 是否有无穷大的变量或值?

Does PowerShell have a variable or value for infinity?

也许类似于 $null 变量?

Perhaps similar to the $null variable?

我试过 $inifinity.我也试过 1/0 来生成值.

I have tried $inifinity. I have also tried 1/0 to generate the value.

推荐答案

有[double]::PositiveInfinity.我怀疑如果你使用 1.0/0.0 你会得到这个值.1/0 应该会产生错误,因为任何整数类型都没有无穷大值.

There is [double]::PositiveInfinity. I suspect if you used 1.0/0.0 you would get this value. 1/0 should produce an error, as there is no infinity value for any of the integral types.

更多推荐

PowerShell 是否具有 Infinity 值

本文发布于:2023-10-16 11:19:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497405.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:PowerShell   Infinity

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!