home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,406 of 10,840   
   J French to Paul   
   Re: Using variables to reference Array e   
   12 Apr 05 05:24:11   
   
   From: erewhon@nowhere.uk   
      
   On Mon, 11 Apr 2005 23:28:36 +1000, "Paul"  wrote:   
      
   >Please help,  I am working on an Active-x project involving Arrays with up   
   >to   
   >20 elements populated in a class module.  In order to keep programming and   
   >debugging simple, Instead of refering to each element with numbers, would it   
   >be correct to refer to each element with constants as per the example shown   
   >bellow.   
   >   
   >Option Explicit   
   >Dim AddrArray(1 To 20, 1 To 3)   
   >Dim Address As clsMyClass   
   >Dim MyStr As String   
   >Dim intX As Integer   
   >Const First = 1   
   >Const Last = 2   
   >Const Phone = 3   
      
   It makes life easier when you have to open up the code a year later   
      
   You might be interested in going one step further and using an Enum   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca