Equivalent of "sizeof"

Equivalent of "sizeof"

Is there an intrinsic FORTRAN 90/95 routine to calculate the byte size of a type? I want to estimate the memory requirement of my program, but have parameterized the declarations of the arrays using KIND.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

There is no standard intrinsic for this, but CVF supports SIZEOF for this purpose. The argument is an object of the type you want the size (in bytes) of.

The standard way to do this is an INQUIRE by IOLENGTH, but this is rather clumsy.


Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today