Using Nasal functions: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (restructure, improve, etc.)
mNo edit summary
Line 4: Line 4:


So, to put things in layman's terms, imagine your function like a recipe in a cooking book - instead of always having to write down the recipe, you just open the cooking book, "jump" to the corresponding page, "execute" the recipee and then "return" to where you left off earlier.
So, to put things in layman's terms, imagine your function like a recipe in a cooking book - instead of always having to write down the recipe, you just open the cooking book, "jump" to the corresponding page, "execute" the recipee and then "return" to where you left off earlier.
You can also image a function like your telephone's automatic redial function: You only need to specify the job once (that is, type in the number) and then you can always execute the "program" (the number) easily by calling the corresponding redial program.


Conceptually, a function works pretty much like that: it has a starting point where its instructions start, and prior to going there, it will note down where to continue afterwards - that way, it is possible to call functions in a nested fashion, i.e. in terms of our previous cooking analogy, just imagine a sophisticated meal with lots of different dishes, where each dish would be represented by a different function, and where certain steps  may use "helper function" (read: recipes).
Conceptually, a function works pretty much like that: it has a starting point where its instructions start, and prior to going there, it will note down where to continue afterwards - that way, it is possible to call functions in a nested fashion, i.e. in terms of our previous cooking analogy, just imagine a sophisticated meal with lots of different dishes, where each dish would be represented by a different function, and where certain steps  may use "helper function" (read: recipes).

Navigation menu