get
Extract the value of field from an object.
(f)=get(m, fieldName)
Inputs
m Any object that contains accessible named fields.
fieldName The name of the field.
Outputs
f The value of the field.


Description
If the first input is a Java object, and has a public field with the same name the value of the field is returned. If the object has a public method named getFieldName (i.e. for get(m, "text") , the method getText is located) , the function returns the result of calling the method.

If the first input is a Mathnium object, the value of the field with the given name, if it exists, is returned.

If the first input is a struct array, the value of the named member, if it exists, is returned.
Example
>>import javax.swing.*
>>a=new JLabel("Name")
>>get(a,"text")
Name
>>class MClass
      >var x, y
      >function MClass(x)
      >   this.x=x;
      >   this.y=x+2;
      >end
      >end
>>o=new MClass(2)
>>get(o,"x")
         2
>>get(o,"y")
         4
>>h.x=10
>>h.y="YValue"
>>get(h,"y")
YValue
>>get(h,"x")
        10