asp-classic – ASP/VBScript – Int()vs CInt()

前端之家收集整理的这篇文章主要介绍了asp-classic – ASP/VBScript – Int()vs CInt()前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Int()和CInt()之间的ASP / VBScript有什么区别?

解决方法

> Int()

The Int function returns the integer part of a specified number.

> CInt()

The CInt function converts an expression to type Integer.

最好的答案是MSDN

CInt differs from the Fix and Int functions,which truncate,rather than round,the fractional part of a number. When the fractional part is exactly 0.5,the CInt function always rounds it to the nearest even number. For example,0.5 rounds to 0,and 1.5 rounds to 2.

原文链接:https://www.f2er.com/aspnet/252953.html

猜你在找的asp.Net相关文章