Labeled Statement

Labels provide a name to identify and reference a statement. Labels are used by the exit statements to specify the statement to which the exit applies.

Note that all methods have an enclosing label which has the same name as the method.

Syntax

	<label> : <statement>
	

Example

	// order is a variable of type Fuego.Net.Mail
	order as Mail
	url   as String = ""
	
	mainLoop: for each mail in 
	                      MailServer(url, false).messages do
	    if mail.subject = "New Order" then
	        order = mail
	        exit : mainLoop
	    end
	end
	
	// if there is no order to process, stop method execution
	exit when order is null