Wiki source code of Function Ordering Example
Last modified by chrisby on 2024/03/04 20:47
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.5 | 1 | Say `func_1` is called first, so it is at the top. Next is `func_2`. Since `func_4` is called before `func_3`, the definition of `func_4` is above the definition of `func_3`. |
| |
1.2 | 2 | |
| |
1.1 | 3 | ``` |
| 4 | func_1() { | ||
| 5 | func_2() | ||
| 6 | func_3() | ||
| 7 | } | ||
| 8 | |||
| 9 | func_2() { | ||
| 10 | func_4 | ||
| |
1.2 | 11 | ... |
| |
1.1 | 12 | } |
| 13 | |||
| 14 | func_4() { | ||
| 15 | ... | ||
| 16 | } | ||
| 17 | |||
| 18 | func_3(){ | ||
| 19 | ... | ||
| 20 | } | ||
| 21 | ``` |