LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
lsamen.f
Go to the documentation of this file.
00001 *> \brief \b LSAMEN
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download LSAMEN + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/lsamen.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/lsamen.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/lsamen.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       LOGICAL          FUNCTION LSAMEN( N, CA, CB )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       CHARACTER*( * )    CA, CB
00025 *       INTEGER            N
00026 *       ..
00027 *  
00028 *
00029 *> \par Purpose:
00030 *  =============
00031 *>
00032 *> \verbatim
00033 *>
00034 *> LSAMEN  tests if the first N letters of CA are the same as the
00035 *> first N letters of CB, regardless of case.
00036 *> LSAMEN returns .TRUE. if CA and CB are equivalent except for case
00037 *> and .FALSE. otherwise.  LSAMEN also returns .FALSE. if LEN( CA )
00038 *> or LEN( CB ) is less than N.
00039 *> \endverbatim
00040 *
00041 *  Arguments:
00042 *  ==========
00043 *
00044 *> \param[in] N
00045 *> \verbatim
00046 *>          N is INTEGER
00047 *>          The number of characters in CA and CB to be compared.
00048 *> \endverbatim
00049 *>
00050 *> \param[in] CA
00051 *> \verbatim
00052 *>          CA is CHARACTER*(*)
00053 *> \endverbatim
00054 *>
00055 *> \param[in] CB
00056 *> \verbatim
00057 *>          CB is CHARACTER*(*)
00058 *>          CA and CB specify two character strings of length at least N.
00059 *>          Only the first N characters of each string will be accessed.
00060 *> \endverbatim
00061 *
00062 *  Authors:
00063 *  ========
00064 *
00065 *> \author Univ. of Tennessee 
00066 *> \author Univ. of California Berkeley 
00067 *> \author Univ. of Colorado Denver 
00068 *> \author NAG Ltd. 
00069 *
00070 *> \date November 2011
00071 *
00072 *> \ingroup auxOTHERauxiliary
00073 *
00074 *  =====================================================================
00075       LOGICAL          FUNCTION LSAMEN( N, CA, CB )
00076 *
00077 *  -- LAPACK auxiliary routine (version 3.4.0) --
00078 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00079 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00080 *     November 2011
00081 *
00082 *     .. Scalar Arguments ..
00083       CHARACTER*( * )    CA, CB
00084       INTEGER            N
00085 *     ..
00086 *
00087 * =====================================================================
00088 *
00089 *     .. Local Scalars ..
00090       INTEGER            I
00091 *     ..
00092 *     .. External Functions ..
00093       LOGICAL            LSAME
00094       EXTERNAL           LSAME
00095 *     ..
00096 *     .. Intrinsic Functions ..
00097       INTRINSIC          LEN
00098 *     ..
00099 *     .. Executable Statements ..
00100 *
00101       LSAMEN = .FALSE.
00102       IF( LEN( CA ).LT.N .OR. LEN( CB ).LT.N )
00103      $   GO TO 20
00104 *
00105 *     Do for each character in the two strings.
00106 *
00107       DO 10 I = 1, N
00108 *
00109 *        Test if the characters are equal using LSAME.
00110 *
00111          IF( .NOT.LSAME( CA( I: I ), CB( I: I ) ) )
00112      $      GO TO 20
00113 *
00114    10 CONTINUE
00115       LSAMEN = .TRUE.
00116 *
00117    20 CONTINUE
00118       RETURN
00119 *
00120 *     End of LSAMEN
00121 *
00122       END
 All Files Functions