Clicky

Fortran Wiki
size (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #2 to #3: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

Determine the extent of array along a specified dimension dim, or the total number of elements in array if dim is absent.

Standard

Fortran 95 and later, with kind argument Fortran 2003 and later

Class

(削除) Inquiry function (削除ここまで)(追記) Inquiry function (追記ここまで)

Syntax

result = size(array[, dim [, kind]])

Arguments

  • 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.

Return value

The return value is of type integer and of kind kind. If kind is absent, the return value is of default integer kind.

Example

program test_size
 write(*,*) size((/ 1, 2 /)) ! 2
end program

See also

shape, reshape

category: intrinsics

Revised on May 3, 2009 22:48:58 by Jason Blevins (71.70.142.190) (1026 characters / 0.0 pages)
Edit | Back in time (2 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, shape, Stats

AltStyle によって変換されたページ (->オリジナル) /