"text with [a value] inside"put a value into text. A value is anything you could write after 'set x to': a name, math, count of, query. Write \[ for a real bracket
set name to "Ada" show "Hello, [name]! You have [count of messages] messages."
Every word in Common (CL), A to Z, with its one form and an example. Generated by the interpreter from its own dictionary.
Seventeen words can begin a line. Each one is a complete instruction.
show "Hello" set price to 4.5 if age is at least 18
Every other word. It never stands alone: put it after a command, or in brackets inside text.
set total to count of fruits show "Today is [today]" if email contains "@"
The one rule: a line is one command, and everything after its first word is values.
"text with [a value] inside"put a value into text. A value is anything you could write after 'set x to': a name, math, count of, query. Write \[ for a real bracket
set name to "Ada" show "Hello, [name]! You have [count of messages] messages."
add VALUE to LISTput a value at the end of a list
add "cherry" to fruits
A and Bboth must be yes
if name is not empty and age is at least 18
ask database "SQL" with VALUE, ...run a query; each ? in the SQL takes the next value safely. Gives a list of records
set posts to ask database "select * from posts where slug = ?" with slug
show code TEXTshow Common code highlighted, the way a cl-code block does, but from a value
show code example of entry
A contains Byes if text A has B inside it, or list A has item B
if email contains "@"
count of LISThow many items a list has, or letters in text
show "[count of fruits] fruits"
date of TEXTa date like 2026-10-24 written out: 24 October 2026
show "[date of today]"
day of TEXTthe day of a date as a number
show "[day of today]"
dictionaryevery word of the language as records: word, form, meaning, example
for each entry in dictionary show "<dt>[word of entry]</dt><dd>[meaning of entry]</dd>" end
TEXT is an emailyes if the text is one email address, like ada@example.com. Check a visitor's address with it before you use it
if form "email" is not an email set problem to "Please check your email address." end
endclose an if, for each, repeat, to, send email, record or text block
repeat 3 times show "hip" end
first of LIST / first N of LISTthe first item, or the first N items (or letters of text)
show first of fruits show "[first 100 of body]…"
for each NAME in LISTrun the lines below once for every item
for each fruit in fruits show "<li>[fruit]</li>" end
forget "name" / forget everythingdrop a remembered value, or all of them (sign out)
forget everything
form "field"what the visitor typed in a submitted form (POST)
set message to trim of form "message"
give VALUEinside a verb: hand this value back and finish. A verb that gives can be used wherever a value goes
to slug_of heading give replace " " with "-" in lowercase of heading end show "[slug_of title]"
go to "/page.html"send the visitor to another page and stop
go to "/thanks"
hash of TEXTa one-way scramble of a password, safe to store (PBKDF2-HMAC-SHA256)
tell database "insert into users (name, password) values (?, ?)" with name, hash of form "password"
if CONDITIONrun the lines below when the condition is yes
if age is at least 18 show "Welcome" end
include "file.html"insert another page here
include "header.html"
A is Bequal. Also: is not, is more than, is less than, is at least, is at most, is between A and B, is empty
if colour is "blue" if age is more than 12 if name is empty
item N of LISTone item by position, counting from 1; or a column by name: item "price" of lamp
show item 2 of fruits
last of LIST / last N of LISTthe last item, or the last N items (or letters of text)
show last of fruits for each post in last 3 of posts
empty lista list with nothing in it yet
set names to empty list
lowercase of TEXTthe text in small letters
set slug to lowercase of title
TEXT matches HASHyes if the text is the password behind the hash
if form "password" matches password of user remember "user" as name end
month of TEXTthe month of a date as a name
show "[month of today]"
nothe answer no
set done to no
not Aflip yes and no
if not done
nowthe date and time, like 2026-10-24 18:30
tell database "insert into log (at) values (?)" with now
number of TEXTthe text as a number, so math works on it
set qty to number of query "qty"
COLUMN of RECORDone column of a record, like name of recipe. Any column name works
show "[title of recipe]"
open database "file.db"open a SQLite file next to the page, or a Postgres server with postgres://user:password@host/dbname
open database "site.db"
A or Beither can be yes
if paid or member
otherwise [if CONDITION]what to run when the condition above was no
if paid show "Thanks" otherwise show "Pay first" end
paragraphs of TEXTa list of the paragraphs (separated by blank lines)
for each paragraph in paragraphs of body show "<p>[paragraph]</p>" end
paththe URL path, like /about. The visitor typed it, so it is made safe like query
set slug to last of split path by "/"
query "name"what the visitor typed in the URL after ?name=
set name to query "name"
show raw VALUEshow text exactly as it is, with no safety
show raw "<b>bold</b>"
set NAME to record then column: VALUE lines, then enda record of your own, like a row you made up. Read a column with 'price of lamp', change one with 'set price of lamp to 15'
set lamp to record name: "Desk lamp" price: 19 end show "[name of lamp] costs $[price of lamp]"
remember "name" as VALUEkeep a value for this visitor until they forget it (a signed cookie)
remember "user" as name
remembered "name"a value kept for this visitor, or empty text
if remembered "user" is empty go to "/login" end
repeat NUMBER times [until CONDITION]run the lines below that many times, or fewer with 'until CONDITION': stop as soon as it is yes
repeat 5 times show "★" end
replace "a" with "b" in TEXTthe text with every a changed to b
set slug to replace " " with "-" in title
reverse of LISTthe list back to front
for each post in reverse of posts
send email to "you@site.com" then subject:, body:, reply to:, from: lines, then endsend an email to an address you wrote yourself (never a visitor's). While developing it is saved in the private outbox/ folder; behind a web server it goes through sendmail. At most 3 per page and 20 an hour
send email to "owner@example.com" subject: "Message from [name]" reply to: email body: message end
set NAME to VALUEcreate or replace a variable; VALUE, VALUE makes a list. 'set COLUMN of RECORD to VALUE' changes one column
set price to 4.5
show VALUE / show ... endshow a value on the page (visitor text is made safe). On its own, show opens a block of text that runs until a line saying end
show "Hello, [name]!"
sort of LISTthe list in order (numbers by size, text A to Z)
for each name in sort of names
split TEXT by "/"a list of the pieces between each separator
set parts to split "2026-10-24" by "-"
tell database "SQL" with VALUE, ...run SQL that changes the database (insert, update, delete)
tell database "insert into notes (text) values (?)" with note
to NAME ARG ... then lines, then enddefine a verb: your own command. Call it by name with one value per ARG. Inside, 'give VALUE' hands a value back
to greet someone show "<p>Hello, [someone]!</p>" end greet "Ada"
todaythe date, like 2026-10-24
show "Today is [today]"
trim of TEXTthe text without spaces at the ends
set name to trim of form "name"
try TEXTrun text as Common in a sandbox and give back what it said. No files, database, cookies or redirects; loops stop after 20000 steps and memory at 64 MB. For practice pages
set result to try form "code"
uppercase of TEXTthe text in capitals
show "[uppercase of name]"
year of TEXTthe year of a date as a number
show "[year of today]"
yesthe answer yes
set paid to yes
for each entry in dictionary show "<h3>[word of entry]</h3>" show "<code>[form of entry]</code>" show "<p>[meaning of entry]</p>" show code example of entry end
dictionary is a list of records with the columns word, form, meaning, example and command. It is the same table that cl words prints.