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

◆ lsame()

logical function lsame ( character  ca,
character  cb 
)

Definition at line 1600 of file pblastim.f.

1601*
1602* -- LAPACK auxiliary routine (version 2.1) --
1603* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
1604* Courant Institute, Argonne National Lab, and Rice University
1605* September 30, 1994
1606*
1607* .. Scalar Arguments ..
1608 CHARACTER CA, CB
1609* ..
1610*
1611* Purpose
1612* =======
1613*
1614* LSAME returns .TRUE. if CA is the same letter as CB regardless of
1615* case.
1616*
1617* Arguments
1618* =========
1619*
1620* CA (input) CHARACTER*1
1621* CB (input) CHARACTER*1
1622* CA and CB specify the single characters to be compared.
1623*
1624* =====================================================================
1625*
1626* .. Intrinsic Functions ..
1627 INTRINSIC ichar
1628* ..
1629* .. Local Scalars ..
1630 INTEGER INTA, INTB, ZCODE
1631* ..
1632* .. Executable Statements ..
1633*
1634* Test if the characters are equal
1635*
1636 lsame = ca.EQ.cb
1637 IF( lsame )
1638 $ RETURN
1639*
1640* Now test for equivalence if both characters are alphabetic.
1641*
1642 zcode = ichar( 'Z' )
1643*
1644* Use 'Z' rather than 'A' so that ASCII can be detected on Prime
1645* machines, on which ICHAR returns a value with bit 8 set.
1646* ICHAR('A') on Prime machines returns 193 which is the same as
1647* ICHAR('A') on an EBCDIC machine.
1648*
1649 inta = ichar( ca )
1650 intb = ichar( cb )
1651*
1652 IF( zcode.EQ.90 .OR. zcode.EQ.122 ) THEN
1653*
1654* ASCII is assumed - ZCODE is the ASCII code of either lower or
1655* upper case 'Z'.
1656*
1657 IF( inta.GE.97 .AND. inta.LE.122 ) inta = inta - 32
1658 IF( intb.GE.97 .AND. intb.LE.122 ) intb = intb - 32
1659*
1660 ELSE IF( zcode.EQ.233 .OR. zcode.EQ.169 ) THEN
1661*
1662* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or
1663* upper case 'Z'.
1664*
1665 IF( inta.GE.129 .AND. inta.LE.137 .OR.
1666 $ inta.GE.145 .AND. inta.LE.153 .OR.
1667 $ inta.GE.162 .AND. inta.LE.169 ) inta = inta + 64
1668 IF( intb.GE.129 .AND. intb.LE.137 .OR.
1669 $ intb.GE.145 .AND. intb.LE.153 .OR.
1670 $ intb.GE.162 .AND. intb.LE.169 ) intb = intb + 64
1671*
1672 ELSE IF( zcode.EQ.218 .OR. zcode.EQ.250 ) THEN
1673*
1674* ASCII is assumed, on Prime machines - ZCODE is the ASCII code
1675* plus 128 of either lower or upper case 'Z'.
1676*
1677 IF( inta.GE.225 .AND. inta.LE.250 ) inta = inta - 32
1678 IF( intb.GE.225 .AND. intb.LE.250 ) intb = intb - 32
1679 END IF
1680 lsame = inta.EQ.intb
1681*
1682* RETURN
1683*
1684* End of LSAME
1685*
logical function lsame(ca, cb)
Definition tools.f:1724
Here is the call graph for this function: