9.0
144
Description
Dimension var array(s) using the dims to establish the minimum and maximum index value for each dimension. If
the dim
s are omitted then a scalar (single value) variable is defined. A dynamic array is declared using ( ) without
any dim
s. It must be ReDimensioned before it can be used.
See Also: Begin Dialog, Dialog, Option Base, Private, Public, ReDim, Static, WithEvents.
Example
Sub DoIt(Size)
Dim C0,C1(),C2(2,3)
ReDim C1(Size) ' dynamic array
C0 = 1
C1(0) = 2
C2(0,0) = 3
Debug
.Print C0;C1(0);C2(0,0) ' 1 2 3
End
Sub
C:\ABCTemp\vbs\Sub_Definition.htm
Sub
Main
DoIt 1
End Sub
Dir$ Function
Syntax
Dir[$]([Pattern$][, AttribMask])
Group
File
Description
Scan a directory for the first file matching Pattern$.
Parameter Description
Pattern$ This string value is the path and name of the file search pattern. If this is omitted
then continue scanning with the previous pattern. Each macro has its own
independent search. A path relative to the current directory can be used.
AttribMask This numeric value controls which files are found. A file with an attribute that
matches will be found.
See Also: GetAttr( ).
Example
Sub Main
F$ = Dir$("*.*")
While
F$ <> ""
Debug
.Print F$
F$ = Dir$()
Wend
End
Sub










