RE: Referencing an array item

2001-05-30 Thread Christopher Olive, CIO

yup.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-Original Message-
From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 4:04 AM
To: CF-Talk
Subject: RE: Referencing an array item


So, to access a element [2][1] in the 3rd array I would have:

Application.SM[3][2][1]

?



> -Original Message-
> From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 29, 2001 5:49 PM
> To: CF-Talk
> Subject: RE: Referencing an array item
>
>
> well, you collapse the three arrays into an "uber" array, called SM.  so
> your original statement might be..
>
> 
> 
> 
> 
>
> then use your number as an index into your outer array.
>
> chris olive, cio
> cresco technologies
> [EMAIL PROTECTED]
> http://www.crescotech.com
>
>
>
> -Original Message-
> From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 29, 2001 2:21 AM
> To: CF-Talk
> Subject: RE: Referencing an array item
>
>
> But I have 3 arrays, so it will really need to look like:
>
> Application.SM1[n][element]
> Application.SM2[n][element]
> Application.SM3[n][element]
>
> I can't see how else to work around this.
>
>
>
> > -Original Message-
> > From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 28, 2001 8:31 PM
> > To: CF-Talk
> > Subject: RE: Referencing an array item
> >
> >
> > ray has an excellent point.  however, why not exploit the nature
> > of arrays?
> > if you make Application.Sm an array with three elements, each one
> > the arrays
> > sm1..3, then you can reference an element in SM(n) by
> > Application.SM[n][element].  you don't have to futz with string
> evaluation
> > at all.
> >
> > chris olive, cio
> > cresco technologies
> > [EMAIL PROTECTED]
> > http://www.crescotech.com
> >
> >
> >
> > -Original Message-
> > From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 28, 2001 8:41 AM
> > To: CF-Talk
> > Subject: Referencing an array item
> >
> >
> > I have 3 arrays, which are assigned to the application scope:
> >
> > 
> > 
> > 
> >
> > My custom tag receives a number (1,2 or 3), and with that I
> reference the
> > correct array. I need to dynamically use this number to reference the
> > correct array, e.g.
> >
> > #ArrayLen(application.SM & attributes.Num)#
> >
> > (The above code does not work.) Any help would be much
> > appreciated!! Thanks
> > in advance.
> >
> > Steve
> >
> >
> > Development Manager
> > Vardus Internet Solutions (SA)
> >
> > Tel: (+27) 21 670 9880
> > Fax: (+27) 21 674 4549
> >
> > Email: [EMAIL PROTECTED]
> > Website: www.vardus.com
> >
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-30 Thread Steve Vosloo

So, to access a element [2][1] in the 3rd array I would have:

Application.SM[3][2][1]

?



> -Original Message-
> From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 29, 2001 5:49 PM
> To: CF-Talk
> Subject: RE: Referencing an array item
> 
> 
> well, you collapse the three arrays into an "uber" array, called SM.  so
> your original statement might be..
> 
> 
> 
> 
> 
> 
> then use your number as an index into your outer array.
> 
> chris olive, cio
> cresco technologies
> [EMAIL PROTECTED]
> http://www.crescotech.com
> 
> 
> 
> -Original Message-
> From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 29, 2001 2:21 AM
> To: CF-Talk
> Subject: RE: Referencing an array item
> 
> 
> But I have 3 arrays, so it will really need to look like:
> 
> Application.SM1[n][element]
> Application.SM2[n][element]
> Application.SM3[n][element]
> 
> I can't see how else to work around this.
> 
> 
> 
> > -Original Message-
> > From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 28, 2001 8:31 PM
> > To: CF-Talk
> > Subject: RE: Referencing an array item
> >
> >
> > ray has an excellent point.  however, why not exploit the nature
> > of arrays?
> > if you make Application.Sm an array with three elements, each one
> > the arrays
> > sm1..3, then you can reference an element in SM(n) by
> > Application.SM[n][element].  you don't have to futz with string 
> evaluation
> > at all.
> >
> > chris olive, cio
> > cresco technologies
> > [EMAIL PROTECTED]
> > http://www.crescotech.com
> >
> >
> >
> > -Original Message-
> > From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 28, 2001 8:41 AM
> > To: CF-Talk
> > Subject: Referencing an array item
> >
> >
> > I have 3 arrays, which are assigned to the application scope:
> >
> > 
> > 
> > 
> >
> > My custom tag receives a number (1,2 or 3), and with that I 
> reference the
> > correct array. I need to dynamically use this number to reference the
> > correct array, e.g.
> >
> > #ArrayLen(application.SM & attributes.Num)#
> >
> > (The above code does not work.) Any help would be much
> > appreciated!! Thanks
> > in advance.
> >
> > Steve
> >
> >
> > Development Manager
> > Vardus Internet Solutions (SA)
> >
> > Tel: (+27) 21 670 9880
> > Fax: (+27) 21 674 4549
> >
> > Email: [EMAIL PROTECTED]
> > Website: www.vardus.com
> >
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-29 Thread Christopher Olive, CIO

well, you collapse the three arrays into an "uber" array, called SM.  so
your original statement might be..






then use your number as an index into your outer array.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-Original Message-
From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 29, 2001 2:21 AM
To: CF-Talk
Subject: RE: Referencing an array item


But I have 3 arrays, so it will really need to look like:

Application.SM1[n][element]
Application.SM2[n][element]
Application.SM3[n][element]

I can't see how else to work around this.



> -Original Message-
> From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 8:31 PM
> To: CF-Talk
> Subject: RE: Referencing an array item
>
>
> ray has an excellent point.  however, why not exploit the nature
> of arrays?
> if you make Application.Sm an array with three elements, each one
> the arrays
> sm1..3, then you can reference an element in SM(n) by
> Application.SM[n][element].  you don't have to futz with string evaluation
> at all.
>
> chris olive, cio
> cresco technologies
> [EMAIL PROTECTED]
> http://www.crescotech.com
>
>
>
> -Original Message-
> From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 8:41 AM
> To: CF-Talk
> Subject: Referencing an array item
>
>
> I have 3 arrays, which are assigned to the application scope:
>
> 
> 
> 
>
> My custom tag receives a number (1,2 or 3), and with that I reference the
> correct array. I need to dynamically use this number to reference the
> correct array, e.g.
>
> #ArrayLen(application.SM & attributes.Num)#
>
> (The above code does not work.) Any help would be much
> appreciated!! Thanks
> in advance.
>
> Steve
>
>
> Development Manager
> Vardus Internet Solutions (SA)
>
> Tel: (+27) 21 670 9880
> Fax: (+27) 21 674 4549
>
> Email: [EMAIL PROTECTED]
> Website: www.vardus.com
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-28 Thread Steve Vosloo

But I have 3 arrays, so it will really need to look like:

Application.SM1[n][element]
Application.SM2[n][element]
Application.SM3[n][element]

I can't see how else to work around this.



> -Original Message-
> From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 8:31 PM
> To: CF-Talk
> Subject: RE: Referencing an array item
>
>
> ray has an excellent point.  however, why not exploit the nature
> of arrays?
> if you make Application.Sm an array with three elements, each one
> the arrays
> sm1..3, then you can reference an element in SM(n) by
> Application.SM[n][element].  you don't have to futz with string evaluation
> at all.
>
> chris olive, cio
> cresco technologies
> [EMAIL PROTECTED]
> http://www.crescotech.com
>
>
>
> -Original Message-
> From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 8:41 AM
> To: CF-Talk
> Subject: Referencing an array item
>
>
> I have 3 arrays, which are assigned to the application scope:
>
> 
> 
> 
>
> My custom tag receives a number (1,2 or 3), and with that I reference the
> correct array. I need to dynamically use this number to reference the
> correct array, e.g.
>
> #ArrayLen(application.SM & attributes.Num)#
>
> (The above code does not work.) Any help would be much
> appreciated!! Thanks
> in advance.
>
> Steve
>
>
> Development Manager
> Vardus Internet Solutions (SA)
>
> Tel: (+27) 21 670 9880
> Fax: (+27) 21 674 4549
>
> Email: [EMAIL PROTECTED]
> Website: www.vardus.com
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-28 Thread Christopher Olive, CIO

ray has an excellent point.  however, why not exploit the nature of arrays?
if you make Application.Sm an array with three elements, each one the arrays
sm1..3, then you can reference an element in SM(n) by
Application.SM[n][element].  you don't have to futz with string evaluation
at all.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-Original Message-
From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 28, 2001 8:41 AM
To: CF-Talk
Subject: Referencing an array item


I have 3 arrays, which are assigned to the application scope:





My custom tag receives a number (1,2 or 3), and with that I reference the
correct array. I need to dynamically use this number to reference the
correct array, e.g.

#ArrayLen(application.SM & attributes.Num)#

(The above code does not work.) Any help would be much appreciated!! Thanks
in advance.

Steve


Development Manager
Vardus Internet Solutions (SA)

Tel: (+27) 21 670 9880
Fax: (+27) 21 674 4549

Email: [EMAIL PROTECTED]
Website: www.vardus.com
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-28 Thread Steve Vosloo

Thanks!


> -Original Message-
> From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 5:45 PM
> To: CF-Talk
> Subject: RE: Referencing an array item
>
>
> oops, forgot a closing )
>
>  
>
> ===
> Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
>
> Email   : [EMAIL PROTECTED]
> ICQ UIN : 3679482
>
> "My ally is the Force, and a powerful ally it is." - Yoda
>
> > -Original Message-
> > From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 28, 2001 11:40 AM
> > To: CF-Talk
> > Subject: RE: Referencing an array item
> >
> >
> > Whenever possible, don't use Evaluate, it's not that fast. In this case,
> > SM1, SM2, are keys in the application scope. It is faster, and easier to
> > read, to just do:
> >
> > 
> >
> > p.s. Don't forget the read lock!
> >
> > ===
> > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
> >
> > Email   : [EMAIL PROTECTED]
> > ICQ UIN : 3679482
> >
> > "My ally is the Force, and a powerful ally it is." - Yoda
> >
> > > -Original Message-
> > > From: Tony Schreiber [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, May 28, 2001 8:50 AM
> > > To: CF-Talk
> > > Subject: Re: Referencing an array item
> > >
> > >
> > > Once again, Evaluate to the rescue:
> > >
> > > #ArrayLen(Evaluate("application.SM & attributes.Num"))#
> > >
> > > OR
> > >
> > > #ArrayLen(Evaluate("application.SM#attributes.Num#"))#
> > >
> > > > I have 3 arrays, which are assigned to the application scope:
> > > >
> > > > 
> > > > 
> > > > 
> > > >
> > > > My custom tag receives a number (1,2 or 3), and with that I
> > > reference the
> > > > correct array. I need to dynamically use this number to
> reference the
> > > > correct array, e.g.
> > > >
> > > > #ArrayLen(application.SM & attributes.Num)#
> > > >
> > > > (The above code does not work.) Any help would be much
> > > appreciated!! Thanks
> > > > in advance.
> > > >
> > > > Steve
> > > >
> > > >
> > > > Development Manager
> > > > Vardus Internet Solutions (SA)
> > > >
> > > > Tel: (+27) 21 670 9880
> >
> >
> >
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-28 Thread Raymond Camden

oops, forgot a closing )

 
 
===
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda 

> -Original Message-
> From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 11:40 AM
> To: CF-Talk
> Subject: RE: Referencing an array item
> 
> 
> Whenever possible, don't use Evaluate, it's not that fast. In this case,
> SM1, SM2, are keys in the application scope. It is faster, and easier to
> read, to just do:
> 
> 
> 
> p.s. Don't forget the read lock!
> 
> ===
> Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
> 
> Email   : [EMAIL PROTECTED]
> ICQ UIN : 3679482
> 
> "My ally is the Force, and a powerful ally it is." - Yoda
> 
> > -Original Message-
> > From: Tony Schreiber [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 28, 2001 8:50 AM
> > To: CF-Talk
> > Subject: Re: Referencing an array item
> >
> >
> > Once again, Evaluate to the rescue:
> >
> > #ArrayLen(Evaluate("application.SM & attributes.Num"))#
> >
> > OR
> >
> > #ArrayLen(Evaluate("application.SM#attributes.Num#"))#
> >
> > > I have 3 arrays, which are assigned to the application scope:
> > >
> > > 
> > > 
> > > 
> > >
> > > My custom tag receives a number (1,2 or 3), and with that I
> > reference the
> > > correct array. I need to dynamically use this number to reference the
> > > correct array, e.g.
> > >
> > > #ArrayLen(application.SM & attributes.Num)#
> > >
> > > (The above code does not work.) Any help would be much
> > appreciated!! Thanks
> > > in advance.
> > >
> > > Steve
> > >
> > >
> > > Development Manager
> > > Vardus Internet Solutions (SA)
> > >
> > > Tel: (+27) 21 670 9880
> 
> 
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Referencing an array item

2001-05-28 Thread Raymond Camden

Whenever possible, don't use Evaluate, it's not that fast. In this case,
SM1, SM2, are keys in the application scope. It is faster, and easier to
read, to just do:



p.s. Don't forget the read lock!

===
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -Original Message-
> From: Tony Schreiber [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 28, 2001 8:50 AM
> To: CF-Talk
> Subject: Re: Referencing an array item
>
>
> Once again, Evaluate to the rescue:
>
> #ArrayLen(Evaluate("application.SM & attributes.Num"))#
>
> OR
>
> #ArrayLen(Evaluate("application.SM#attributes.Num#"))#
>
> > I have 3 arrays, which are assigned to the application scope:
> >
> > 
> > 
> > 
> >
> > My custom tag receives a number (1,2 or 3), and with that I
> reference the
> > correct array. I need to dynamically use this number to reference the
> > correct array, e.g.
> >
> > #ArrayLen(application.SM & attributes.Num)#
> >
> > (The above code does not work.) Any help would be much
> appreciated!! Thanks
> > in advance.
> >
> > Steve
> >
> >
> > Development Manager
> > Vardus Internet Solutions (SA)
> >
> > Tel: (+27) 21 670 9880


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Referencing an array item

2001-05-28 Thread Tony Schreiber

Once again, Evaluate to the rescue:

#ArrayLen(Evaluate("application.SM & attributes.Num"))#

OR

#ArrayLen(Evaluate("application.SM#attributes.Num#"))#

> I have 3 arrays, which are assigned to the application scope:
> 
> 
> 
> 
> 
> My custom tag receives a number (1,2 or 3), and with that I reference the
> correct array. I need to dynamically use this number to reference the
> correct array, e.g.
> 
> #ArrayLen(application.SM & attributes.Num)#
> 
> (The above code does not work.) Any help would be much appreciated!! Thanks
> in advance.
> 
> Steve
> 
> 
> Development Manager
> Vardus Internet Solutions (SA)
> 
> Tel: (+27) 21 670 9880
> Fax: (+27) 21 674 4549
> 
> Email: [EMAIL PROTECTED]
> Website: www.vardus.com
> 
> 
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists