Re: black arrays, hairy arrays, skinny arrays

2000-06-30 Thread Adam Cantrell


It's settled, to hell with using the array idea - I've resorted to using a
temp table in the database.  Maybe I'll see if I could apply a stored
procedure to hurry things along - that should be a fun project seeing as I
have never written one yet.  I still, however, would like to know if
somebody runs across a method of sorting a 2 dimensional array (or a one
dimensional array that holds one dimensional arrays as you all would call
it ).  Thanks for all of your feedback.

Adam Cantrell


- Original Message -
From: "Dave Watts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 29, 2000 9:35 PM
Subject: RE: black arrays, hairy arrays, skinny arrays


> > ArraySort is horrid and ugly - it only (seems) to sort single
> > dimensioned arrays, and either eats 2 dimensional ones, or does
> > nothing
> >
> > I had to write a sort routine for my 2 dimensional ones
>
> None of the array functions in CF work with both dimensions of a
> two-dimensional array.
>
> When you consider that a two-dimensional array, in CF, is simply a
> one-dimensional array in which every element contains a one-dimensional
> array, it makes sense that you can't sort on the outer dimension - there's
> no property by which to sort!
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
>
> --

> Archives: http://www.eGroups.com/list/cf-talk
> 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.eGroups.com/list/cf-talk
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: black arrays, hairy arrays, skinny arrays

2000-06-29 Thread Dave Watts

> ArraySort is horrid and ugly - it only (seems) to sort single
> dimensioned arrays, and either eats 2 dimensional ones, or does
> nothing
>
> I had to write a sort routine for my 2 dimensional ones

None of the array functions in CF work with both dimensions of a
two-dimensional array.

When you consider that a two-dimensional array, in CF, is simply a
one-dimensional array in which every element contains a one-dimensional
array, it makes sense that you can't sort on the outer dimension - there's
no property by which to sort!

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

--
Archives: http://www.eGroups.com/list/cf-talk
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: black arrays, hairy arrays, skinny arrays

2000-06-29 Thread Philip Arnold - ASP

> How do I sort an array and then work with the sorted information?  The
> combined documentation relating to this in both of the Forta books equates
> to about 10 lines.  The only output I can get from the arraysort
> function is
> a "yes" or a "no", and after it returns "yes" and I go back to call data
> from the "sorted" array - it's not sorted at all.  Am I wrong to
> think of a
> 2 dimensional array as a spreadsheet?  If I've got a 5 column, 2
> dimensional
> array - is there a syntax for sorting by, let's say, the 3rd column?  Here
> is what I have been trying:
>
> 
> 
> 
>
> 
> 
> 
> 
> 
>
> 
>
> So what this is doing is setting a two column array, each
> containing numbers
> in an ascending fashion.  The arraysort function on the last line (which
> causes an error, hope you know what I'm attempting to do) is sorting the
> array by the second column in a descending order.  What am I doing wrong?
> CF4.51/w2kadvanced

Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**

ArraySort is horrid and ugly - it only (seems) to sort single dimentioned
arrays, and either eats 2 dimentional ones, or does nothing

I had to write a sort routine for my 2 dimentional ones

If not, keep a dump database, make a table, insert the data, query it...
voila!

Ugly, but faster than writing your own sort routine.


--
Archives: http://www.eGroups.com/list/cf-talk
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.



black arrays, hairy arrays, skinny arrays

2000-06-29 Thread Adam Cantrell


How do I sort an array and then work with the sorted information?  The
combined documentation relating to this in both of the Forta books equates
to about 10 lines.  The only output I can get from the arraysort function is
a "yes" or a "no", and after it returns "yes" and I go back to call data
from the "sorted" array - it's not sorted at all.  Am I wrong to think of a
2 dimensional array as a spreadsheet?  If I've got a 5 column, 2 dimensional
array - is there a syntax for sorting by, let's say, the 3rd column?  Here
is what I have been trying:














So what this is doing is setting a two column array, each containing numbers
in an ascending fashion.  The arraysort function on the last line (which
causes an error, hope you know what I'm attempting to do) is sorting the
array by the second column in a descending order.  What am I doing wrong?
CF4.51/w2kadvanced

Adam Cantrell


--
Archives: http://www.eGroups.com/list/cf-talk
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.