File: format_22.f90

package info (click to toggle)
lfortran 0.59.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 56,736 kB
  • sloc: cpp: 168,052; f90: 74,272; python: 17,537; ansic: 7,705; yacc: 2,345; sh: 1,334; fortran: 895; makefile: 37; javascript: 15
file content (62 lines) | stat: -rw-r--r-- 1,274 bytes parent folder | download | duplicates (3)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
program format_22
  implicit none
  integer :: x, y, z
  integer(8) :: x8, y8, z8
  integer(1) :: x1, y1, z1
  integer(2) :: x2, y2, z2
  x = 21
  y = 100
  z = 0
  x8 = 31
  y8 = 10
  z8 = 0
  x1 = 11
  y1 = 10
  z1 = 0
  x2 = 9
  y2 = 42
  z2 = 0
  print *, "b format for integer(4)"
  print '(B0)', x
  print '(B1)', x
  print '(B2)', x
  print '(B3)', x
  print '(B4)', x
  print '(B5)', x
  print '(B6)', x
  print '(B7)', x
  print '(B8)', x
  print '(B9)', x
  print '(B10)', x
  print "(a,b32,a)",'-1 in b32 format: "', -1,'"'
  print "(a,b0 ,a)",'-1 in b0  format: "', -1,'"'
  print "(a,b32 ,a)",'10 in b32  format: "', 10,'"'
  print "(a,b0 ,a)",'11 in b0  format: "', 11,'"'
  print '(B0)', y
  print '(B4)', y
  print '(B5)', y
  print '(B10)', y
  print '(B0)', z
  print '(B4)', z
  print *, "b format for integer(8)"
  print '(B0)', x8
  print '(B7)', x8
  print '(B4)', y8
  print '(B5)', y8
  print '(B10)', z8
  print '(B0)', z8
  print *, "b format for integer(1)"
  print '(B4)', x1
  print '(B5)', x1
  print '(B10)', y1
  print '(B0)', y1
  print '(B4)', z1
  print '(B5)', z1
  print *, "b format for integer(2)"
  print '(B10)', x2
  print '(B0)', x2
  print '(B4)', y2
  print '(B5)', y2
  print '(B10)', z2
  print '(B0)', z2
end program format_22