add VALUE to LISTput a value at the end of a list
add "cherry" to fruits
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.
add VALUE to LISTput a value at the end of a list
add "cherry" to fruits
endclose an if, for each, repeat, to, send email, record or text block
repeat 3 times show "hip" end
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
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"
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"
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"
otherwise [if CONDITION]what to run when the condition above was no
if paid show "Thanks" otherwise show "Pay first" end
remember "name" as VALUEkeep a value for this visitor until they forget it (a signed cookie)
remember "user" as name
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
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]!"
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"
17 words shown. Show all.
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.