?? vbs604.htm
字號:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD>
<TITLE>While...Wend 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="Wend,While statement,loops,program control,control structures,conditional execution,execution conditional,repeating instructions,instructions repeating,execution,instructions"><META NAME="Description" CONTENT="While...Wend 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® Visual Basic® Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>While...Wend Statement</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="vbs605.htm">See Also</A></FONT>
<HR noshade SIZE=1>
<H5>Description</H5>
<BLOCKQUOTE>Executes a series of statements as long as a given condition is <b>True</b>.</BLOCKQUOTE>
<H5>Syntax</H5>
<BLOCKQUOTE><b>While</b> <i>condition</i><BR>
 [<i>statements</i>]<BR>
<b>Wend</b><P>
The <b>While...Wend</b> statement 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>condition</i></FONT></TD>
<TD><FONT SIZE=2><A HREF="vbs0.htm#defNumericExpression">Numeric</A> or <A HREF="vbs0.htm#defStringExpression">string expression</A> that evaluates to <b>True</b> or <b>False</b>. If <i>condition</i> is <A HREF="vbs0.htm#defNull"><B>Null</B></A>, <i>condition</i> is treated as <b>False</b>.</FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>statements</i></FONT></TD>
<TD><FONT SIZE=2>One or more statements executed while condition is <b>True</b>.</FONT></TD></TR></TABLE></BLOCKQUOTE>
<H5>Remarks</H5>
<BLOCKQUOTE>If <i>condition</i> is <b>True</b>, all statements in <i>statements</i> are executed until the <b>Wend</b> statement is encountered. Control then returns to the <b>While</b> statement and <i>condition</i> is again checked. If <i>condition</i> is still <b>True</b>, the process is repeated. If it is not <b>True</b>, execution resumes with the statement following the <b>Wend</b> statement. <P>
<b>While...Wend</b> loops can be nested to any level. Each <b>Wend</b> matches the most recent <b>While</b>.
<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>Tip</b> The <b>Do...Loop</b> statement provides a more structured and flexible way to perform looping.</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">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
</FONT></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -