sort of array containing strings doesn't work 
Author Message
 sort of array containing strings doesn't work

Hello,
I am doing some kind of dependency analyisis for java packages.
As a result I get a list of all imports from all classes. Duplicates
are already removed.

But the result is not sorted. Is there a size limite. The array contains
about 2000 lines??

Here a sniplet of the last couple of lines:
...
import com.xyz.arrays.base.common.arrays.ArrayBlockTemplateStorage;
import com.xyz.arrays.base.common.arrays.IArrayPublisher;
import com.xyz.arrays.base.common.arrays.ArrayBlockViewTable;
import javax.swing.table.TableModel;
import javax.swing.table.TableColumnModel;
import javax.swing.JViewport;
import com.xyz.arrays.base.common.arrays.SpotVO;
import com.xyz.arrays.base.common.arrays.SpotStorage;
import java.awt.Dimension;
import javax.swing.JRadioButton;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.ButtonGroup;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXParseException;
import com.xyz.arrays.base.common.arrays.ArrayBlockView;
import com.xyz.arrays.base.common.arrays.Probe;
import com.xyz.arrays.base.base.EventResult;
import com.xyz.arrays.base.base.StateTransitionTable;
import com.xyz.arrays.base.base.IListenable;
import com.xyz.arrays.base.base.ITask;

Thanks,
Ralph



Sat, 27 Mar 2004 23:26:52 GMT  
 sort of array containing strings doesn't work

Quote:
> Hello,
> I am doing some kind of dependency analyisis for java packages.
> As a result I get a list of all imports from all classes. Duplicates
> are already removed.

> But the result is not sorted. Is there a size limite. The array contains
> about 2000 lines??

The Psi::ESP module tells me you didn't assign the sorted array to anything:

Course I may have called the module with the wrong arguments, but that leads
to a different argument altogether.

Wyzelli
--




Sun, 28 Mar 2004 00:29:18 GMT  
 sort of array containing strings doesn't work

Quote:


> But the result is not sorted. Is there a size limite. The array contains
> about 2000 lines??
> Here a sniplet of the last couple of lines:

There should be no problem to sort a 2000 entries long array.



resulting list to something.

or

If this is indeed your problem you should note that the use warnings
pragma can help you detect this kind of error or mistake.

Hope this helps
Fredrik.



Sun, 28 Mar 2004 06:07:26 GMT  
 sort of array containing strings doesn't work

in <URL::">

The only size limit is your system. You can't sort a huge array if
you don't have the RAM for it. But if Perl runs out of memory, it'll
tell you.

You probably have made a mistake.

Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
               qq{Just Another Perl Hacker\n}}}}}}}}}'    |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w



Sun, 28 Mar 2004 18:40:16 GMT  
 sort of array containing strings doesn't work


Quote:

> in <URL::">






contains

> The only size limit is your system. You can't sort a huge array if
> you don't have the RAM for it. But if Perl runs out of memory, it'll
> tell you.

> You probably have made a mistake.

> Abigail

On the other hand, Abigail, I've seen cases where values simply dropped off
the stack in very large arrays (actually, I think it was a hash in my case)
without any warning from Perl or the OS.  It took about 10 times through the
de{*filter*} before I would believe my own eyes, but in the end I had to accept
what was happening.  Fortunately, I was able to work around it.

This is rare, though I'm not the only one in my office that it's happened
to, so I'm pretty sure I'm not going crazy.  Well, maybe I am, but it would
be for other reasons. :)

Regards,

Mr. Sunblade



Mon, 29 Mar 2004 00:46:30 GMT  
 sort of array containing strings doesn't work

in <URL::">
-:


-: > in <URL::">






-: contains

-: >
-: > The only size limit is your system. You can't sort a huge array if
-: > you don't have the RAM for it. But if Perl runs out of memory, it'll
-: > tell you.
-: >
-: > You probably have made a mistake.
-: >
-: >
-: >
-: > Abigail
-:
-: On the other hand, Abigail, I've seen cases where values simply dropped off
-: the stack in very large arrays (actually, I think it was a hash in my case)
-: without any warning from Perl or the OS.  It took about 10 times through the
-: de{*filter*} before I would believe my own eyes, but in the end I had to accept
-: what was happening.  Fortunately, I was able to work around it.
-:
-: This is rare, though I'm not the only one in my office that it's happened
-: to, so I'm pretty sure I'm not going crazy.  Well, maybe I am, but it would
-: be for other reasons. :)

Did you use perlbug to report this issue? Can you give us a code example
that exhibits this feature?

Abigail
--

sub A::TIESCALAR {bless \my $A => A} #  Yet Another silly JAPH by Abigail



Mon, 29 Mar 2004 07:36:03 GMT  
 sort of array containing strings doesn't work
On Wed, 10 Oct 2001 23:46:30 GMT,

Quote:




>> in <URL::">


> contains

>> The only size limit is your system. You can't sort a huge array if
>> you don't have the RAM for it. But if Perl runs out of memory, it'll
>> tell you.

> On the other hand, Abigail, I've seen cases where values simply dropped off
> the stack in very large arrays (actually, I think it was a hash in my case)
> without any warning from Perl or the OS.  It took about 10 times through the
> de{*filter*} before I would believe my own eyes, but in the end I had to accept
> what was happening.  Fortunately, I was able to work around it.

Then that was a bug, and a rather serious one at that. Did you report
it? There should be no case, ever, where Perl just ignores the fact
that it can't allocate memory, and continues running with incorrect,
incomplete or corrupt data.

Quote:
> This is rare, though I'm not the only one in my office that it's happened
> to, so I'm pretty sure I'm not going crazy.  Well, maybe I am, but it would
> be for other reasons. :)

Do you, or your collegues, have a code and data sample that exhibits
this behaviour? If this is occurring, then the p5p should be made
aware of it, so they can fix it.

Martien
--
Martien Verbruggen              |
Interactive Media Division      | The four hor{*filter*} of the apocalypse
Commercial Dynamics Pty. Ltd.   | are called Abort, Retry, Ignore and
NSW, Australia                  | Fail.



Tue, 30 Mar 2004 01:18:20 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Why doesn't this work (file handles as strings)

2. symbolic reference doesn't work with arrays?

3. help: 2d perl array doesn't work!

4. can't get sort(@array) to work

5. Dealing with Strings Containing '\'s

6. HTTP::Daemon doesn't handle file names containing spaces

7. help, @INC doesn't contain /usr/lib/perl5

8. Sorting an array containing hashes

9. Directory handling script works and doesn't work

10. Newbie: does an array contain a string

11. Regexp containing plus-chars won't work?!?!?

12. ODBC.PM and sql's Like doesn't work

 

 
Powered by phpBB® Forum Software