Prev | Current Page 178 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

At
some point, this thread will yield the execution spotlight to the next thread so it can do its stuff, then that
one will yield to the next thread, and so on. All these instructions are processed so fast, that the machine
gives the appearance that these processes are happening simultaneously, even though they ??™ re not.
80
Part I: The Core Language
The same can be said of your applications. When you wish to perform a number of processes in your
application on groups of data, the application must perform these processes on each item of data, one at
a time, not on the group as a whole. To do this, the application iterates over each item so that as one item
has finished being processed, the code will move to the next item in the group and re - perform the same
logic. The iteration will then usually cease once all items have been processed.
Iteration is performed with the help of loops. The loops provide a way to repeat a chunk of code a
certain number of times, though usually with differing values each time.


Pages:
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190