Reference
Appendix B: Keyword Glossary
Every reserved word in QF Code 1.1.0, in plain language, with a pointer to the chapter where it's actually taught. All keywords are case-insensitive; this book writes them lowercase throughout. Reserved words can't be used as variable, constant, or function names.
Declarations
var: Declares a variable, a named place to store a value that can change later. Chapter 2.
const: Declares a constant, a named value that can never be reassigned once set. Requires a value up front. Chapters 2 and 11.
Conditionals
if / then / else if / else / end if: Runs a block of code only when
a condition is true, with optional alternatives. end if closes the
block. Chapter 3.
Loops
while / end while: Repeats a block for as long as a condition stays true, checked before every pass. Chapter 4.
for / to / step / end for: Repeats a block a specific, counted
number of times. step optionally sets how much the counter changes
each pass; without it, the step is 1 (or -1 if counting downward).
Chapter 4.
for each / in / end for: Steps through every item in an array or string, one at a time, without managing a counter yourself. Chapters 4 and 5.
break: Exits the current loop immediately, regardless of its condition. Chapter 4.
continue: Skips the rest of the current pass through a loop and jumps to the next condition check. Chapter 4.
Branching on a Value
match / when / when else / end match: Compares one value against
several possibilities, running only the first branch that matches.
when else is an optional catch-all. Chapter 9.
to (inside match): Marks an inclusive range in a when clause,
such as when 80 to 89. Chapter 9.
Functions
function / return / end function: Declares a named, reusable block
of code. return sends a value back to whoever called it; a function
that never reaches return sends back empty automatically. Chapter
6.
Error Handling
attempt / error / end attempt: Runs a block of code that might
fail, and catches the failure instead of letting it crash the whole
program. Naming a variable after error captures the error message.
Chapter 10.
signal: Raises a runtime error on purpose, with a message you
choose, the same kind of error an attempt block can catch. Chapter
10.
Literals
true / false: The two boolean values. Chapter 2.
empty: Represents the absence of a value, QF Code's equivalent of
"nothing here." A function with no return sends back empty
automatically. Chapters 2 and 6.
Logical Operators
and: Combines two conditions; true only when both sides are true. Short-circuits, skipping the right side if the left side is already false. Chapter 3.
or: Combines two conditions; true when either side is true. Short-circuits, skipping the right side if the left side is already true. Chapter 3.
xor: True when exactly one of two conditions is true, not both and not neither. Always checks both sides. Chapter 3.
not: Reverses a boolean value: true becomes false and vice
versa. Chapter 3.
Copyright © 2026 Edison Mooers. Published by Gibidda Press. Free for personal learning and qualifying noncommercial educational use. Commercial training, organizational use, redistribution, and adaptation require written permission. Full use terms.