Not sure that's really practical, as a structure is unordered. for example, if i have a structure for employee data (containing keys firstname, lastname, address, and phone)...i don't believe i have any control over how the struct is...um...structured.
quick test: <cfscript> foo = structNew(); foo.firstName = "charlie"; foo.lastName = "griefer"; foo.address = "123 Main Street"; foo.phone = "555-1212"; </cfscript> <cfoutput> <cfloop collection="#foo#" item="key"> #key#: #foo[key]#<br /> </cfloop> </cfoutput> <br /><br /> <cfscript> for (key in foo) { writeOutput(key & ": " & foo[key] & "<br />"); } </cfscript> now, i used tags and cfscript to see if there was any difference in the order of output between the two (there was not)...but both output in the following order: phone lastname address firstname even though the structure was created in the order of: firstname lastname address phone ...so if this is a consistent (and unpredictable) behavior...is 'paging thru' a structure 'n' keys at a time really what you're looking to do? On 2/20/06, Stephen Adams <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to get a section of a structure, for example can I get the > first ten key/value pairs of a structure then the next ten. I trying to page > through a structure ten rows at a time. > > I was thinking of using StructCount to get a number for the amount of values > in the structure then using that some how to step through the structure. Has > anyone every done something like this? > > Stephen > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/cfcdev@cfczone.org -- Charlie Griefer ================================================ "...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed." ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org