LAPACK
3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
lsamen.f
Go to the documentation of this file.
1
*> \brief \b LSAMEN
2
*
3
* =========== DOCUMENTATION ===========
4
*
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
7
*
8
*> Download LSAMEN + dependencies
9
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/lsamen.f">
10
*> [TGZ]</a>
11
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/lsamen.f">
12
*> [ZIP]</a>
13
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/lsamen.f">
14
*> [TXT]</a>
15
*
16
* Definition:
17
* ===========
18
*
19
* LOGICAL FUNCTION LSAMEN( N, CA, CB )
20
*
21
* .. Scalar Arguments ..
22
* CHARACTER*( * ) CA, CB
23
* INTEGER N
24
* ..
25
*
26
*
27
*> \par Purpose:
28
* =============
29
*>
30
*> \verbatim
31
*>
32
*> LSAMEN tests if the first N letters of CA are the same as the
33
*> first N letters of CB, regardless of case.
34
*> LSAMEN returns .TRUE. if CA and CB are equivalent except for case
35
*> and .FALSE. otherwise. LSAMEN also returns .FALSE. if LEN( CA )
36
*> or LEN( CB ) is less than N.
37
*> \endverbatim
38
*
39
* Arguments:
40
* ==========
41
*
42
*> \param[in] N
43
*> \verbatim
44
*> N is INTEGER
45
*> The number of characters in CA and CB to be compared.
46
*> \endverbatim
47
*>
48
*> \param[in] CA
49
*> \verbatim
50
*> CA is CHARACTER*(*)
51
*> \endverbatim
52
*>
53
*> \param[in] CB
54
*> \verbatim
55
*> CB is CHARACTER*(*)
56
*> CA and CB specify two character strings of length at least N.
57
*> Only the first N characters of each string will be accessed.
58
*> \endverbatim
59
*
60
* Authors:
61
* ========
62
*
63
*> \author Univ. of Tennessee
64
*> \author Univ. of California Berkeley
65
*> \author Univ. of Colorado Denver
66
*> \author NAG Ltd.
67
*
68
*> \ingroup lsamen
69
*
70
* =====================================================================
71
LOGICAL
FUNCTION
lsamen
( N, CA, CB )
72
*
73
* -- LAPACK auxiliary routine --
74
* -- LAPACK is a software package provided by Univ. of Tennessee, --
75
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
76
*
77
* .. Scalar Arguments ..
78
CHARACTER*( * )
ca, cb
79
INTEGER
n
80
* ..
81
*
82
* =====================================================================
83
*
84
* .. Local Scalars ..
85
INTEGER
i
86
* ..
87
* .. External Functions ..
88
LOGICAL
lsame
89
EXTERNAL
lsame
90
* ..
91
* .. Intrinsic Functions ..
92
INTRINSIC
len
93
* ..
94
* .. Executable Statements ..
95
*
96
lsamen
= .false.
97
IF
( len( ca ).LT.n .OR. len( cb ).LT.n )
98
$
GO TO
20
99
*
100
* Do for each character in the two strings.
101
*
102
DO
10 i = 1, n
103
*
104
* Test if the characters are equal using LSAME.
105
*
106
IF
( .NOT.
lsame
( ca( i: i ), cb( i: i ) ) )
107
$
GO TO
20
108
*
109
10
CONTINUE
110
lsamen
= .true.
111
*
112
20
CONTINUE
113
RETURN
114
*
115
* End of LSAMEN
116
*
117
END
lsame
logical function lsame(ca, cb)
LSAME
Definition
lsame.f:48
lsamen
logical function lsamen(n, ca, cb)
LSAMEN
Definition
lsamen.f:72
SRC
lsamen.f
Generated on Mon Jan 20 2025 17:18:11 for LAPACK by
1.11.0