fcode 发表于 2016-5-4 06:44
我一直叫 “假定形状”和“假定大小”
fcode 发表于 2016-5-4 18:06
这么说起来,确实有些不合理。但是这两个叫法流传了很多年,很多教材里都这么写。如果忽然换个叫法,会影响 ...
fcode 发表于 2016-5-4 18:06
这么说起来,确实有些不合理。但是这两个叫法流传了很多年,很多教材里都这么写。如果忽然换个叫法,会影响 ...
If the lower bound is not specified, it is assumed to be 1.
The rank of the array is the number of colons (:) specified.
The value of the upper bound is the extent of the corresponding dimension of the associated actual argument array + lower-bound - 1.
Bytes 0 to 3 contain the base address.
Bytes 4 to 7 contain the size of a single element of the array.
Bytes 8 to 11 are reserved and should not be explicitly set.
Bytes 12 to 15 contain a set of flags used to store information about the array. This includes:
bit 1 (0x01): array is defined -- set if the array has been defined (storage allocated)
bit 2 (0x02): no deallocation allowed -- set if the array pointed to cannot be deallocated (that is, it is an explicit array target)
bit 3 (0x04): array is contiguous -- set if the array pointed to is a contiguous whole array or slice.
bit 8 (0x80): set if the array pointed to is ALLOCATABLE.
Other bits are reserved.
Bytes 16 to 19 contain the number of dimensions (rank) of the array.
Bytes 20 to 23 are reserved and should not be explicitly set.
The remaining bytes (24 to 107) contain information about each dimension (up to 31). Each dimension is described by a set of 3 4-byte entities:
The number of elements (extent)
The distance between the starting address of two successive elements in this dimension, in bytes.
The lower bound
REAL :: A(-100:100)
CALL B( A, -100)
CONTAINS
SUBROUTINE B( C, LB )
INTEGER :: LB
REAL :: C(LB:)
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |