File: string_25.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 (44 lines) | stat: -rw-r--r-- 701 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
program string_25
character(len=3) :: s1, s2
character(len=4) :: s3
character(len=2) :: s4
s1 = "abc"
s2 = "abc"
s3 = "defe"
s4 = "ab"
if (s1 == s2) then
    print *, "equal"
else
    print *, "not equal"
end if

if (s4 < s1) then
    print *, "less than"
else
    print *, "not less than"
end if

if (s3 > s4) then
    print *, "greater than"
else
    print *, "not greater than"
end if

if (s2 /= s4) then
    print *, "not equal"
else
    print *, "not, not equal"
end if

if (s4 <= s3) then
    print *, "less than equal to"
else
    print *, "not less than equal to"
end if

if (s3 >= s2) then
    print *, "greater than equal to"
else
    print *, "not greater than equal to"
end if
end program