Function Ordering Example

Version 1.4 by chrisby on 2023/12/06 09:18

Say func_1 is called first, so it is at the top. Next is func_2. Since func_4 is called before func_3, so its definition is above the definition of func_3.

func_1() {
  func_2()
  func_3()
}

func_2() {
  func_4
  ...
}

func_4() {
  ...
}

func_3(){
  ...
}