RE: Array/List Initialization

2000-08-02 Thread Kevin Pechin

Great Thanks that worked...

I just had to change the list syntax a bit to be

 
It didn't work the other way.

Thanks for your help!

>>> Andy Ewings <[EMAIL PROTECTED]> 08/02/00 11:16AM >>>
Why don't you create a list using 
and
then use the ListToArray function

-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]] 
Sent: 02 August 2000 15:58
To: [EMAIL PROTECTED] 
Subject: RE: Array/List Initialization



Actually what i was referring to was something along the lines of 


This way i won't have to do 
listname[1] = "a"
listname[2] = "b" ...


It will be a single dimension array.

>>> Andy Ewings <[EMAIL PROTECTED]> 08/02/00 10:31AM >>>
 to initialise a list and  to initialise an array.

If you want to hard code an element of an array just use  for the first dimension of the first element
for
example.



-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]] 
Sent: 02 August 2000 15:16
To: [EMAIL PROTECTED] 
Subject: Array/List Initialization


Hi Everyone,

This is going to sound like a really basic question, but i have not
been able to find an answer on any of the archives.

How do you initialize an array or a list.  For example i have twenty
items and i want to hard code them into an array (rather then use
ArrayAppend on each).  How would i do this via a cfset?

I know this should be something really simple, but I just can't figure
it out.  

-Kevin

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

or
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
the body.

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

or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Array/List Initialization

2000-08-02 Thread Stephen Moretti

> 
> This is going to sound like a really basic question, but i have not
> been able to find an answer on any of the archives.
> 
> How do you initialize an array or a list.  For example i have twenty
> items and i want to hard code them into an array (rather then use
> ArrayAppend on each).  How would i do this via a cfset?
> 
> I know this should be something really simple, but I just can't figure
> it out.  
> 

To initialise a list you do :



To initialise an array you do :



where x is the number of dimensions that you want in the array.

HTH

Regards

Stephen
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Array/List Initialization

2000-08-02 Thread Stewart, Mark

Kevin,

Try this:



yourArray=ArrayNew();
yourArray[1]=#value1#;
yourArray[2]=#value2#;
...etc.


I know you said "via a cfset", but if you're setting a lot of variables to
the array, I suggest using . If, however, you're not comfortable
with that, your standard  will work just fine.




...etc.

Hope that helps...

Mark


-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 02, 2000 10:16 AM
To: [EMAIL PROTECTED]
Subject: Array/List Initialization


Hi Everyone,

This is going to sound like a really basic question, but i have not
been able to find an answer on any of the archives.

How do you initialize an array or a list.  For example i have twenty
items and i want to hard code them into an array (rather then use
ArrayAppend on each).  How would i do this via a cfset?

I know this should be something really simple, but I just can't figure
it out.  

-Kevin

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Array/List Initialization

2000-08-02 Thread Peter Theobald

--=_3099822==_.ALT
Content-Type: text/plain; charset="us-ascii"

The best way I've found is use ListToArray to set an array to the values listed.

At 10:16 AM 8/2/00 -0400, Kevin Pechin wrote:
>Hi Everyone,
>
>This is going to sound like a really basic question, but i have not
>been able to find an answer on any of the archives.
>
>How do you initialize an array or a list.  For example i have twenty
>items and i want to hard code them into an array (rather then use
>ArrayAppend on each).  How would i do this via a cfset?
>
>I know this should be something really simple, but I just can't figure
>it out.  
>
>-Kevin
>--
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 


---
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

--=_3099822==_.ALT
Content-Type: text/html; charset="us-ascii"


The best way I've found is use ListToArray to set an array
to the values listed.

At 10:16 AM 8/2/00 -0400, Kevin Pechin wrote:
Hi Everyone,

This is going to sound like a really basic question, but i have not
been able to find an answer on any of the archives.

How do you initialize an array or a list.  For example i have
twenty
items and i want to hard code them into an array (rather then use
ArrayAppend on each).  How would i do this via a cfset?

I know this should be something really simple, but I just can't
figure
it out.  

-Kevin
--
Archives:
http://www.mail-archive.com/cf-talk@houseoffusion.com/" 
eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 



---
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com/" eudora="autourl">http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032


--=_3099822==_.ALT--

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Array/List Initialization

2000-08-02 Thread Andy Ewings

Why don't you create a list using  and
then use the ListToArray function

-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]]
Sent: 02 August 2000 15:58
To: [EMAIL PROTECTED]
Subject: RE: Array/List Initialization



Actually what i was referring to was something along the lines of 


This way i won't have to do 
listname[1] = "a"
listname[2] = "b" ...


It will be a single dimension array.

>>> Andy Ewings <[EMAIL PROTECTED]> 08/02/00 10:31AM >>>
 to initialise a list and  to initialise an array.

If you want to hard code an element of an array just use  for the first dimension of the first element
for
example.



-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]] 
Sent: 02 August 2000 15:16
To: [EMAIL PROTECTED] 
Subject: Array/List Initialization


Hi Everyone,

This is going to sound like a really basic question, but i have not
been able to find an answer on any of the archives.

How do you initialize an array or a list.  For example i have twenty
items and i want to hard code them into an array (rather then use
ArrayAppend on each).  How would i do this via a cfset?

I know this should be something really simple, but I just can't figure
it out.  

-Kevin

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Array/List Initialization

2000-08-02 Thread Kevin Pechin


Actually what i was referring to was something along the lines of 


This way i won't have to do 
listname[1] = "a"
listname[2] = "b" ...


It will be a single dimension array.

>>> Andy Ewings <[EMAIL PROTECTED]> 08/02/00 10:31AM >>>
 to initialise a list and  to initialise an array.

If you want to hard code an element of an array just use  for the first dimension of the first element
for
example.



-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]] 
Sent: 02 August 2000 15:16
To: [EMAIL PROTECTED] 
Subject: Array/List Initialization


Hi Everyone,

This is going to sound like a really basic question, but i have not
been able to find an answer on any of the archives.

How do you initialize an array or a list.  For example i have twenty
items and i want to hard code them into an array (rather then use
ArrayAppend on each).  How would i do this via a cfset?

I know this should be something really simple, but I just can't figure
it out.  

-Kevin

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Array/List Initialization

2000-08-02 Thread Andy Ewings

 to initialise a list and  to initialise an array.

If you want to hard code an element of an array just use  for the first dimension of the first element for
example.



-Original Message-
From: Kevin Pechin [mailto:[EMAIL PROTECTED]]
Sent: 02 August 2000 15:16
To: [EMAIL PROTECTED]
Subject: Array/List Initialization


Hi Everyone,

This is going to sound like a really basic question, but i have not
been able to find an answer on any of the archives.

How do you initialize an array or a list.  For example i have twenty
items and i want to hard code them into an array (rather then use
ArrayAppend on each).  How would i do this via a cfset?

I know this should be something really simple, but I just can't figure
it out.  

-Kevin

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.