Connect Float output to Float input causes an error
As pointed out by Jacques, in the problems panel we can see what has caused this issue. I highlighted this in red.



What I needed to do was to use another socket on the subprogram and loop input nodes, I have also highlighted these in red on the node tree.



Finally here is what the node tree produces, nothing spectacular but at least I'm learning how to use the amazing Animation Nodes addon.