// Script function: Demo of class and objects.

// 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
{   

string MyName
object InitObject(object MySelf, string MyNameIsYLiao)  
{       
MyName = MyNameIsYLiao   
return MySelf   
} 

number GetIWant( object MySelf ) 
{
return 1967
} 

void PrintOutputFirst( object MySelf )  
{ 
result( MyName + " I want is " + MySelf.GetIWant() + "\n" )   
}
}
object GlobalSino = alloc(GlobalSino).InitObject("GlobalSino Object which")
GlobalSino.PrintOutputFirst()  
result( GlobalSino.ClassName( ) + "\n" )
result( GlobalSino.ParentClassName( ) + "\n\n" )

