[thelist] cf structures

Nathan Dintenfass nathan at changemedia.com
Wed May 1 19:39:01 CDT 2002


In CF5 and earlier there is not a built in way to do this with one line of code,
but in CFMX when you say:

animals.dogs.bessie.sex = "female";

you are automatically creating a nested structure.  In your case you can simply
do:

animals = structNew();
animals.dogs = structNew();
animals.dogs.bessie = structNew();
animals.dogs.bessie.sex = "female";

Nathan Dintenfass
nathan at changemedia.com



> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Erik Mattheis
> Sent: Wednesday, May 01, 2002 5:12 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] cf structures
>
>
> I'm trying to figure out how to create a CF structure like
>
> animals.dogs.bessie.sex
>
> and store 'female' in that node.
>
> ... and can't find anything in the documentation or in a quick google
> search ... do you _have_ to say
>
> animals=StructNew()
> StructInsert(animals,'dogs',StructNew())
> StructInsert(animals.dogs,'bessie',StructNew())
> StructInsert(animals.dogs.bessie,'sex','female')
>
> Maybe I don't even want a structure, but it seems like it would be
> the best thing ... I need to create a multi-dimentional array type
> deal that can be populated by a query, form, cookie or url or
> combination of any of those.
> --
>
> __________________________________________
> - Erik Mattheis
>
> (612) 377 2272
> http://goZz.com/
>
> Through June 15
> 9am - 3pm M-F:
> (952) 838 7698
>
> __________________________________________
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list