ℙ𝕖𝕡 🙴 ℕ𝕠𝕞

home | documentation | examples | translators | download | blog | all blog posts

They've got cars big as bars They've got rivers of gold But the wind goes right through you It's no place for the old The Pogues

doc/commands folder

This folder contains documentation about the commands that are available in the “Nom” language.

An index of each command and a link to it’s documentation is here

The pep interpreter will provide a list of commands with the -c switch and a short summary with the -C switch. Some of the commands below are not in the format that they would actually be used in a script. For example untiltape is actually written as:

 until;  # read input stream until workspace ends with current cell

display all valid Nom commands with "pep -c"
 pep -c

add adds a given text to the workspace buffer
clip removes one character from the end of the workspace
clop removes one character from the beginning of the workspace
clear clears the workspace
replace replace one string with another in the workspace
upper converts all characters to uppercase in the workspace
lower converts all characters to lowercase in the workspace
cap First char in workspace uppercase, the rest lowercase
print prints the workspace to stdout
pop pops from the stack to the start of the workspace
push push (*) delimited token from start of the workspace to the stack
unstack pops entire stack onto the beginning of the workspace
stack pushes entire workspace onto the stack
put puts the workspace into the current tape cell
get Appends current tape cell to the workspace
swap swaps the current tape cell and the workspace
++ increments the current tape cell by one
-- decrements the current tape cell by one
mark marks the current tape cell with the given text
go sets the tape cell pointer to the marked cell
read read a character from the input stream
until reads the input stream until the workspace ends with given text
untiltape reads the input stream until the workspace ends with tape-cell text
while reads io while peek is something
whilenot reads io while peek is not something
count appends the value of the accumulator to the workspace
a+ increments the machine accumulator by one
a- decrements the accumulator by one
zero sets the numerical accumulator to zero
chars Appends number of characters read to end of workspace buffer
lines Appends number of lines read to end of workspace buffer
nochars Sets the character counter to zero
nolines Sets the line counter to zero
escape prefixes the given character with the escape character
unescape converts chars to unescaped equivalent
echar changes the default escape character
delim changes the stack token delimited to the given character
state prints the current state of the machine.
quit immediately exits the script
write writes the workspace to default file 'sav.pp'
writefile writes the workspace to a file
appendfile appends the workspace to a given file