Microsoft® Visual Basic® Scripting Edition Private Statement |
| Language Reference |
|
Used at script level to declare private variables and allocate storage space.
Private varname[([subscripts])][, varname[([subscripts])]] . . .
The Private 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: upper [, upper] . . .
The lower bound of an array is always zero.
Private variables are available only to the script in which they are declared.A variable that refers to an object must be assigned an existing object using the Set statement before it can be used. Until it is assigned an object, the declared object variable has the special value Nothing.
You can also use the Private 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 Private, Public, or 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 Private statement in a procedure, it is a generally accepted programming practice to put the Private statement at the beginning of the procedure.
file: /Techref/language/asp/vbs/vbscript/383.htm, 3KB, , updated: 1996/11/22 10:12, local time: 2024/11/8 17:13,
18.225.57.228: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://massmind.org/techref/language/asp/vbs/vbscript/383.htm"> Microsoft® Visual Basic® Scripting Edition </A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.