⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vbs436.htm

📁 VBScript 是一种脚本语言
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>
<HEAD><TITLE>Mod Operator</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="Mod operator,modulo,remainder,math operators,operators math,operator division,division remainder,arithmetic operators,operators arithmetic,operators,operator,division"><META NAME="Description" CONTENT="Mod Operator"></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&#174; Visual Basic&#174; Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>Mod Operator</B></FONT>

</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2>&nbsp;<A HREF="vbstoc.htm">Language&nbsp;Reference</A>&nbsp;<BR>
<A HREF="vbs16.htm">Version&nbsp;1</A>&nbsp;<P></FONT>
</TD></TR>
</TABLE><P>
<FONT SIZE=2>
<A HREF="vbs437.htm">See Also</A></FONT>
<HR NOSHADE SIZE=1>

<H5>Description</H5>
<BLOCKQUOTE>Used to divide two numbers and return only the remainder.</BLOCKQUOTE>

<H5>Syntax</H5>
<BLOCKQUOTE><i>result</i> <b>=</b> <i>number1</i> <b>Mod</b> <i>number2</i><P>
The <b>Mod</b> operator syntax has these parts:<P>

<TABLE WIDTH=87% BORDER=1 CELLPADDING=5 CELLSPACING=0>
<TR VALIGN=TOP BGCOLOR="#DDDDDD">
<TD><FONT SIZE=2><b>Part</b></FONT></TD>
<TD><FONT SIZE=2><b>Description</b></FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>result</i></FONT></TD>
<TD><FONT SIZE=2>Any numeric variable.</FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>number1</i></FONT></TD>
<TD><FONT SIZE=2>Any 
<A HREF="vbs0.htm#defNumericExpression">numeric expression</A>.</FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>number2</i></FONT></TD>
<TD><FONT SIZE=2>Any numeric expression.  </FONT></TD></TR></TABLE></BLOCKQUOTE>

<H5>Remarks</H5>
<BLOCKQUOTE>The modulus, or remainder, operator divides <i>number1</i> by <i>number2</i> (rounding floating-point numbers to integers) and returns only the remainder as <i>result</i>. For example, in the following expression, A (which is <i>result</i>) equals 5.<P>
<BLOCKQUOTE>
<PRE><FONT FACE="Courier New" SIZE=3>
A = 19 <FONT COLOR="#FF0000">Mod</FONT> 6.7
</FONT></PRE>
</BLOCKQUOTE>

If any expression is 
<A HREF="vbs0.htm#defNull"><B>Null</B></A>, <i>result</i> is also <b>Null</b>.  Any expression that is 
<A HREF="vbs0.htm#defEmpty"><B>Empty</B></A> is treated as 0.</BLOCKQUOTE>

<hr noshade size=1>
<p align=center><em><a href="../../common/colegal.htm">&copy; 1997 by Microsoft Corporation. All rights reserved.</a></em></p> 
</FONT></BODY></HTML>





















































































⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -