Gcode. Model. Word
(gcode v1.0.2)
Copy Markdown
A G-code word.
Summary
Functions
Initialise a word with a command and an address.
Types
@type t() :: %Gcode.Model.Word{address: Gcode.Model.Expr.t(), word: String.t()}
Functions
@spec init(String.t(), number() | Gcode.Model.Expr.t()) :: Gcode.Result.t(t())
Initialise a word with a command and an address.
Example
iex> Word.init("G", 0)
{:ok, %Word{word: "G", address: %Integer{i: 0}}}