Created
January 19, 2015 00:46
-
-
Save honewatson/a6565f3d06cc5abe3f03 to your computer and use it in GitHub Desktop.
Table example ( nimlang, nimrod, nim lang)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tables, hashes | |
echo "Not ordered table" | |
var t = {"key1": "value1", "key2":"computer blue", "key3": "value2"}.newTable | |
t.add("blue", "b") | |
echo t["blue"] | |
for x, y in t: | |
echo x, y | |
echo "Ordered table" | |
var n = {"key1": "value1", "key2":"computer blue", "key3": "value2"}.newOrderedTable | |
n.add("blue", "b") | |
for x, y in n: | |
echo x, y |
ynfle
commented
Jun 22, 2020
•
At last, after one year, when i temporarily quit Nim programming, i got the answer. Thanks. :)
No problem.
If you are looking for practice exercises and some mentoring for Nim, check out Exercism.io
Wow ! That's great. Will check soon. Thanks for the guidance.
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment