// Script function: Demo of class


// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html

class GlobalSino : object 
{
number a, b
string MyName

object InitObject(object myclass, string MyNameIsYliao)
{       
MyName = MyNameIsYLiao   
return myclass   
} 

number geta(object myclass)
{
return b; 
}

void setab(object myclass, number i)
{
a = i; 
b = i*i; 
result (myclass.geta())
}
}

object GlobalSino=alloc(GlobalSino).InitObject("xx")
GlobalSino.setab(3)
result ("\n")
GlobalSino.setab(0)
result ("\n\n")


