On Friday, 16 October 2020 at 19:55:53 UTC, wilcro wrote:
Evidently, I am misunderstanding something very elemental here; thanks for any enlightenment regarding this.

Inside a function things happen in order, top to bottom, including declarations (you can only access local variables after they are declared, and nested functions work like local variables).

In a declaration, order is less important.

For recursive nested functions it can sometimes help to put a declaration inside a function:

void main() {
  // order matters here, in function
   struct Holder {
       // order doesn't matter in here, in decl
  // order matters again since functions run in sequence

Reply via email to