/* Example of exposing object variables */
myobj = .myclass~new
myobj~c
myobj~d /* Would display "Z is: 120" */
::class myclass /* The ::CLASS directive */
::method c /* The ::METHOD directive */
expose z
z = 100 /* Would assign 100 to the object variable z */
return
::method d
expose z
z=z+20 /* Would add 20 to the same object variable z */
say "Z is:" z
return
::method mymethod
expose j k c. d.
/* This exposes "J", "K", and all variables whose */
/* name starts with "C." or "D." */
c.1="7." /* This sets "C.1" in the object */
/* variable pool, even if it did not */
/* previously exist. */