thanks for the info Steve,

this is what i'm working on (right now the array is visible as you travel
through the quiz)
http://www.lightrodsoft.com/training/training_quiz_listquizzes.cfm

i actually figgured most of it out by... reading the books!

for some reason ever since i joined this list i've gotten more and more lazy
when it comes to figguring stuff out myself

from now on i'll try to exaust my other resources before asking questions
like this



-----Original Message-----
From: Steve Bernard [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 12:19 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: ...list...array


- To create a list by hand just use CFSET:
<CFSET list_MyList = "1,2,3,4,5">

- If you have an existing one dimensional array, arr_MyArray[], you could
use ArrayToList():
<CFSET list_MyList = ArrayToList(arr_MyArray, ",")>

- To carry variables through pages you can use a variety of methods. If you
want to pass complex structures
like arrays and structures you can use APPLICATION or SESSION variables, or
WDDX on the client, in CLIENT variables, or in a database. Passing lists and
simple variables via "hidden" form input will work but, isn't very secure.
Cookies have the same problem although you could use memory resident cookies
instead of writing them to disk. The variety of tools and methods with each
makes it impossible to definitively say, "THIS is how to do it."

- A list differs from a one dimensional array in the way that they are
indexed and searched. They are just different ways of storing information.
What and how you need to interact with data should dictate the storage and
retrieval method(s) used. In some cases it is necessary to convert between
various types to do what you need to do.

- A one dimensional array is not arr_MyArray[1,2,3], it's:

arr_MyArray[0]="1"
           [1]="2"
           [2]="3"

This may seem like semantics but, it's an important distinction.

Steve

-----Original Message-----
From: Gavin Myers [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 12:11 PM
To: CF-Talk
Subject: ...list...array

okay, I've been getting into lists and arrays but I cant find very much good
reference

1: is a list just a 1d array?
2: how do you carry a list/array through pages? Is the only way to do it via
application.cfm and locking the list/array?
3: I can figure out how to make a new array, pretty tough arraynew(1) ;),
but how do you make a new list? couldnt find the function for it...

I'm pretty famaliar with arrays, they arent a very tough concept, my main
problem is syntax, wich i can put togethor via developin web applications
(the cf standard book). How to compare them to another when done, how to add
the person picked the letter b on the third question... most of this stuff i
can figgure out by looking at the functions.. my main problem is question
#2.
<cfset myarray = array()>

when i do this:
<cfset myarray[1]="1">
<cfset myarray[2]="2">
<cfset myarray[3]="3">

It bascially does this:
myarray = [1,2,3]

right?

a list really looks & seems to act like a 1d array
------------------------------------------------------------------------------
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.

Reply via email to