Language Reference
Conditionals
Branch logic using readable if and otherwise statements.
Conditional verbs
- Use
if,else if,otherwise. - Combine checks with
and,or. - Use natural comparisons.
Basic branching
Use natural language comparisons to drive the branch logic.
conditionals.pln
if score is greater than 90 then do
print "Excellent"
set grade to "A"
else if score is greater than 80 then do
print "Good"
set grade to "B"
otherwise do
print "Keep going"
set grade to "C"
Comparisons and checks
Use readable comparisons that map cleanly to Python operators.
isandis equal tofor equality checks.is greater thanoris less thanfor numeric comparisons.is emptyfor empty values, lists, or strings.starts withandends withfor string prefixes.
Compound logic
Use and and or to combine multiple checks in one line.
compound.pln
if status is "active" and score is greater than 50 then do
print "Approved"
if name starts with "vip" or role is "admin" then do
print "Priority access"