Clicky
Showing changes from revision #2 to #3:
(追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)
Determine the extent of array
along a specified dimension dim
, or the total number of elements in array
if dim
is absent.
Fortran 95 and later, with kind
argument Fortran 2003 and later
(削除) Inquiry function (削除ここまで)(追記) Inquiry function (追記ここまで)
result = size(array[, dim [, kind]])
array
- Shall be an array of any type. If array
is a pointer it must be associated and allocatable arrays must be allocated.dim
- (Optional) shall be a scalar of type integer
and its value shall be in the range from 1 to n, where n equals the rank of array
.kind
- (Optional) An integer
initialization expression indicating the kind parameter of the result.The return value is of type integer
and of kind kind
. If kind
is absent, the return value is of default integer kind.
program test_size
write(*,*) size((/ 1, 2 /)) ! 2
end program