Type parameter inquiry: str%len is equivalent to len(str) a%kind is equivalent to kind(a)
The real fun part starts with user-defined kinds, e.g. type tp(dim) integer, KIND :: dim real :: dist(dim) end type tp type(tp) :: t(5) print *, t%dist%dim Quote from F2008 but F2003 should be the same: "A type parameter inquiry is used to inquire about a type parameter of a data object. It applies to both intrinsic and derived types. R616 type-param-inquiry is designator % type-param-name C622 (R616) The type-param-name shall be the name of a type parameter of the declared type of the object designated by the designator. A deferred type parameter of a pointer that is not associated or of an unallocated allocatable variable shall not be inquired about." -- Summary: F2003: Type parameter inquiry: str%len, a%kind Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40196