The arrays are num_joints+1 in size, but the loops only initialise
num_joints members.  The extra code initialises some of the last element.

That's what the code does, but doesn't explain why it does and what the
extra array element is used for.

On Sat, Sep 15, 2018 at 9:01 PM, andy pugh <bodge...@gmail.com> wrote:

> https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/
> usr_intf/halui.cc#L1512
>
> There seems to be two loops to initialise the axis and joint jogging.
> Then for some reason the "top" element of each array is re-initialised
> along with the singleton items.
>
> Is this an error, or am I missing something about array initialisation in
> C++?
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1916
>
>
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to