[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find first and last
From: |
John W. Eaton |
Subject: |
Re: find first and last |
Date: |
Tue, 26 Sep 2006 13:00:56 -0400 |
On 26-Sep-2006, Bill Denney wrote:
| On Tue, 26 Sep 2006, David Bateman wrote:
|
| > Bill Denney wrote:
| >> BTW, a bit more detail on where the problems occur:
| >> 1) if you use the second argument and not the third arg, it will
| >> seg-fault.
| >> 2) if you use the third arg at all, it prints the usage.
| >
| > Try running "valgrind --tool=memcheck octave" and running your oct-file.
| > This should identify exactly the line on which the seg-fault is
| > happening on together with the line that allocates the block in which
| > the seg-fault is happening was allocated..
|
| OK, I tried that, but I couldn't interpret the output. As I read it,
| there should be an error in ov.h line 227 (which, as far as I know, has
| nothing to do with my changes).
|
| I also looked at my changes line 227, but that was a line with just a } on
| it. I tried rewriting the if statement around there, but that didn't fix
| it either.
Running under gdb can also be helpful. I think you are forgetting
that arrays in C++ use 0-based indexing, even with liboctave objects.
So if nargin > 1, you can safely access args(0) and args(1), but there
is no guarantee about args(2).
jwe
- find first and last, Bill Denney, 2006/09/25
- find first and last, John W. Eaton, 2006/09/26
- Re: find first and last, Bill Denney, 2006/09/26
- Re: find first and last, David Bateman, 2006/09/26
- Re: find first and last, Bill Denney, 2006/09/26
- Re: find first and last,
John W. Eaton <=
- Re: find first and last, Bill Denney, 2006/09/26
- Re: find first and last, John W. Eaton, 2006/09/26
- Re: find first and last, John W. Eaton, 2006/09/26
- Re: find first and last, David Bateman, 2006/09/26
- Re: find first and last, John W. Eaton, 2006/09/27
- Re: find first and last, David Bateman, 2006/09/27
- Re: find first and last, David Bateman, 2006/09/27
- Re: find first and last, John W. Eaton, 2006/09/27