Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
Cezary Drożak edited this page May 28, 2021 · 6 revisions

« Introduction · Pointer »

Pepe can take input and output as a number or string. It can also take multiple inputs by repeating same commands. You must remember that Pepe stores everything as a number, so characters are stored as their Unicode code-points.

Taking input

There are few commands for taking input in Pepe:

  • EEE - Auto-parse input.
  • EEe - Parse input as string.
  • EeE - Parse input as integer.
  • Eee - Parse input as float.

EEe will take all characters in the input as their respective code-points in Unicode.

  • Examples: Try it!
    • Given abc, it will push three numbers to the end of the stack: 97, 98, 99.
    • Given 123 it will push 49, 50, 51.

Eee will try to parse the input as a number with optional floating point. For example, given 123 it will push 123 and given 123.456 it will push 123.456. If the input isn't a valid number, it will push 0 instead. In such situation, the command would be annotated # Input isn't a number, push 0 instead in the debugger. Try it!

EeE is similar to Eee, but if it is a float, it will round it. Try it!

EEE is combination of the commands Eee and EEe. It will try to parse the input as an a floating point number, but if it's not valid, it will push it as string instead, like EEe. Try it!

The input can be split, default is ;. You can change the separation character or by clicking the text box below the input.

Giving output

There are four commands for outputting the result:

  • eEE - Output as number.
  • eEe - Output as character.
  • eeE - Output newline (\n).
  • eee - Output WS content as string without popping.

The first two commands, eEE and eEe will remove a single item from the stack and output it.

  • eEE will output as numbers, 123 -> 123, a -> 97.
  • eEe will output as character, 123 -> {, } -> }

These commands will automatically remove the item from the stack. If you still need it, prepend the full command name with r (preserve flag), so for example reEE would be rreEE.

The next two commands are to make it easier to output.

  • eeE will output a line break.
  • eee will output the content of the stack as characters.
    • Given the stack is [97,98,99], it will output abc.
    • Unlike the single-item output commands, eee won't remove anything from the stack.

« Introduction · Pointer »

Clone this wiki locally