All phrases
Every wording Plain understands, with an example you can run. Type a word to find a phrase.
Core steps
set NAME to VALUEKeeps a value under a name. Lists and records are copied.
set score to 0STEP and call it NAMEKeeps what a step gives back under a name.
ask "Your name?" and call it nameif CHECKTakes the steps under it only when the check is yes.
if score is more than 10otherwise if CHECKAnother check, tried when the ones above weren't yes.
otherwise if score is 10otherwiseThe steps to take when none of the checks above were yes.
otherwiserepeat N timesTakes the steps under it N times. Also: repeat once, repeat twice.
repeat 3 timesrepeat foreverRepeats until you leave with "stop repeating" or end with "stop the program".
repeat foreverrepeat until CHECKTakes the steps, then checks. Stops once the check is yes.
repeat until guess is secretrepeat while CHECKChecks first, and takes the steps while the check is yes.
repeat while lives is more than 0repeat for each NAME in LISTTakes the steps once for each item of the list.
repeat for each sale in salesrepeat for each NAME from A to BCounts up from A to B. Write "down to" to count down.
repeat for each n from 1 to 10stop repeatingLeaves the repeat it's in.
stop repeatingskip to the next roundGoes straight to the next round of the repeat.
skip to the next roundstop the programEnds the program now.
stop the programhow to WORDS (NAME)Makes a step of your own. Words in brackets are values you hand in.
how to greet (person)give back VALUEEnds your own step and hands back a value.
give back totaltryTakes the steps under it. If one has a problem, Plain goes to "if that fails".
tryif that failsThe steps to take when a step under "try" had a problem. "the problem" says what went wrong.
if that failsthe problemInside "if that fails", the message about what went wrong.
show "Plain couldn't do it: {the problem}"
Numbers and text
N% of VALUEA part of a value, like 15% of a bill. "N percent of VALUE" works too.
show 15% of 80VALUE roundedRounds to a whole number. Halves go up.
show 6.5 roundedVALUE rounded to NUMBER [decimal] place|placesRounds to that many decimal places. Halves go up.
You can also write: VALUE rounded to NUMBER decimal|decimals
show 6.375 rounded to 2 placesVALUE rounded downRounds down to a whole number.
show 7.9 rounded downVALUE rounded upRounds up to a whole number.
show 7.1 rounded upVALUE as a numberTurns text like "42" into the number 42.
show "42" as a numberVALUE as textTurns any value into text, the way "show" would show it.
show 42 as textthe length of TEXTHow many characters, counting spaces and punctuation.
show the length of "hello"TEXT in uppercaseThe same text in capital letters.
You can also write: TEXT in capitals
show "hello" in uppercaseTEXT in lowercaseThe same text in small letters.
show "HELLO" in lowercasethe words of TEXTA list of the words in the text.
show the words of "one two three"the lines of TEXTA list with one item for each line of the text.
show the lines of storythe characters of TEXTEvery character in the text: letters, digits, spaces and punctuation.
show the characters of "abc"TEXT split by TEXTSplits the text into a list wherever the separator appears.
show "a,b,c" split by ","LIST joined with TEXTJoins the items of a list into one text, with the separator between them.
show colors joined with " - "replace TEXT with TEXT in NAMEChanges every match in the text kept under that name. Capitals must match exactly.
replace "cat" with "dog" in story
Show and ask
show VALUEShows the value on its own line. Lists show as "a, b and c", and tables as lined-up columns.
show "Hello there"ask QUESTIONShows the question and waits for an answer. An answer that looks like a number becomes one.
ask "What is your name?" and call it nameask QUESTION with choices LISTShows a numbered menu. You can type the number or the choice itself. Plain asks again if the answer is neither.
ask "Which size?" with choices "small", "medium" and "large" and call it sizewait NUMBER second|secondsPauses for that many seconds.
wait 2 secondswait NUMBER minute|minutesPauses for that many minutes.
wait 1 minutewait for enterPauses until you press Enter.
wait for enterclear the screenClears everything shown so far.
clear the screen
Time and chance
start the timerStarts the stopwatch again from 0.
start the timerthe timerSeconds since "start the timer", or since the program began, to 1 decimal place.
show the timerthe time nowThe time as text, like "14:05".
show "It is {the time now}."the date todayThe date as text, like "2026-10-23".
show "Today is {the date today}."a random number from NUMBER to NUMBERA whole number between the two numbers, both included.
You can also write: a random number between NUMBER and NUMBER
set roll to a random number from 1 to 6a random item from LISTOne item of the list, picked by chance.
show a random item from a list of "heads" and "tails"shuffle LISTPuts the list in a random order.
shuffle cards
Lists and tables
a list of LISTMakes a list. Commas and a final "and" separate the items.
set colors to a list of "red", "green" and "blue"an empty listA list with nothing in it yet.
set todos to an empty lista new recordA record with no fields yet. Add fields with: set person's name to "Ann".
set person to a new recorda copy of VALUEA separate copy, so changing one doesn't change the other.
set backup to a copy of todositem NUMBER of LISTThe item at that position. Positions start at 1.
show item 2 of colorsthe first item of LISTThe first item.
show the first item of colorsthe last item of LISTThe last item.
show the last item of colorsthe first NUMBER items of LISTThe first N items, or all of them if there are fewer.
show the first 2 items of colorsthe last NUMBER items of LISTThe last N items, or all of them if there are fewer.
show the last 2 items of colorsthe number of LISTHow many items the list has.
show the number of colorsthe total of LISTAdds up the numbers. Empty cells (nothing) are skipped.
show the total of a list of 1, 2 and 3the average of LISTThe total divided by how many numbers there are. Empty cells are skipped.
show the average of a list of 1, 2 and 3the largest of LISTThe largest number, or the last text in A to Z order.
show the largest of a list of 3, 9 and 4the smallest of LISTThe smallest number, or the first text in A to Z order.
show the smallest of a list of 3, 9 and 4the different items of LISTEach item once, in the order they first appear.
show the different items of a list of 1, 2, 2 and 3the different FIELD of TABLEEach value of one column once, in the order they first appear.
show the different categories of expensesadd VALUE to NAMEAdds a number to a number, or puts an item at the end of a list.
add 1 to scoresubtract VALUE from NAMETakes a number away from a number.
subtract 1 from livesremove item NUMBER from LISTRemoves the item at that position.
remove item 1 from todosremove VALUE from LISTRemoves the first item that matches.
remove "milk" from shoppingsort LISTSorts the list, smallest first. Text sorts A to Z, ignoring capitals.
You can also write: sort LIST smallest first
sort namessort LIST largest firstSorts the list, largest first.
sort scores largest firstsort LIST by FIELDSorts a table by one field, smallest first.
You can also write: sort LIST by FIELD smallest first
sort sales by amountsort LIST by FIELD largest firstSorts a table by one field, largest first.
sort sales by amount, largest firstreverse LISTPuts the list in the opposite order.
reverse names
Files
read FILEreads a file or web pageReads a file or a web page. A .csv file gives a table, .json gives records and lists, and anything else gives text. A web address gives the page; JSON replies become records and lists.
read "sales.csv" and call it salesread the lines of FILEreads a file or web pageReads a file (or web page) as a list with one item for each line.
read the lines of "todos.txt" and call it todossave VALUE to FILEchanges a fileReplaces the file. To .csv a table saves as rows; to .json any value saves as JSON; anything else saves as text, with a list as one item per line.
save todos to "todos.txt"add VALUE to the file FILEchanges a fileAdds one line at the end of the file, and makes the file if needed.
add "Saw a fox" to the file "diary.txt"the file FILE existsYes if the file is there, no if it isn't.
if the file "todos.txt" existsthe file FILE does not existYes if the file isn't there.
if the file "todos.txt" does not existthe files in FOLDERThe names of the files in a folder, A to Z.
show the files in "photos"rename FILE to FILEchanges a fileGives a file a new name.
rename "old.txt" to "new.txt"
The web
send VALUE to ADDRESSsends data over the internetSends records and lists as JSON, and anything else as text. The reply comes back the way "read" gives it.
send message to "https://example.com/api" and call it replythe text of PAGEThe words on a web page, without its formatting codes.
show the text of pagethe links of PAGEA list of the addresses that a web page links to.
show the links of page
Plain's special words
Plain uses these words to tell where a name ends, so they can't be part of a name:
and as by contains divided does eight eleven ends equals exists false five four from in is it its joined minus multiplied nine no not nothing of one or percent plus rounded seven six split starts ten than then three times to true twelve two where with yes zero
Other ways you can write things
Plain understands these too. Each one means exactly the same as the main wording. plain tidy changes them to the main wording for you.
SHOW "Hi"is read asshow "Hi". Capitals don't matter.Then show "Done"is read asshow "Done". Words like please, now, then and next at the start of a line are left out.show the totalis read asshow total. You can leave out a, an and the.isn'tis read asis not.bill * rateis read asbill times rate.display,load,fetch,elseandreturnare read asshow,read,read,otherwiseandgive back.if answer is "y" or "yes"is read asif answer is "y" or answer is "yes".if age is more than 12 and less than 20is read asif age is more than 12 and age is less than 20.for each sale in salesis read asrepeat for each sale in sales.$42.50is the number 42.50, and15%is 0.15.“curly quotes”from Word or Google Docs work like"straight quotes".