<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script> </head> <body> <h1>String</h1> <p>将值转换为字符串.</p> <pre class="Syntax">StrValue := <span class="func">String</span>(Value)</pre> <h2 id="Return_Value">返回值</h2> <p>类型: <a href="../Concepts.htm#strings">字符串</a></p> <p>函数返回将值 <em>Value</em> 转换为字符串的结果, 如果是字符串, 则返回 <em>Value</em> 本身.</p> <p>如果 <em>Value</em> 是数字, 则使用<a href="../Concepts.htm#number-default-format">默认的十进制格式</a>.</p> <p>如果 <em>Value</em> 是对象, 则返回值是调用 <code>Value.ToString()</code> 的结果. 如果对象没有这样的方法, 则抛出 <a href="../objects/Error.htm#MethodError">MethodError</a>. 默认情况下该方法没有实现, 因此必须由脚本定义.</p> <h2 id="Related">相关</h2> <p><a href="Type.htm">Type</a>, <a href="Integer.htm">Integer</a>, <a href="Float.htm">Float</a>, <a href="../Concepts.htm#values">值</a>, <a href="../Language.htm#expressions">表达式</a>, <a href="Is.htm">Is 函数</a></p> </body> </html>