Send an unknown method call: Difference between revisions

Added FreeBasic
No edit summary
(Added FreeBasic)
Line 213:
 
</syntaxhighlight>
 
=={{header|FreeBASIC}}==
<syntaxhighlight lang="basic">Type Example
foo As Integer Ptr
Declare Constructor (x As Integer)
End Type
 
Constructor Example(x As Integer)
This.foo = New Integer
*This.foo = 42 + x
End Constructor
 
Dim As Example result = 5
Print *result.foo
 
Sleep</syntaxhighlight>
{{out}}
<pre> 47</pre>
 
=={{header|Go}}==
2,169

edits