Re: where and non-conformable arrays
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: where and non-conformable arrays         

Group: comp.lang.fortran · Group Profile
Author: glen herrmannsfeldt
Date: Sep 13, 2008 05:10

michaelmetcalf@compuserve.com wrote:
> On Sep 13, 2:48 am, Dan aol.com> wrote:
>> B = -9999.
>> WHERE( A /= -9999. ) B(1:size(A)) = A
> And ineffiently: many elements of B will be set twice.
> That's what the elsewhere clause is for.

It is hard to make generalizations on efficiency, but
it is likely that testing a value is slower than
assigning a value. One possible exception would be
avoiding the write to the swap file if you are
thrashing virtual storage. There are better fixes
in that case, though.

-- glen
no comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Re: iTunes non è una monnezza perchè non si può dire ma ad essere onesti...it.comp.macintosh ·