Pattern
A pattern is the shape of a line of DynLex code. For example, print message is a
pattern. DynLex matches your code against patterns to decide what it means.
These pages use the same words in the same way. If a word feels new, come back here.
A pattern is the shape of a line of DynLex code. For example, print message is a
pattern. DynLex matches your code against patterns to decide what it means.
A parameter is a named part of a pattern. In function square value:, the word
value is a parameter.
In plain-word patterns, DynLex detects parameters by usage. If your function body uses a pattern word name, that pattern element becomes a parameter.
An argument is the real value you pass into a parameter. In square 5, the
argument is 5.
A condition is a piece of code that answers yes or no. DynLex uses conditions in places like
if and while.
A section is a block that starts with a line ending in :. The lines below it,
indented one level deeper, belong to that section.
A function is a named piece of behavior. You define it with function and call it
by writing its pattern.
A variable stores a value so you can use that value again later.
A macro is a function that uses a replacement: section. It replaces one piece of
code with another piece of code.
A class is a data shape with named members such as x and y.
A type tells DynLex what kind of value something is, such as an integer, a float, a string, or a class.
An import brings code from another file into the current file. You write it with
import.
An intrinsic is a built-in low-level operation. Most everyday DynLex code should use normal patterns from the standard library instead of writing intrinsics directly.