OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lsame.f
Go to the documentation of this file.
1*> \brief \b LSAME
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8* Definition:
9* ===========
10*
11* LOGICAL FUNCTION LSAME(CA,CB)
12*
13* .. Scalar Arguments ..
14* CHARACTER CA,CB
15* ..
16*
17*
18*> \par Purpose:
19* =============
20*>
21*> \verbatim
22*>
23*> LSAME returns .TRUE. if CA is the same letter as CB regardless of
24*> case.
25*> \endverbatim
26*
27* Arguments:
28* ==========
29*
30*> \param[in] CA
31*> \verbatim
32*> CA is CHARACTER*1
33*> \endverbatim
34*>
35*> \param[in] CB
36*> \verbatim
37*> CB is CHARACTER*1
38*> CA and CB specify the single characters to be compared.
39*> \endverbatim
40*
41* Authors:
42* ========
43*
44*> \author Univ. of Tennessee
45*> \author Univ. of California Berkeley
46*> \author Univ. of Colorado Denver
47*> \author NAG Ltd.
48*
49*> \ingroup aux_blas
50*
51* =====================================================================
52 LOGICAL FUNCTION lsame(CA,CB)
53*
54* -- Reference BLAS level1 routine --
55* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
56* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
57*
58* .. Scalar Arguments ..
59 CHARACTER ca,cb
60* ..
61*
62* =====================================================================
63*
64* .. Intrinsic Functions ..
65 INTRINSIC ichar
66* ..
67* .. Local Scalars ..
68 INTEGER inta,intb,zcode
69* ..
70*
71* Test if the characters are equal
72*
73 lsame = ca .EQ. cb
74 IF (lsame) RETURN
75*
76* Now test for equivalence if both characters are alphabetic.
77*
78 zcode = ichar('z')
79*
80* Use 'Z' rather than 'A' so that ASCII can be detected on Prime
81* machines, on which ICHAR returns a value with bit 8 set.
82* ICHAR('A') on Prime machines returns 193 which is the same as
83* ICHAR('A') on an EBCDIC machine.
84*
85 INTA = ICHAR(CA)
86 INTB = ICHAR(CB)
87*
88.EQ..OR..EQ. IF (ZCODE90 ZCODE122) THEN
89*
90* ASCII is assumed - ZCODE is the ASCII code of either lower or
91* upper case 'Z'.
92*
93.GE..AND..LE. IF (INTA97 INTA122) INTA = INTA - 32
94.GE..AND..LE. IF (INTB97 INTB122) INTB = INTB - 32
95*
96.EQ..OR..EQ. ELSE IF (ZCODE233 ZCODE169) THEN
97*
98* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or
99* upper case 'Z'.
100*
101.GE..AND..LE..OR. IF (INTA129 INTA137
102.GE..AND..LE..OR. + INTA145 INTA153
103.GE..AND..LE. + INTA162 INTA169) INTA = INTA + 64
104.GE..AND..LE..OR. IF (INTB129 INTB137
105.GE..AND..LE..OR. + INTB145 INTB153
106.GE..AND..LE. + INTB162 INTB169) INTB = INTB + 64
107*
108.EQ..OR..EQ. ELSE IF (ZCODE218 ZCODE250) THEN
109*
110* ASCII is assumed, on Prime machines - ZCODE is the ASCII code
111* plus 128 of either lower or upper case 'Z'.
112*
113.GE..AND..LE. IF (INTA225 INTA250) INTA = INTA - 32
114.GE..AND..LE. IF (INTB225 INTB250) INTB = INTB - 32
115 END IF
116.EQ. LSAME = INTA INTB
117*
118* RETURN
119*
120* End of LSAME
121*
122 END
logical function lsame(ca, cb)
LSAME
Definition lsame.f:53