Jump to content

Call an object method: Difference between revisions

add supercollider example
(Added Dyalect programming language)
(add supercollider example)
Line 1,663:
Dialog information: 'sorry'
]</lang>
 
=={{header|SuperCollider}}==
In SuperCollider, classes are objects. To call a class or object method, a message is passed to the class or the object instance. In the implementation, class method names are prefixed with an asterix, all other methods are instance methods.
<lang SuperCollider>
SomeClass {
*someClassMethod {
}
someInstanceMethod {
}
}
SomeClass.someClassMethod;
a = SomeClass.new;
a.someInstanceMethod;
</lang>
 
=={{header|Swift}}==
83

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.