?? vbs59.htm
字號(hào):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><TITLE>Array Function</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="Array"><META NAME="Description" CONTENT="Array Function"></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>Array Function</B></FONT>
</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2> <A HREF="vbstoc.htm">Language Reference</A> <BR>
<A HREF="vbs16.htm">Version 2</A> <P></FONT>
</TD></TR>
</TABLE>
<P>
<FONT SIZE=2>
<A HREF="vbs60.htm">See Also</A></FONT>
<HR noshade SIZE=1>
<H5>Description</H5>
<BLOCKQUOTE>
Returns a <B>Variant</B> containing an <A HREF="vbs0.htm#defArray"> array</A>.
</BLOCKQUOTE>
<H5>Syntax</H5>
<BLOCKQUOTE>
<b>Array(</b><i>arglist</i><b>)</b><P>
The required <I>arglist</I> argument is a comma-delimited list of values that are assigned to the elements of an array contained with the <B>Variant</B>. If no arguments are specified, an array of zero length is created.
</BLOCKQUOTE>
<H5>Remarks</H5>
<BLOCKQUOTE>
The notation used to refer to an element of an array consists of the variable name followed by parentheses containing an index number indicating the desired element. In the following example, the first statement creates a variable named A. The second statement assigns an array to variable A. The last statement assigns the value contained in the second array element to another variable.
<P>
<BLOCKQUOTE><PRE><FONT FACE="Courier New" SIZE=3>Dim A
A = <FONT color="#FF0000">Array(</FONT>10<FONT color="#FF0000">,</FONT>20<FONT color="#FF0000">,</FONT>20<FONT color="#FF0000">)</FONT>
B = A(2)
</FONT></PRE></BLOCKQUOTE>
<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>  A variable that is not declared as an array can still contain an array. Although a <B>Variant</B> variable containing an array is conceptually different from an array variable containing <B>Variant</B> elements, the array elements are accessed in the same way.</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>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -