Re: Array has a corrupted discriptor, reliable? [message #61682] |
Mon, 28 July 2008 10:20 |
Juggernaut
Messages: 83 Registered: June 2008
|
Member |
|
|
On Jul 28, 6:24 am, Joost Aan de Brugh <joost...@gmail.com> wrote:
> Hello folks,
>
> I am using IDL in corporation with Fortran and I am using arrays of
> variable size. Because I am in the initial stage of the program, I
> might make mistakes and have Fortran write data outside of my arrays.
> A simple example:
>
> idlarray = FltArr(OneTooFew)
>
> Call_External,.... (writng outside the idlarray bounds)
>
> ....
>
> End
>
> And I get a corrupted discriptor and the End in IDL. I was expecting a
> Segmentation fault, because I write data on a location that I have not
> allocated.
>
> Will I always get an error if I have Fortran write outside of my
> bounds or do I take the risk that I write data on wrong places without
> noticing?
>
> (This time, I am glad if I see an error message).
>
> Greetings,
> Joost Aan de Brugh
Well in my experience with C if you try and access outside of the
bounds of the array you pass to your C (I'd guess FORTRAN as well)
code it will just kill IDL with the error you've said. So I'd say
you'll always get an error...and you'll know by the death of your IDL
window along with that handy message.
|
|
|