LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ lsamen()

logical function lsamen ( integer n,
character*( * ) ca,
character*( * ) cb )

LSAMEN

Download LSAMEN + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> LSAMEN  tests if the first N letters of CA are the same as the
!> first N letters of CB, regardless of case.
!> LSAMEN returns .TRUE. if CA and CB are equivalent except for case
!> and .FALSE. otherwise.  LSAMEN also returns .FALSE. if LEN( CA )
!> or LEN( CB ) is less than N.
!> 
Parameters
[in]N
!>          N is INTEGER
!>          The number of characters in CA and CB to be compared.
!> 
[in]CA
!>          CA is CHARACTER*(*)
!> 
[in]CB
!>          CB is CHARACTER*(*)
!>          CA and CB specify two character strings of length at least N.
!>          Only the first N characters of each string will be accessed.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 71 of file lsamen.f.

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*
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
logical function lsamen(n, ca, cb)
LSAMEN
Definition lsamen.f:72
Here is the call graph for this function:
Here is the caller graph for this function: