- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this test program, I can input a negative row number,
and it happily does not care whether its within the bounds
of the array A (in the calling routine), but then when I input a
negative COLUMN number, it generates a breakpoint.
Notice that I can print out quantities that are OUTSIDE the calling
routine array A, just by giving a large number of columns or rows.
Anyway, isn't it supposed to do bounds checking on BOTH columns and rows?
A negative row number is this context should be caught shouldn't it?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you have your row and column designations backward from usual Fortran convention. The bounds checking probably doesn't care if you stay inside the array even though you exceed one of the subscripts, as it has to allow the case where a multiple dimensioned array is accessed as single dimensioned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you say *, it's up to you to make sure you don't go out of bounds. The compiler has no idea what the actual bounds are. This is why you should use : (and explicit interfaces) instead.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page