attributeValues

Syntax

attributeValues(obj)

Arguments

obj is a class instance.

Details

Get all attributes and corresponding values of the class instance.

Return value: A dictionary with attribute-value pairs.

Examples

class Person {
	name :: STRING
	age :: INT
	def Person(name_, age_) { 
		name = name_
		age = age_
	}
}
p1 = Person("Sam", 12)
attributeValues(p1)

/* output: 
name->Sam
age->12
*/

p2 = Person("Andy", 16)
attributeValues(p2)

/* output: 
name->Andy
age->16
*/