don't have their own kind inquiry functions, but use the kinds specified for INTEGERs; default kind of LOGICAL is the same as of INTEGER. .FALSE. .true._one_byte and the KIND function operates as expected: KIND(.TRUE.) CHARACTER The forms of literal constants for CHARACTER data type are 'A string' "Another" 'A "quote"' ''''''' (the last being an empty string). Different kinds are allowed (for example, to distinguish ASCII and UNICODE strings), but not widely supported by compilers. Again, the kind value is given by the KIND function: KIND('ASCII') Number model and intrinsic functions The numeric types are based on number models with associated inquiry functions (whose values are independent of the values of their arguments; arguments are used only to provide kind). These functions are important for portable numerical software: Scalar variables Scalar variables corresponding to the five intrinsic types are specified as follows: INTEGER(KIND=2) :: i REAL(KIND=long) :: a COMPLEX :: current LOGICAL :: Pravda CHARACTER(LEN=20) :: word CHARACTER(LEN=2, KIND=Kanji) :: kanji_word where the optional KIND parameter specifies a non-default kind, and the :: notation delimits the type and attributes from variable name(s) and their optional initial values, allowing full variable specification and initialization to be typed in one statement (in previous standards, attributes and initializers had to be declared in several statements). While it is not required in above examples (as there are no additional attributes and initialization), most Fortran-90 programmers acquire the habit to use it everywhere. LEN= specifier is applicable only to CHARACTERs and specifies the string length (replacing the older *len form). The explicit KIND= and LEN= specifiers are optional: CHARACTER(2, Kanji) :: kanji_word works just as well. There are some other interesting character features. Just as a substring as in CHARACTER(80) :: line ... = line(i:i) ! substring was previously possible, so now is the substring '0123456789'(i:i) Also, zero-length strings are allowed: line(i:i-1) ! zero-length string Finally, there is a set of intrinsic character functions, examples being Derived data types For derived data types, the form of the type must be defined first: TYPE person CHARACTER(10) name REAL age END TYPE person and then, variables of that type can be defined: TYPE(person) you, me To select components of a derived type, % qualifier is used: you%age Literal constants of derived types have the form TypeName(1stComponentLiteral, 2ndComponentLiteral, ...): you = person('Smith', 23.5) which is known as a structure constructor. Definitions may refer to a previously defined type: