?? vbs127.htm
字號:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>
<HEAD><TITLE>Int, Fix Functions</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="PRODUCT" CONTENT="Visual Basic Scripting Edition">
<META NAME="TECHNOLOGY" CONTENT="SCRIPTING">
<META NAME="CATEGORY" CONTENT="Language Reference">
<META NAME="Keywords" CONTENT="Fix function,Int function,math functions,converting numbers,truncating numbers,integers returning,integers"><META NAME="Description" CONTENT="Int, Fix Functions"></HEAD>
<BODY BGCOLOR=FFFFFF LINK=#0033CC>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR VALIGN=TOP><TD WIDTH=360>
<FONT SIZE=1 COLOR=#660033>Microsoft® Visual Basic® Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>Int, Fix Functions</B></FONT>
</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2> <A HREF="vbstoc.htm">Language Reference</A> <BR>
<A HREF="vbs16.htm">Version 1</A> <P></FONT>
</TD></TR>
</TABLE>
<FONT SIZE=2><P>
<A HREF="vbs128.htm">See Also</A></FONT>
<hr noshade size=1>
<H5>Description</H5>
<BLOCKQUOTE>Returns the integer portion of a number.</BLOCKQUOTE>
<H5>Syntax</H5>
<BLOCKQUOTE><b>Int(</b><i>number</i><b>)<P>
Fix(</b><i>number</i><b>)</b><P>
The <i>number</i> argument can be any valid
<A HREF="vbs0.htm#defNumericExpression">numeric expression</A>. If <i>number</i> contains
<A HREF="vbs0.htm#defNull"><B>Null</B></A>, <b>Null</b> is returned.</BLOCKQUOTE>
<H5>Remarks</H5>
<BLOCKQUOTE>Both <b>Int</b> and <b>Fix</b> remove the fractional part of <i>number</i> and return the resulting integer value.<P>
The difference between <b>Int</b> and <b>Fix</b> is that if <i>number</i> is negative, <b>Int</b> returns the first negative integer less than or equal to <i>number,</i> whereas <b>Fix</b> returns the first negative integer greater than or equal to <i>number.</i> For example, <b>Int</b> converts -8.4 to -9, and <b>Fix</b> converts -8.4 to -8.<P>
<b>Fix(</b><i>number</i><b>)</b> is equivalent to:
<BLOCKQUOTE>
<PRE><FONT FACE="Courier New" SIZE=3>Sgn(<i>number</i>) * <FONT COLOR="#FF0000">Int(</FONT>Abs(<i>number</i>)Int<FONT COLOR="#FF0000">)</FONT>
</FONT></PRE></BLOCKQUOTE>
</BLOCKQUOTE>
<hr noshade size=1>
<p align=center><em><a href="../../common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
</FONT></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -