[UP]


Manual Reference Pages  - storage_size (3)

NAME

storage_size(3f) - [FORTRAN:INTRINSIC:BIT INQUIRY] Storage size in bits

CONTENTS

Syntax
Description
Arguments
Return Value
Examples
Standard
Class
See Also

SYNTAX

result = storage_size(a [, kind])

DESCRIPTION

Returns the storage size of argument A in bits.

ARGUMENTS

A - Shall be a scalar or array of any type.
KIND - (Optional) shall be a scalar integer constant expression.

RETURN VALUE

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.

EXAMPLES

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

STANDARD

[[Fortran 2008]] and later

CLASS

Inquiry function

SEE ALSO

[[c_sizeof]]


storage_size (3) March 19, 2019
Generated by manServer 1.08 from c86751c4-9eae-4b85-a0ba-8464a40db988 using man macros.