Prev | Current Page 190 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

???
You ??™ ve already seen one of these function types in use in the form of the static main function. This
function performs the objective of entry point into your application, so it is always the first function
called. What is then called or created is the responsibility of that function. If the control of the application
is passed on to a new function or object, the flow of control will eventually return to the static main
function at some point before the application is ended. Therefore, you can originate both the necessary
starting functionality and closing functionality from this one location and guarantee that both are called
except in situations involving a system or application failure.
Class Functions
Class functions are functions that are prototyped in a class. Each function in your application will
perform a specific task, such as parsing an e - mail address or reading data from a configuration file. As
you learn in the next chapter, those functions that exist as class functions will usually perform processes
that are of some relation to the parent class.


Pages:
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202