File: int_03.f90

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (30 lines) | stat: -rw-r--r-- 632 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
program int_03
    implicit none
    integer, parameter :: dp = kind(0.d0)

    integer(8) :: ans(5)
    integer :: i4
    integer(8) :: i8
    complex(dp) :: w8
    complex :: w4
    ans(1) = 8524933037632333570_8
    ans(2) = -1069250973542918798_8
    ans(3) = -5123867065024149335_8
    ans(4) = 7303655603304982073_8
    ans(5) = 5108441843522503546_8
    print *, ans

    w8 = (7.7_8, 5.0_8)
    i4 = w8
    i8 = w8
    print *, i4, i8
    if (i4 /= 7) error stop
    if (i8 /= 7) error stop

    w4 = (7.7, 5.0)
    i4 = w4
    i8 = w4
    print *, i4, i8
    if (i4 /= 7) error stop
    if (i8 /= 7) error stop
end program