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

◆ lsame()

logical function lsame ( character  ca,
character  cb 
)

Definition at line 1369 of file pblastst.f.

1370*
1371* -- LAPACK auxiliary routine (version 2.1) --
1372* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
1373* Courant Institute, Argonne National Lab, and Rice University
1374* September 30, 1994
1375*
1376* .. Scalar Arguments ..
1377 CHARACTER CA, CB
1378* ..
1379*
1380* Purpose
1381* =======
1382*
1383* LSAME returns .TRUE. if CA is the same letter as CB regardless of
1384* case.
1385*
1386* Arguments
1387* =========
1388*
1389* CA (input) CHARACTER*1
1390* CB (input) CHARACTER*1
1391* CA and CB specify the single characters to be compared.
1392*
1393* =====================================================================
1394*
1395* .. Intrinsic Functions ..
1396 INTRINSIC ichar
1397* ..
1398* .. Local Scalars ..
1399 INTEGER INTA, INTB, ZCODE
1400* ..
1401* .. Executable Statements ..
1402*
1403* Test if the characters are equal
1404*
1405 lsame = ca.EQ.cb
1406 IF( lsame )
1407 $ RETURN
1408*
1409* Now test for equivalence if both characters are alphabetic.
1410*
1411 zcode = ichar( 'Z' )
1412*
1413* Use 'Z' rather than 'A' so that ASCII can be detected on Prime
1414* machines, on which ICHAR returns a value with bit 8 set.
1415* ICHAR('A') on Prime machines returns 193 which is the same as
1416* ICHAR('A') on an EBCDIC machine.
1417*
1418 inta = ichar( ca )
1419 intb = ichar( cb )
1420*
1421 IF( zcode.EQ.90 .OR. zcode.EQ.122 ) THEN
1422*
1423* ASCII is assumed - ZCODE is the ASCII code of either lower or
1424* upper case 'Z'.
1425*
1426 IF( inta.GE.97 .AND. inta.LE.122 ) inta = inta - 32
1427 IF( intb.GE.97 .AND. intb.LE.122 ) intb = intb - 32
1428*
1429 ELSE IF( zcode.EQ.233 .OR. zcode.EQ.169 ) THEN
1430*
1431* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or
1432* upper case 'Z'.
1433*
1434 IF( inta.GE.129 .AND. inta.LE.137 .OR.
1435 $ inta.GE.145 .AND. inta.LE.153 .OR.
1436 $ inta.GE.162 .AND. inta.LE.169 ) inta = inta + 64
1437 IF( intb.GE.129 .AND. intb.LE.137 .OR.
1438 $ intb.GE.145 .AND. intb.LE.153 .OR.
1439 $ intb.GE.162 .AND. intb.LE.169 ) intb = intb + 64
1440*
1441 ELSE IF( zcode.EQ.218 .OR. zcode.EQ.250 ) THEN
1442*
1443* ASCII is assumed, on Prime machines - ZCODE is the ASCII code
1444* plus 128 of either lower or upper case 'Z'.
1445*
1446 IF( inta.GE.225 .AND. inta.LE.250 ) inta = inta - 32
1447 IF( intb.GE.225 .AND. intb.LE.250 ) intb = intb - 32
1448 END IF
1449 lsame = inta.EQ.intb
1450*
1451* RETURN
1452*
1453* End of LSAME
1454*
logical function lsame(ca, cb)
Definition tools.f:1724
Here is the call graph for this function: