Jump to content

Create an object/Native demonstration: Difference between revisions

Create an object/Native demonstration in FreeBASIC
(Create an object/Native demonstration in FreeBASIC)
Line 194:
55
["a":1, "b":66]</pre>
 
=={{header|FreeBASIC}}==
FB doesn't have Dict natively, but we can implement them via Type
<lang freebasic>Type dict
m1 As String*1
m2 As Integer
End Type
 
Dim mapOf(1 To 3) As dict => {("A", 65), ("B", 66), ("C", 67)}
 
For i As Integer = 1 To Ubound(mapOf)
Print mapOf(i).m1
Print mapOf(i).m2
Next i</lang>
{{out}}
<pre>A
65
B
66
C
67</pre>
 
=={{header|Go}}==
2,136

edits

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