|
|
|
At times you may need to execute the same block of statements for different values of a variable, but you can't use a straight For Next loop because the sequence of values is not regular. For example, you may need to repeatedly call a given procedure passing the first ten prime numbers as arguments: |
Here is a better approach, based on the Array() function that builds a Variant array on the fly, and a For Next loop that iterates on it: |
You can exploit this trick to build loops that aren't even based on numeric control variables: |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|