ez=.testclass~new /* Creates a new instance of Testclass */
/* Creates and starts message mymsg to send SHOWMSG to ez */
mymsg=ez~start("SHOWMSG","Hello, Ollie!",5)
/* Continue with main processing while SHOWMSG runs concurrently */
do 5
say "Hello, Stan!"
end
/* Get final result of the SHOWMSG method from the mymsg message object */
say mymsg~result
say "Goodbye, Stan..."
exit
::class testclass public /* Directive defines Testclass */
::method showmsg /* Directive creates new method SHOWMSG */
use arg text,reps /* class Testclass */
do reps
say text
end
reply "Bye Bye, Ollie..."
return