Difference between revisions of "Label"
								
								Jump to navigation
				Jump to search
				
				
							
								
							
		| m | |||
| Line 1: | Line 1: | ||
| − | '''Label''' is a part of almost any [[script]]. It is a sequence of characters that identifies a specific location within the script. In [[Sanny Builder]] labels are denoted with a : (colon sign) as the first character | + | '''Label''' is a part of almost any [[script]]. It is a sequence of characters that identifies a specific location within the script. In [[Sanny Builder]], labels are denoted with a <code>:</code> (colon sign) as the first character followed by letters, digits, or <code>_</code> (underscore sign). Labels are case-insensitive. | 
| − | |||
| − | |||
| Example: | Example: | ||
| − | < | + | {{Pre|class=sb-code|1= | 
| + | <span class="nl">:Label</span> | ||
| + | }} | ||
| − | Labels are widely used in scripts in [[0002|unconditional]] and [[Conditional statement|conditional]] jumps. To  | + | Labels are widely used in scripts in [[0002|unconditional]] and [[Conditional statement|conditional]] jumps. To go to a specific label, you must use its name with a <code>@</code> (at sign) as the first character. | 
| Example: | Example: | ||
| − | < | + | {{Pre|class=sb-code|1= | 
| + | 0002: <span class="k">jump</span> <span class="nl">@Label</span> | ||
| + | }} | ||
| + | |||
| + | Sanny Builder also has a feature to display a list of all labels used in source code when you type <code>@</code> into the editor. | ||
| − | + | == See also == | |
| + | * [[SCM language#Labels|Labels in the native SCM syntax]] | ||
| − | [[Category: | + | [[Category:Mission Scripting]] | 
Revision as of 03:56, 30 November 2016
Label is a part of almost any script. It is a sequence of characters that identifies a specific location within the script. In Sanny Builder, labels are denoted with a : (colon sign) as the first character followed by letters, digits, or _ (underscore sign). Labels are case-insensitive.
Example:
:Label
Labels are widely used in scripts in unconditional and conditional jumps. To go to a specific label, you must use its name with a @ (at sign) as the first character.
Example:
0002: jump @Label
Sanny Builder also has a feature to display a list of all labels used in source code when you type @ into the editor.

