[Tutor] What is a "state variable"?
wprins at gmail.com
Thu Nov 11 23:52:00 CET 2010
On 11 November 2010 22:47, Walter Prins <wprins at gmail.com> wrote:
> Enter object orientation: If instead however, you turn those functions
> into a class, you can then instead have them all "share" the same
> variable(s) that's commonly visible to each of them due to paramter passing
> as shared "state" variables of the object they belong to, hence removing the
> need to pass the variables around all over the place.
Sorry I read my own post and the above doesn't read very well. Here's an
attempt at improving it:
Enter object orientation: If instead however, you turn those functions into
a class, you can then instead have them all "share" what would've been
paramters or globals as object-level state variables, hence removing the
need to pass parameters around all over the place.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor