-
Notifications
You must be signed in to change notification settings - Fork 0
Instruction 5004 NREPEAT
HoverCatz edited this page Mar 8, 2024
·
1 revision
This will REPEAT the previous N instructions, once.
Example N:
Arguments:
- N - Number (required)
Example instructions:
STRING 'OwO '
STRING 'Hello '
STRING 'World'
NREPEAT 2
OUT_ALL
In the example above, because N is 2, the repeated instructions would be the 2 last string instructions, in order.
First we add two strings, then those two gets repeated once.
Resulting stack:
Resulting output:
OwO Hello WorldHello World
In the example above, since N was 2, this happens in order:
- Stack:
[ ]
-
STRING:
'OwO '
- Stack:
[ 'OwO ' ]
-
STRING:
'Hello '
- Stack:
[ 'OwO ', 'Hello ' ]
-
STRING:
'World'
- Stack:
[ 'OwO ', 'Hello ', 'World' ]
- NREPEAT (N=2)
- Stack:
[ 'OwO ', 'Hello ', 'World', 'Hello ', 'World' ]