Getting element from array 2004-03-25 - By kim aldis
Back Ah, you're talking about array references. From the MS scripting docs:-
Objects as Associative Arrays Normally, you use the dot operator "." to access an object's properties. For example,
myObject.aProperty Here, the property name is an identifier. You can also access an object's properties using the index operator "[]". Here, you are treating the object as an associative array. An associative array is a data structure that allows you to dynamically associate arbitrary data values with arbitrary strings. For example,
myObject["aProperty"] // Same as above. Although the use of the index operator is more commonly associated with accessing array elements, when used with objects, the index is always the property name expressed as a string literal.
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ___
> -- --Original Message-- -- > From: owner-xsi@(protected) > [mailto:owner-xsi@(protected)] On Behalf Of Bernard Lebel > Sent: 25 March 2004 10:29 > To: XSI@(protected) > Subject: Re: [Script-newbie] Getting element from array > > I mean something more like collections, like > myArray["myObject"], in case you don't know the index of that object. > Sorry if this is basic stuff. > > > Bernard > > > -- -- Original Message -- -- > From: "kim aldis" <kim@(protected)> > To: <XSI@(protected)> > Sent: Thursday, March 25, 2004 10:52 AM > Subject: RE: [Script-newbie] Getting element from array > > > > You don't mean theArray[3], do you? > > > > > -- --Original Message-- -- > > > From: owner-xsi@(protected) > > > [mailto:owner-xsi@(protected)] On Behalf Of Bernard Lebel > > > Sent: 25 March 2004 09:02 > > > To: XSI@(protected) > > > Subject: [Script-newbie] Getting element from array > > > > > > Pretty much in the same kind as my question how to delete > an array > > > element, how to you explicitely get an element? Any way > at all like > > > in collections? > > > > > > > > > Thanks again > > > Bernard > > > --- > > > Unsubscribe? Mail Majordomo@(protected) with the > following text in > > > body: > > > unsubscribe xsi > > > > > > > > > > > > > > > > > --- > > Unsubscribe? Mail Majordomo@(protected) with the > following text in body: > > unsubscribe xsi > > > --- > Unsubscribe? Mail Majordomo@(protected) with the following > text in body: > unsubscribe xsi > > >
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|