The following tables summarize the conversion rules for assignment statements. Table 1: Conversion Rules for Integer, Logical, or Real Expressions +-------------+------------------------------------------------+ |Scalar | Expression (E) | |Memory |------------------------------------------------- |Reference (V)| integer, logical, or real | +-------------+------------------------------------------------+ | integer or | V=INT(E) | | logical | | +-------------+------------------------------------------------+ | REAL | V=REAL(E) | | (KIND=4) | | +-------------+------------------------------------------------+ | REAL | V=DBLE(E) | | (KIND=8) | | +-------------+------------------------------------------------+ | REAL | V=QEXT(E) | | (KIND=16) | | +-------------+------------------------------------------------+ | COMPLEX | V=CMPLX(REAL(E), 0.0) | | (KIND=4) | | +-------------+------------------------------------------------+ | COMPLEX | V=CMPLX(DBLE(E), 0.0) | | (KIND=8) | | +-------------+------------------------------------------------+ | COMPLEX | V=CMPLX(QEXT(E), 0.0) | | (KIND=16) | | +-------------+------------------------------------------------+ Table 2: Conversion Rules for Complex Expressions +-------------+------------------------------------------------+ |Scalar | Expression (E) | |Memory |------------------------------------------------- |Reference (V)| complex | +-------------+------------------------------------------------+ | integer or | V=INT(REAL(E)) | | logical | Imaginary part of E is not used. | +-------------+------------------------------------------------+ | REAL | V=REAL(REAL(E)) | | (KIND=4) | Imaginary part of E is not used. | +-------------+------------------------------------------------+ | REAL | V=DBLE(REAL(E)) | | (KIND=8) | Imaginary part of E is not used. | +-------------+------------------------------------------------+ | REAL | V=QEXT(REAL(E)) | | (KIND=16) | Imaginary part of E is not used. | +-------------+------------------------------------------------+ | COMPLEX | V=CMPLX(REAL(REAL(E)), REAL(AIMAG(E))) | | (KIND=4) | | +-------------+------------------------------------------------+ | COMPLEX | V=CMPLX(DBLE(REAL(E)), DBLE(AIMAG(E))) | | (KIND=8) | | +-------------+------------------------------------------------+ | COMPLEX | V=CMPLX(QEXT(REAL(E)), QEXT(AIMAG(E))) | | (KIND=16) | | +-------------+------------------------------------------------+