| Sign In/My Account | View Cart |
| Article: |
VB.NET Data Types | |
| Subject: | Completing my question | |
| Date: | 2001-08-01 08:21:08 | |
| From: | dannyo152 | |
|
[I apologize: I keep hitting the tab key in order to indent my comments.]
|
||
Showing messages 1 through 2 of 2.
In your example of:
Dim N As Long ' N is declared outside the block
' and has procedure scope.
For I = 1 To 10
N = N + Incr(I)
Next
W = Base ^ N ' N is visible outside the block but I is not.
demonstrating scope, since "option explicit" is the default, wouldn't the variable I have necessarily been declared prior to its use, and thus, have scope outside of the loop?
Is the following:
for (dim I as Integer = 1 ) to 10
allowed?
Thank you and my apoligies for the clumsiness of my posting techniques.
Dan