File: arrays_32.f90

package info (click to toggle)
lfortran 0.45.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 46,332 kB
  • sloc: cpp: 137,068; f90: 51,260; python: 6,444; ansic: 4,277; yacc: 2,285; fortran: 806; sh: 524; makefile: 30; javascript: 15
file content (42 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
program array_32
implicit none

type :: der_type
    real :: r
    integer :: i
end type

real, dimension(5) :: a, b
complex, dimension(6) :: x
integer, dimension(3) :: c
logical, dimension(2) :: d
type(der_type), dimension(7) :: p

real, dimension(2,3) :: e
complex, dimension(6,8) :: y
integer, dimension(3,4) :: f
logical, dimension(5,2) :: g
type(der_type), dimension(7,9) :: q

real, dimension(2:3,3:4,4:5) :: h
complex, dimension(6:7,8:10,11:13) :: z
integer, dimension(3:4,4:5,3:4) :: i
logical, dimension(5:6,2:3,2:4) :: j
type(der_type), dimension(7:10,9:15,16:18) :: r

if( lbound(p, 1) /= 1 ) error stop
if( ubound(p, 1) /= 7 ) error stop

if( lbound(q, 1) /= 1 ) error stop
if( ubound(q, 1) /= 7 ) error stop
if( lbound(q, 2) /= 1 ) error stop
if( ubound(q, 2) /= 9 ) error stop

if( lbound(r, 1) /= 7 ) error stop
if( ubound(r, 1) /= 10 ) error stop
if( lbound(r, 2) /= 9 ) error stop
if( ubound(r, 2) /= 15 ) error stop
if( lbound(r, 3) /= 16 ) error stop
if( ubound(r, 3) /= 18 ) error stop

end program