For Programmers: Free Programming Magazines  


Home > Archive > Fortran > June 2004 > Re: Finding array displacements









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Finding array displacements
Jan Vorbrüggen

2004-06-04, 3:58 pm

>>iOffset = (LOC(Grid(2,3,4,5,6)) - LOC(Grid(1,1,1,1,1))) / 4
>
> Note that in addition to the usage of LOC (as Jugoslav mentions),
> and the assumption that 4 is the right "magic" number, this also
> assumes that Grid is contiguous.


Nope, it doesn't assume contiguity. It does assume that the offset
is measured in units of "words" and not in the units LOC returns (which
usually will be bytes, but could be something else).

Jan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com