org: call set_init_state() in tut22
* doc/org/tut22.org: Here.
This commit is contained in:
parent
34ac6f08cc
commit
dcd21aaabf
1 changed files with 6 additions and 0 deletions
|
|
@ -36,6 +36,9 @@ This example demonstrates how to create an automaton and then print it.
|
||||||
|
|
||||||
// States are numbered from 0.
|
// States are numbered from 0.
|
||||||
aut->new_states(3);
|
aut->new_states(3);
|
||||||
|
// The default initial state is 0, but it is always better to
|
||||||
|
// specify it explicitely.
|
||||||
|
aut->set_init_state(0U);
|
||||||
|
|
||||||
// new_edge() takes 3 mandatory parameters: source state,
|
// new_edge() takes 3 mandatory parameters: source state,
|
||||||
// destination state, and label. A last optional parameter can be
|
// destination state, and label. A last optional parameter can be
|
||||||
|
|
@ -95,6 +98,9 @@ State: 2
|
||||||
|
|
||||||
# States are numbered from 0.
|
# States are numbered from 0.
|
||||||
aut.new_states(3)
|
aut.new_states(3)
|
||||||
|
# The default initial state is 0, but it is always better to
|
||||||
|
# specify it explicitely.
|
||||||
|
aut.set_init_state(0)
|
||||||
|
|
||||||
# new_edge() takes 3 mandatory parameters: source state, destination state, and
|
# new_edge() takes 3 mandatory parameters: source state, destination state, and
|
||||||
# label. A last optional parameter can be used to specify membership to
|
# label. A last optional parameter can be used to specify membership to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue