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