Call an object method: Difference between revisions

Content added Content deleted
No edit summary
Line 1,193: Line 1,193:
(define timer (new timer%))
(define timer (new timer%))
(send timer start 100)</lang>
(send timer start 100)</lang>

=={{header|Ring}}==
<lang ring>
new point { print() }
Class Point
x = 10 y = 20 z = 30
func print see x + nl + y + nl + z + nl
</lang>
<lang ring>
o1 = new System.output.console
o1.print("Hello World")

Package System.Output
Class Console
Func Print cText
see cText + nl
</lang>


=={{header|Ruby}}==
=={{header|Ruby}}==