Sha256: bea0ac72b9e6efc8f9e02ed29e4c2ccff5961922b75fe57f2ad3db2eaa4268ab

Contents?: true

Size: 2 KB

Versions: 14

Compression:

Stored size: 2 KB

Contents

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>extend_sign (Integer)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre>     <span class="ruby-comment cmt"># File lib/ruby-vpi/integer.rb, line 120</span>
120:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extend_sign</span> <span class="ruby-identifier">aOrigWidth</span>, <span class="ruby-identifier">aExtWidth</span>
121:     <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">self</span>
122:     <span class="ruby-identifier">maskWidth</span> = <span class="ruby-identifier">aExtWidth</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">aOrigWidth</span>
123: 
124:     <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">maskWidth</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">result</span>[<span class="ruby-identifier">aOrigWidth</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
125:       <span class="ruby-identifier">result</span> <span class="ruby-operator">|=</span> (<span class="ruby-identifier">maskWidth</span>.<span class="ruby-identifier">to_mask</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">aOrigWidth</span>)
126:     <span class="ruby-keyword kw">end</span>
127: 
128:     <span class="ruby-identifier">result</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">aExtWidth</span>.<span class="ruby-identifier">to_mask</span>
129:   <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby-vpi-12.0.1 ref/ruby/classes/Integer.src/M000024.html
ruby-vpi-11.1.0 ref/ruby/classes/Integer.src/M000024.html
ruby-vpi-12.0.0 ref/ruby/classes/Integer.src/M000024.html
ruby-vpi-11.1.1 ref/ruby/classes/Integer.src/M000024.html
ruby-vpi-12.0.2 ref/ruby/classes/Integer.src/M000024.html
ruby-vpi-13.0.0 ref/ruby/classes/Integer.src/M000020.html
ruby-vpi-12.1.0 ref/ruby/classes/Integer.src/M000024.html
ruby-vpi-14.0.0 ref/ruby/classes/Integer.src/M000020.html
ruby-vpi-15.0.1 ref/ruby/classes/Integer.src/M000020.html
ruby-vpi-15.0.2 ref/ruby/classes/Integer.src/M000020.html
ruby-vpi-15.0.0 ref/ruby/classes/Integer.src/M000020.html
ruby-vpi-8.1.0 ref/ruby/classes/Integer.src/M000022.html
ruby-vpi-8.2.0 ref/ruby/classes/Integer.src/M000023.html
ruby-vpi-9.0.0 ref/ruby/classes/Integer.src/M000024.html