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

📄 vbs593.htm

📁 VBScript 是一种脚本语言
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><TITLE>Randomize Statement</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="Random,Randomize statement,seed values,random numbers,numbers random,pseudorandom numbers,numbers pseudorandom,initializing random number sequences,random number sequences initializing,numbers,random number sequences"><META NAME="Description" CONTENT="Randomize Statement"></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>Randomize Statement</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> 

<FONT SIZE=2><p><A HREF="vbs594.htm">See Also</A></FONT>
<HR noshade SIZE=1>

<H5>Description</H5>
<BLOCKQUOTE>Initializes the random-number generator.</BLOCKQUOTE>

<H5>Syntax</H5>
<BLOCKQUOTE><b>Randomize</b> [<i>number</i>]<P>
The <i>number</i> argument can be any valid <A HREF="vbs0.htm#defNumericExpression">numeric expression</A>.</BLOCKQUOTE>

<H5>Remarks</H5>
<BLOCKQUOTE><b>Randomize</b> uses <i>number</i> to initialize the <b>Rnd</b> function's random-number generator, giving it a new <A HREF="vbs0.htm#defSeed">seed</A> value. If you omit <i>number, </i>the value returned by the system timer is used as the new seed value.<P>
If <b>Randomize</b> is not used, the <b>Rnd</b> function (with no arguments) uses the same number as a seed the first time it is called, and thereafter uses the last generated number as a seed value.

<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=87%><TR><TD COLSPAN=2 VALIGN=BOTTOM><HR noshade size=1></TD></TR><TR><TD VALIGN=TOP><FONT SIZE=2><b>Note</b>&nbsp;&nbsp;To repeat sequences of random numbers, call <b>Rnd</b> with a negative argument immediately before using <b>Randomize</b> with a numeric argument. Using <b>Randomize</b> with the same value for <i>number</i> does not repeat the previous sequence.</FONT></TD></TR><TR><TD COLSPAN=2 VALIGN=TOP><HR noshade size=1></TD></TR></TABLE></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 + -