4.3 Labels
Labels are the targets of Goto instructions and the various branching instructions (such as IfErrors, MessageBox, IfFileExists, and StrCmp). Labels must be within a Section or a Function. Labels are local in scope, meaning they are only accessible from within the Section or Function that they reside in. To declare a label, simply use:
标签是
Goto指令和各种分支指令(如IfErrors、MessageBox、IfFileExists和StrCmp)的目标。标签必须在Section或Function中。标签在作用域中是局部的,这意味着它们只能从它们所在的Section或Function中访问。
MyLabel:
Labels cannot begin with a -, +, !, $, or 0-9. When specifying labels for the various instructions that require them, remember that both an empty string ("") and 0 both represent the next instruction (meaning no Goto will occur). Labels beginning with a period (.) are global, meaning you can jump to them from any function or section (though you cannot jump to an uninstall global label from the installer, and vice versa).
当为需要标签的各种指令指定标签时,记住空字符串("")和0都表示下一条指令(意味着不会发生Goto)。以句点(
.)开头的标签是全局的,这意味着你可以从任何函数或部分跳转到它们(尽管你不能从安装程序跳转到卸载全局标签,反之亦然)。