Project

General

Profile

Goto » History » Version 2

Per Amundsen, 02/10/2014 10:18 PM

1 2 Per Amundsen
_Added in 1.9.0_
2
3 1 Per Amundsen
*/goto <label>*
4
5
Allows you to jump from one point in a script to another point.
6
7
*Parameters*
8
9
<label> - The label to jump to.
10
11
*Example*
12
13
<pre>
14
; /is_even <1-9>
15
;
16
; Example: /is_even 2
17
;   2 is an even number.
18
;   2 is a prime number.
19
alias is_even {
20
  /goto $1
21
  :0 | echo -a You typed zero. | return
22
  :4 | echo -a $1 is an even number.
23
  :1 | :9 | echo -a $1 is a perfect square. | return
24
  :2 | echo -a $1 is an even number.
25
  :3 | :5 | :7 | echo -a $1 is a prime number. | return
26
  :6 | :8 | echo -a $1 is an even number. | return
27
  :error
28
  /echo -a Only single-digit numbers are allowed!
29
  /reseterror
30
}
31
</pre>