storage_size(3f) - [FORTRAN:INTRINSIC:BIT INQUIRY] Storage size in bits
Syntax
Description
Arguments
Return Value
Examples
Standard
Class
See Also
result = storage_size(a [, kind])
Returns the storage size of argument A in bits.
A - Shall be a scalar or array of any type. KIND - (Optional) shall be a scalar integer constant expression.
The result is a scalar integer with the kind type parameter specified by KIND (or default integer type if KIND is missing). The result value is the size expressed in bits for an element of an array that has the dynamic type and type parameters of A.
Sample program
program demo_storage_size write(*,*)size of integer ,storage_size(0) write(*,*)size of real ,storage_size(0.0) write(*,*)size of logical ,storage_size(.true.) write(*,*)size of complex ,storage_size((0.0,0.0)) write(*,*)size of integer array ,storage_size([0,1,2,3,4,5,6,7,8,9]) end program demo_storage_size
[[Fortran 2008]] and later
Inquiry function
[[c_sizeof]]
storage_size (3) | March 19, 2019 |