Call an object method: Difference between revisions

Latitude language added
(Latitude language added)
Line 692:
Hello static world!
</pre>
 
=={{header|Latitude}}==
 
In Latitude, everything is an object. Being prototype-oriented, Latitude does not distinguish between classes and instances. Calling a method on either a class or an instance is done by simple juxtaposition.
<lang latitude>myObject someMethod (arg1, arg2, arg3).
MyClass someMethod (arg1, arg2, arg3).</lang>
The parentheses on the argument list may be omitted if there is at most one argument and the parse is unambiguous.
<lang latitude>myObject someMethod "string constant argument".
myObject someMethod (argument). ;; Parentheses are necessary here
myObject someMethod. ;; No arguments</lang>
Finally, a colon may be used instead of parentheses, in which case the rest of the line is considered to be the argument list.
<lang latitude>myObject someMethod: arg1, arg2, arg3.</lang>
 
=={{header|LFE}}==
37

edits