SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ lsamen()

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

Definition at line 1456 of file pblastst.f.

1457*
1458* -- LAPACK auxiliary routine (version 2.1) --
1459* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
1460* Courant Institute, Argonne National Lab, and Rice University
1461* September 30, 1994
1462*
1463* .. Scalar Arguments ..
1464 CHARACTER*( * ) CA, CB
1465 INTEGER N
1466* ..
1467*
1468* Purpose
1469* =======
1470*
1471* LSAMEN tests if the first N letters of CA are the same as the
1472* first N letters of CB, regardless of case.
1473* LSAMEN returns .TRUE. if CA and CB are equivalent except for case
1474* and .FALSE. otherwise. LSAMEN also returns .FALSE. if LEN( CA )
1475* or LEN( CB ) is less than N.
1476*
1477* Arguments
1478* =========
1479*
1480* N (input) INTEGER
1481* The number of characters in CA and CB to be compared.
1482*
1483* CA (input) CHARACTER*(*)
1484* CB (input) CHARACTER*(*)
1485* CA and CB specify two character strings of length at least N.
1486* Only the first N characters of each string will be accessed.
1487*
1488* =====================================================================
1489*
1490* .. Local Scalars ..
1491 INTEGER I
1492* ..
1493* .. External Functions ..
1494 LOGICAL LSAME
1495 EXTERNAL lsame
1496* ..
1497* .. Intrinsic Functions ..
1498 INTRINSIC len
1499* ..
1500* .. Executable Statements ..
1501*
1502 lsamen = .false.
1503 IF( len( ca ).LT.n .OR. len( cb ).LT.n )
1504 $ GO TO 20
1505*
1506* Do for each character in the two strings.
1507*
1508 DO 10 i = 1, n
1509*
1510* Test if the characters are equal using LSAME.
1511*
1512 IF( .NOT.lsame( ca( i: i ), cb( i: i ) ) )
1513 $ GO TO 20
1514*
1515 10 CONTINUE
1516 lsamen = .true.
1517*
1518 20 CONTINUE
1519 RETURN
1520*
1521* End of LSAMEN
1522*
logical function lsamen(n, ca, cb)
Definition pblastst.f:1457
logical function lsame(ca, cb)
Definition tools.f:1724
Here is the call graph for this function:
Here is the caller graph for this function: