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 1687 of file pblastim.f.

1688*
1689* -- LAPACK auxiliary routine (version 2.1) --
1690* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
1691* Courant Institute, Argonne National Lab, and Rice University
1692* September 30, 1994
1693*
1694* .. Scalar Arguments ..
1695 CHARACTER*( * ) CA, CB
1696 INTEGER N
1697* ..
1698*
1699* Purpose
1700* =======
1701*
1702* LSAMEN tests if the first N letters of CA are the same as the
1703* first N letters of CB, regardless of case.
1704* LSAMEN returns .TRUE. if CA and CB are equivalent except for case
1705* and .FALSE. otherwise. LSAMEN also returns .FALSE. if LEN( CA )
1706* or LEN( CB ) is less than N.
1707*
1708* Arguments
1709* =========
1710*
1711* N (input) INTEGER
1712* The number of characters in CA and CB to be compared.
1713*
1714* CA (input) CHARACTER*(*)
1715* CB (input) CHARACTER*(*)
1716* CA and CB specify two character strings of length at least N.
1717* Only the first N characters of each string will be accessed.
1718*
1719* =====================================================================
1720*
1721* .. Local Scalars ..
1722 INTEGER I
1723* ..
1724* .. External Functions ..
1725 LOGICAL LSAME
1726 EXTERNAL lsame
1727* ..
1728* .. Intrinsic Functions ..
1729 INTRINSIC len
1730* ..
1731* .. Executable Statements ..
1732*
1733 lsamen = .false.
1734 IF( len( ca ).LT.n .OR. len( cb ).LT.n )
1735 $ GO TO 20
1736*
1737* Do for each character in the two strings.
1738*
1739 DO 10 i = 1, n
1740*
1741* Test if the characters are equal using LSAME.
1742*
1743 IF( .NOT.lsame( ca( i: i ), cb( i: i ) ) )
1744 $ GO TO 20
1745*
1746 10 CONTINUE
1747 lsamen = .true.
1748*
1749 20 CONTINUE
1750 RETURN
1751*
1752* End of LSAMEN
1753*
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: