From 68a7d70dc828fe14dfb909fb328cf6682251642f Mon Sep 17 00:00:00 2001 From: DiamondNether90 Date: Fri, 9 Jan 2026 08:07:25 +1100 Subject: [PATCH] Update Jump Keyword --- Jump-Keyword.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Jump-Keyword.md b/Jump-Keyword.md index 1a65552..13f9306 100644 --- a/Jump-Keyword.md +++ b/Jump-Keyword.md @@ -9,3 +9,18 @@ Time Complexity: The `jump` keyword allows you to modify the order in which commands are executed by jumping directly to a certain line of the program. ## Example usage +```grnd +jump %end # jump to @end +println "Hello!" # this appends 'Hello\n' to stdout +@end +``` +This program immediately jumps to @end, completely skipping the `println "Hello!"` statement. As a result, this program does nothing to stdout. + +We can also jump backwards and make an infinite loop. + +```grnd +@loop + # ... + jump %loop +``` +This program will run the code inserted at `# ...`, then jump back to the start of the loop. This makes the code inserted at `# ...` be repeated forever. \ No newline at end of file