Skip to content

Instruction 5004 NREPEAT

HoverCatz edited this page Mar 8, 2024 · 1 revision

This will REPEAT the previous N instructions, once.


Example N: ${\space\color{#947cdd}2\color{white}\space}$

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: ${[\space\color{#947cdd}'OwO\space '\color{white},\space\color{#947cdd}'Hello\space '\space\color{white}, \space\color{#947cdd}'World'\color{white}\space, \space\color{#947cdd}'Hello\space '\space\color{white}, \space\color{#947cdd}'World'\color{white}\space]}$

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' ]
Clone this wiki locally