[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about "set" variables
From: |
Marcus G. Daniels |
Subject: |
Re: about "set" variables |
Date: |
19 Sep 2000 10:28:06 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
SG> I have searched the files of Heatbugs to find the role played by "i"
SG> and "o" but cannot see one.
In a setter method, as you show, the intent is to take the argument
and use it to change the state of the heatbug. So, "i" and "o" are
values passed-in to set the state of the heatbug, i.e. the instance variables
"idealTemperature" and "outputHeat".
In some cases, you might have a setter method that took one argument
and set several things based on that argument. In other cases, you
might have several arguments, which you would validate somehow, and
use it to set just one instance variable.
In a header (.h file), these names have no functional
significance; they are just names that can be used to suggest the use
of the argument.
In the implementation (.m file), the argument to a method needs to
have a different name from instance variables.
==================================
Swarm-Modelling is for discussion of Simulation and Modelling techniques
esp. using Swarm. For list administration needs (esp. [un]subscribing),
please send a message to <address@hidden> with "help" in the
body of the message.
==================================