ref/ruby/classes/String.src/M000035.html in ruby-vpi-12.0.0 vs ref/ruby/classes/String.src/M000035.html in ruby-vpi-12.0.1
- old
+ new
@@ -3,34 +3,16 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>to_f (String)</title>
+ <title>to_ruby_const_name (String)</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/float.rb, line 23</span>
-23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span> <span class="ruby-identifier">aRadix</span> = <span class="ruby-value">10</span>
-24: <span class="ruby-identifier">whole</span>, <span class="ruby-identifier">frac</span> = <span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>, <span class="ruby-value">2</span>)
-25: <span class="ruby-identifier">whole</span> = <span class="ruby-identifier">whole</span>.<span class="ruby-identifier">to_i</span>(<span class="ruby-identifier">aRadix</span>).<span class="ruby-identifier">to_f</span>
-26:
-27: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">frac</span>
-28: <span class="ruby-identifier">f</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
-29:
-30: <span class="ruby-identifier">frac</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
-31: <span class="ruby-identifier">power</span> = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">next</span>
-32: <span class="ruby-identifier">weight</span> = <span class="ruby-identifier">aRadix</span> <span class="ruby-operator">**</span> <span class="ruby-operator">-</span><span class="ruby-identifier">power</span>
-33: <span class="ruby-identifier">digit</span> = <span class="ruby-identifier">frac</span>[<span class="ruby-identifier">i</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">to_i</span>(<span class="ruby-identifier">aRadix</span>)
-34:
-35: <span class="ruby-identifier">f</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">digit</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">weight</span>
-36: <span class="ruby-keyword kw">end</span>
-37:
-38: <span class="ruby-identifier">f</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">f</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^-/</span>
-39: <span class="ruby-identifier">whole</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">f</span>
-40: <span class="ruby-keyword kw">end</span>
-41:
-42: <span class="ruby-identifier">whole</span>
-43: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/verilog_parser.rb, line 136</span>
+136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ruby_const_name</span>
+137: <span class="ruby-keyword kw">self</span>[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">upcase</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
+138: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file