<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1632085368384154" crossorigin="anonymous"></script><script src="https://autohotkey.top/gtag.js"></script></head> <body> <h1>IsLabel</h1> <p>如果当前作用域中存在指定的标签, 则返回非零数字.</p> <pre class="Syntax">Boolean := <span class="func">IsLabel</span>(LabelName)</pre> <h2 id="Parameters">参数</h2> <dl> <dt>LabelName</dt> <dd> <p>类型: <a href="../Concepts.htm#strings">字符串</a></p> <p><a href="../misc/Labels.htm">标签</a>的名称. 不包含末尾的冒号.</p> </dd> </dl> <h2 id="Return_Value">返回值</h2> <p>类型: <a href="../Concepts.htm#boolean">整数(布尔值)</a></p> <p>如果指定的标签在当前作用域内存在, 函数返回 1(true), 否则, 为 0(false).</p> <h2 id="Remarks">备注</h2> <p>当为 <a href="Goto.htm">Goto</a> 指定动态标签时, 此函数可以避免运行时错误.</p> <p>当从函数内部调用时, 只搜索该函数的标签. 全局标签不是局部 goto 的有效目标.</p> <h2 id="Related">相关</h2> <p><a href="../misc/Labels.htm">标签</a></p> <h2 id="Examples">示例</h2> <div class="ex" id="ExBasic"> <p><a class="ex_number" href="#ExBasic"></a> 报告 "Target label exists" , 因为子程序确实存在.</p> <pre>if IsLabel("Label") MsgBox "Target label exists" else MsgBox "Target label doesn't exist" Label: return</pre> </div> <a href="https://dftg.net">dftg</a><!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "d5a9c4fcb9b6482fa53ce820d892f969"}'></script><!-- Cloudflare Pages Analytics --><script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"rayId":"92def71fa99a98c3","version":"2025.3.0","r":1,"serverTiming":{"name":{"cfExtPri":true,"cfL4":true,"cfSpeedBrain":true,"cfCacheStatus":true}},"token":"51750bb5dc4f40cc91a5ec55c63bbc01","b":1}' crossorigin="anonymous"></script> </body> </html>