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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
*> \brief \b LSAMETST
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* PROGRAM LSAMETST
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup auxOTHERauxiliary
*
* ===================================================================== PROGRAM LSAMETST
*
* -- LAPACK test routine (version 3.7.0) --
*
* -- LAPACK computational routine (version 3.7.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* =====================================================================
* .. Local Scalars ..
INTEGER I1, I2
* ..
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. Intrinsic Functions ..
INTRINSIC ICHAR
* ..
* .. Executable Statements ..
*
*
* Determine the character set.
*
I1 = ICHAR( 'A' )
I2 = ICHAR( 'a' )
IF( I2-I1.EQ.32 ) THEN
WRITE( *, * ) ' ASCII character set'
ELSE
WRITE( *, * ) ' Non-ASCII character set, IOFF should be ',I2-I1
END IF
*
* Test LSAME.
*
IF( .NOT. LSAME( 'A', 'A' ) )
$ WRITE( *, 9999 )'A', 'A'
IF( .NOT. LSAME( 'A', 'a' ) )
$ WRITE( *, 9999 )'A', 'a'
IF( .NOT. LSAME( 'a', 'A' ) )
$ WRITE( *, 9999 )'a', 'A'
IF( .NOT. LSAME( 'a', 'a' ) )
$ WRITE( *, 9999 )'a', 'a'
IF( LSAME( 'A', 'B' ) )
$ WRITE( *, 9998 )'A', 'B'
IF( LSAME( 'A', 'b' ) )
$ WRITE( *, 9998 )'A', 'b'
IF( LSAME( 'a', 'B' ) )
$ WRITE( *, 9998 )'a', 'B'
IF( LSAME( 'a', 'b' ) )
$ WRITE( *, 9998 )'a', 'b'
IF( LSAME( 'O', '/' ) )
$ WRITE( *, 9998 )'O', '/'
IF( LSAME( '/', 'O' ) )
$ WRITE( *, 9998 )'/', 'O'
IF( LSAME( 'o', '/' ) )
$ WRITE( *, 9998 )'o', '/'
IF( LSAME( '/', 'o' ) )
$ WRITE( *, 9998 )'/', 'o'
WRITE( *, * )' Tests completed'
*
9999 FORMAT( ' *** Error: LSAME( ', A1, ', ', A1, ') is .FALSE.' )
9998 FORMAT( ' *** Error: LSAME( ', A1, ', ', A1, ') is .TRUE.' )
END
|