This shows you the differences between two versions of the page.
Previous revision | |||
— | reference:spamrules_statement_goto [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Spam Filter Rules: Goto====== | ||
+ | ^Statement | ||
+ | ^Version | ||
+ | ^Purpose | ||
+ | The **Goto** statement requires a label name, in the format | ||
+ | Goto <label name> | ||
+ | |||
+ | Labels are single word entries that appear on a line of their own, immediately preceded by the colon (:) character. | ||
+ | The colon character is not part of the label name. | ||
+ | |||
+ | You must not create an infinite loop. | ||
+ | |||
+ | =====Examples===== | ||
+ | Basic example | ||
+ | < | ||
+ | If ${Score} >= 100 | ||
+ | Goto End | ||
+ | Endif | ||
+ | |||
+ | # Anything placed here will only run if ${Score} < 100 and "Goto End" is not executed | ||
+ | |||
+ | :End | ||
+ | </ | ||
+ | |||
+ | |||
+ | An infinite loop - you should **never** allow this to happen | ||
+ | < | ||
+ | :beginning | ||
+ | # Statements | ||
+ | Goto beginning | ||
+ | #The code will never get this far, because there is an infinite loop above | ||
+ | </ |