Project

General

Profile

Goto » History » Revision 2

Revision 1 (Per Amundsen, 02/10/2014 10:16 PM) → Revision 2/3 (Per Amundsen, 02/10/2014 10:18 PM)

_Added in 1.9.0_ 

 */goto <label>* 

 Allows you to jump from one point in a script to another point. 

 *Parameters* 

 <label> - The label to jump to. 

 *Example* 

 <pre> 
 ; /is_even <1-9> 
 ; 
 ; Example: /is_even 2 
 ;     2 is an even number. 
 ;     2 is a prime number. 
 alias is_even { 
   /goto $1 
   :0 | echo -a You typed zero. | return 
   :4 | echo -a $1 is an even number. 
   :1 | :9 | echo -a $1 is a perfect square. | return 
   :2 | echo -a $1 is an even number. 
   :3 | :5 | :7 | echo -a $1 is a prime number. | return 
   :6 | :8 | echo -a $1 is an even number. | return 
   :error 
   /echo -a Only single-digit numbers are allowed! 
   /reseterror 
 } 
 </pre>