On 12/16/10 13:46, Ted Stern wrote:
> Is there another way to get this size
> other than doing a compilation to check it?
Not in F90 (except using file i/o of some sort---Dan can tell you), but
yes in the newer revisions. There is C_SIZEOF intrinsic which works like
the C sizeof (so it is meant for interoperable types). There is also the
intrinsic STORAGE_SIZE, which I believe was added in F2003.
Not sure how widely implemented they are.
But I might add that using TRANSFER for this is not very nice :-)
Best,
Aleks
--
Aleksandar Donev, Assistant Professor of Mathematics
Courant Institute of Mathematical Sciences
Office: 909 Warren Weaver Hall, New York University
E-mail: [log in to unmask]
Phone: (212) 992-7315; Fax: (212) 995-4121
Mailing address: 251 Mercer St, New York, NY 10012
Web: http://cims.nyu.edu/~donev
|