lsamen.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 90 行

HTML
90
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>lsamen.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      LOGICAL          FUNCTION <a name="LSAMEN.1"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a>( N, CA, CB )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK auxiliary routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER*( * )    CA, CB
      INTEGER            N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="LSAMEN.15"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a>  tests if the first N letters of CA are the same as the
</span><span class="comment">*</span><span class="comment">  first N letters of CB, regardless of case.
</span><span class="comment">*</span><span class="comment">  <a name="LSAMEN.17"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a> returns .TRUE. if CA and CB are equivalent except for case
</span><span class="comment">*</span><span class="comment">  and .FALSE. otherwise.  <a name="LSAMEN.18"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a> also returns .FALSE. if LEN( CA )
</span><span class="comment">*</span><span class="comment">  or LEN( CB ) is less than N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of characters in CA and CB to be compared.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  CA      (input) CHARACTER*(*)
</span><span class="comment">*</span><span class="comment">  CB      (input) CHARACTER*(*)
</span><span class="comment">*</span><span class="comment">          CA and CB specify two character strings of length at least N.
</span><span class="comment">*</span><span class="comment">          Only the first N characters of each string will be accessed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      INTEGER            I
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL            <a name="LSAME.38"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL           <a name="LSAME.39"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          LEN
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span>      <a name="LSAMEN.46"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a> = .FALSE.
      IF( LEN( CA ).LT.N .OR. LEN( CB ).LT.N )
     $   GO TO 20
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Do for each character in the two strings.
</span><span class="comment">*</span><span class="comment">
</span>      DO 10 I = 1, N
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        Test if the characters are equal using <a name="LSAME.54"></a><a href="lsame.f.html#LSAME.1">LSAME</a>.
</span><span class="comment">*</span><span class="comment">
</span>         IF( .NOT.<a name="LSAME.56"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( CA( I: I ), CB( I: I ) ) )
     $      GO TO 20
<span class="comment">*</span><span class="comment">
</span>   10 CONTINUE
      <a name="LSAMEN.60"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a> = .TRUE.
<span class="comment">*</span><span class="comment">
</span>   20 CONTINUE
      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     End of <a name="LSAMEN.65"></a><a href="lsamen.f.html#LSAMEN.1">LSAMEN</a>
</span><span class="comment">*</span><span class="comment">
</span>      END

</pre>

 </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?