
G
‐
MAS
–
Gold
Maestro
Software
User’s
Manual
Software
User
Manual
XXXXXXXXXXXX(0.01)
3
‐
33
We
recommend
using
global
variables,
although
it
should
be
done
with
care,
as
it
enables
access
to
these
variables
anywhere
within
the
application
code,
avoiding
the
need
for
multiple
arguments
for
each
function.
After
all
the
global
variables
are
defined,
the
main()
function
appears.
Please
note
the
comments
header
above
the
main()
function,
as
well
as
above
any
other
function
in
the
code.
It
provides
details
about
the
function,
such
as
version,
inputs/outputs,
description,
etc.
The
main()
function
is
of
type
"int"
(although
in
this
example,
has
no
value
to
return)
as
the
Eclipse
compiler
asks
for
this
function
type.
The
main()
function
is
as
simple
as
it
appears
in
the
flow
charts
above:
Initialization,
Execution
of
machine
sequences
and
Closing.
Note
the
format
of
the
comments,
as
the
same
format
is
used
throughout
the
Sample
project
code.