Re: dimension question
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Sun, 25 Feb 2007 10:59:51 -0800
sc <stas_ch@xxxxxxxx> wrote:
Well, array storage method in fortran is a little bit different from
other languages I know.
Some other languages use row-first instead of column-first ordering, but
your original code (which passed a 100x100 actual argument to a 2x2
dummy) wouldn't have worked any better that way.
If you you know of any languages where anything like that would have
worked, then what is happening is that it is working with a slice of the
larger array - not just counting on the memory layout to happen to fit
(it won't). The notation might possibly hide that, but that's bound to
be what is happening. Fortran does have a way to do that - at least as
of f90. That's the array slice notation that Mike Metcalf illustrated.
If you restrict yourself to Fortran 77, then yes, lots of array-related
things are harder. Fortran 77 doesn't have a concept of an array slice;
all you can do is play tricks with the memory layout.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: dimension question
- From: glen herrmannsfeldt
- Re: dimension question
- References:
- dimension question
- From: sc
- Re: dimension question
- From: sc
- dimension question
- Prev by Date: Re: dimension question
- Next by Date: Re: sorting command
- Previous by thread: Re: dimension question
- Next by thread: Re: dimension question
- Index(es):
Relevant Pages
|
|