Get Function Example

Details

Action

Sends a message to an Object in the MathScript Object hierarchy to get the value of one of its instance variables. Objects communicate with one another by sending messages. Each message is a request that the recipient of the message implement one of its methods. If an object, say MyObject, has an instance variable named Myvar, then a method named Myvar for accessing (reading) that variable is automatically created. The way to read the current value

of Myvar is to send the message:

Get( MyObject, Myvar)

Usually this is done in a statement like:

Make foo Get( MyObject, Myvar);

the recipient is MyObject, and the Message is Myvar (the name of a method). The
Send Command and the Get Function are the only ways to send messages in MathScript.