|
From: Old Pedant on 28 May 2008 00:52 First of all, there's no reason you couldn't put the suffix *BEFORE* the parentheses: ----------------------------------------- for a=1 to 3 strOut_a(a) = objComm("Out"&a&"_a") next But if you mean that you want *properties* on a SINGLE indexed variable of an array...sure, you can do that. Using a VBScript class. Silly (and not overly well formed) example, just to get the point across: <% Class Person Private mName, mEmail Public Sub Init( name, email ) me.mName = name ne.mEmail = email End Sub Public Property Get Name( ) Name = me.mName End Property Public Property Get EMail( ) EMail = me.mEmail End Property End Class Dim people( 10 ) Set people(3) = New Person people(3).Init( "Adam", "adam(a)abc.com") Set people(7) = New Person people(7).Init("Joe","joe(a)xyz.com") .... x = 7 Response.Write people(x).Name & " has email address " & people(x).Email .... %> Is *THAT* what you are after?
From: Bob Barrows [MVP] on 28 May 2008 06:55 Old Pedant wrote: > First of all, there's no reason you couldn't put the suffix *BEFORE* > the parentheses: > ----------------------------------------- > for a=1 to 3 > strOut_a(a) = objComm("Out"&a&"_a") > next > > But if you mean that you want *properties* on a SINGLE indexed > variable of an array...sure, you can do that. Using a VBScript class. > > Silly (and not overly well formed) example, just to get the point > across: > Now that was more helpful than my reply was. Thanks a lot for stepping in. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
From: ll on 29 May 2008 12:05 On May 28, 5:55 am, "Bob Barrows [MVP]" <reb01...(a)NOyahoo.SPAMcom> wrote: > Old Pedant wrote: > > First of all, there's no reason you couldn't put the suffix *BEFORE* > > the parentheses: > > ----------------------------------------- > > for a=1 to 3 > > strOut_a(a) = objComm("Out"&a&"_a") > > next > > > But if you mean that you want *properties* on a SINGLE indexed > > variable of an array...sure, you can do that. Using a VBScript class. > > > Silly (and not overly well formed) example, just to get the point > > across: > > Now that was more helpful than my reply was. Thanks a lot for stepping in. > > -- > Microsoft MVP - ASP/ASP.NET > Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM" Thanks for all your help - this has helped immensely!
From: ll on 29 May 2008 17:56 On May 29, 11:05 am, ll <barn104_1...(a)yahoo.com> wrote: > On May 28, 5:55 am, "Bob Barrows [MVP]" <reb01...(a)NOyahoo.SPAMcom> > wrote: > > > > > Old Pedant wrote: > > > First of all, there's no reason you couldn't put the suffix *BEFORE* > > > the parentheses: > > > ----------------------------------------- > > > for a=1 to 3 > > > strOut_a(a) = objComm("Out"&a&"_a") > > > next > > > > But if you mean that you want *properties* on a SINGLE indexed > > > variable of an array...sure, you can do that. Using a VBScript class. > > > > Silly (and not overly well formed) example, just to get the point > > > across: > > > Now that was more helpful than my reply was. Thanks a lot for stepping in. > > > -- > > Microsoft MVP - ASP/ASP.NET > > Please reply to the newsgroup. This email account is my spam trap so I > > don't check it very often. If you must reply off-line, then remove the > > "NO SPAM" > > Thanks for all your help - this has helped immensely! One more (hopefully quick) question... within the loops as shown in my code, does each variable created (e.g. strOutP1, strOutP2, etc) retain its value, or is an array needed for this? Thanks again, Louis
|
Pages: 1 Prev: After Parenthesis in ASP Variables - Query Next: download file |