Microsoft® Visual Basic® Scripting Edition Dim Statement |
| Language Reference |
|
Declares variables and allocates storage space.
Dim varname[([subscripts])][, varname[([subscripts])]] . . .
The Dim statement syntax has these parts:
Part Description varname Name of the variable; follows standard variable naming conventions. subscripts Dimensions of an array variable; up to 60 multiple dimensions may be declared. The subscripts argument uses the following syntax: upperbound [,upperbound] . . .
The lower bound of an array is always zero.
Variables declared with Dim at the script level are available to all procedures within the script. At the procedure level, variables are available only within the procedure.You can also use the Dim statement with empty parentheses to declare a dynamic array. After declaring a dynamic array, use the ReDim statement within a procedure to define the number of dimensions and elements in the array. If you try to redeclare a dimension for an array variable whose size was explicitly specified in a Dim statement, an error occurs.
When variables are initialized, a numeric variable is initialized to 0 and a string is initialized to a zero-length string ("").
Tip When you use the Dim statement in a procedure, it is a generally accepted programming practice to put the Dim statement at the beginning of the procedure.
file: /Techref/language/asp/vbs/vbscript/365.htm, 3KB, , updated: 1996/11/22 11:12, local time: 2024/10/13 19:56,
44.192.95.161:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://piclist.com/techref/language/asp/vbs/vbscript/365.htm"> Microsoft® Visual Basic® Scripting Edition </A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to piclist.com! |
.