Annotation of rpl/lapack/lapack/lsamen.f, revision 1.18

1.9       bertrand    1: *> \brief \b LSAMEN
                      2: *
                      3: *  =========== DOCUMENTATION ===========
                      4: *
1.15      bertrand    5: * Online html documentation available at
                      6: *            http://www.netlib.org/lapack/explore-html/
1.9       bertrand    7: *
                      8: *> \htmlonly
1.15      bertrand    9: *> Download LSAMEN + dependencies
                     10: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/lsamen.f">
                     11: *> [TGZ]</a>
                     12: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/lsamen.f">
                     13: *> [ZIP]</a>
                     14: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/lsamen.f">
1.9       bertrand   15: *> [TXT]</a>
1.15      bertrand   16: *> \endhtmlonly
1.9       bertrand   17: *
                     18: *  Definition:
                     19: *  ===========
                     20: *
                     21: *       LOGICAL          FUNCTION LSAMEN( N, CA, CB )
1.15      bertrand   22: *
1.9       bertrand   23: *       .. Scalar Arguments ..
                     24: *       CHARACTER*( * )    CA, CB
                     25: *       INTEGER            N
                     26: *       ..
1.15      bertrand   27: *
1.9       bertrand   28: *
                     29: *> \par Purpose:
                     30: *  =============
                     31: *>
                     32: *> \verbatim
                     33: *>
                     34: *> LSAMEN  tests if the first N letters of CA are the same as the
                     35: *> first N letters of CB, regardless of case.
                     36: *> LSAMEN returns .TRUE. if CA and CB are equivalent except for case
                     37: *> and .FALSE. otherwise.  LSAMEN also returns .FALSE. if LEN( CA )
                     38: *> or LEN( CB ) is less than N.
                     39: *> \endverbatim
                     40: *
                     41: *  Arguments:
                     42: *  ==========
                     43: *
                     44: *> \param[in] N
                     45: *> \verbatim
                     46: *>          N is INTEGER
                     47: *>          The number of characters in CA and CB to be compared.
                     48: *> \endverbatim
                     49: *>
                     50: *> \param[in] CA
                     51: *> \verbatim
                     52: *>          CA is CHARACTER*(*)
                     53: *> \endverbatim
                     54: *>
                     55: *> \param[in] CB
                     56: *> \verbatim
                     57: *>          CB is CHARACTER*(*)
                     58: *>          CA and CB specify two character strings of length at least N.
                     59: *>          Only the first N characters of each string will be accessed.
                     60: *> \endverbatim
                     61: *
                     62: *  Authors:
                     63: *  ========
                     64: *
1.15      bertrand   65: *> \author Univ. of Tennessee
                     66: *> \author Univ. of California Berkeley
                     67: *> \author Univ. of Colorado Denver
                     68: *> \author NAG Ltd.
1.9       bertrand   69: *
1.15      bertrand   70: *> \ingroup OTHERauxiliary
1.9       bertrand   71: *
                     72: *  =====================================================================
1.1       bertrand   73:       LOGICAL          FUNCTION LSAMEN( N, CA, CB )
                     74: *
1.18    ! bertrand   75: *  -- LAPACK auxiliary routine --
1.1       bertrand   76: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
                     77: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
                     78: *
                     79: *     .. Scalar Arguments ..
                     80:       CHARACTER*( * )    CA, CB
                     81:       INTEGER            N
                     82: *     ..
                     83: *
                     84: * =====================================================================
                     85: *
                     86: *     .. Local Scalars ..
                     87:       INTEGER            I
                     88: *     ..
                     89: *     .. External Functions ..
                     90:       LOGICAL            LSAME
                     91:       EXTERNAL           LSAME
                     92: *     ..
                     93: *     .. Intrinsic Functions ..
                     94:       INTRINSIC          LEN
                     95: *     ..
                     96: *     .. Executable Statements ..
                     97: *
                     98:       LSAMEN = .FALSE.
                     99:       IF( LEN( CA ).LT.N .OR. LEN( CB ).LT.N )
                    100:      $   GO TO 20
                    101: *
                    102: *     Do for each character in the two strings.
                    103: *
                    104:       DO 10 I = 1, N
                    105: *
                    106: *        Test if the characters are equal using LSAME.
                    107: *
                    108:          IF( .NOT.LSAME( CA( I: I ), CB( I: I ) ) )
                    109:      $      GO TO 20
                    110: *
                    111:    10 CONTINUE
                    112:       LSAMEN = .TRUE.
                    113: *
                    114:    20 CONTINUE
                    115:       RETURN
                    116: *
                    117: *     End of LSAMEN
                    118: *
                    119:       END

CVSweb interface <joel.bertrand@systella.fr>