Commit message (Expand) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | better getTempDir (#16914) | flywind | 2021-02-15 | 1 | -14/+47 | |
* | Better error message for rand(153 .. 102) (#17031) | Dominik Picheta | 2021-02-15 | 1 | -1/+1 | |
* | Improve the heapqueue module (#17034) | konsumlamm | 2021-02-15 | 1 | -55/+82 | |
* | Fix bug in removeDotSegments when path ends with dot (#17038) [backport:1.2] | Benoit Favre | 2021-02-15 | 1 | -1/+1 | |
* | fix the wrong examples (#17035) | flywind | 2021-02-15 | 1 | -19/+42 | |
* | fix #16978 unittest js foreign exception (#16998) | Timothee Cour | 2021-02-13 | 1 | -3/+8 | |
* | tables module uses runnableExamples (#16994) | flywind | 2021-02-13 | 3 | -335/+312 | |
* | Make parseopt available on all backends (#17009) | hlaaftana | 2021-02-13 | 1 | -137/+148 | |
* | Improve math module (#17019) | konsumlamm | 2021-02-12 | 1 | -496/+425 | |
* | Improve documentation for random (#17015) | konsumlamm | 2021-02-12 | 1 | -185/+168 | |
* | add system random to stdlib: std/sysrand (#16459) | flywind | 2021-02-11 | 1 | -0/+1 | |
* | Improve documentation for cstrutils (#17004) | konsumlamm | 2021-02-10 | 1 | -19/+23 | |
* | Improve documentation for unidecode (#16986) | konsumlamm | 2021-02-09 | 2 | -26/+28 | |
* | final SSL changes [backport:1.2] (#16983) | Andreas Rumpf | 2021-02-09 | 2 | -8/+23 | |
* | uri module uses runnableExamples (#16982) | flywind | 2021-02-09 | 1 | -50/+43 | |
* | fix #16967 [backport:1.2] (#16976) | hlaaftana | 2021-02-09 | 1 | -1/+1 | |
* | fix lists docs regression (#16981) | flywind | 2021-02-09 | 1 | -21/+14 | |
* | Another typo corrected (#16974) | Héctor M. Monacci | 2021-02-08 | 1 | -1/+1 | |
* | Refactoring `bitops.rotateLeftBits()` and `bitops.rotateRightBits()`; adding ... | rockcavera | 2021-02-08 | 1 | -65/+223 | |
* | std/lists: Various changes to `lists` (RFC #303) (#16536) | Peter Salvi | 2021-02-08 | 1 | -142/+244 | |
* | Correct typo (#16972) | Héctor M. Monacci | 2021-02-08 | 1 | -1/+1 | |
* | basic cleanups regarding SSL handling (#16940) [backport:1.0] | Andreas Rumpf | 2021-02-08 | 3 | -17/+58 | |
* | fix some warnings (#16952) | flywind | 2021-02-08 | 16 | -98/+98 | |
* | close #15767 (#16959) | flywind | 2021-02-08 | 1 | -1/+8 | |
* | use typeof instead type (#16962) | flywind | 2021-023bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */discard """
output: '''@[11, 12, 13]
@[11, 12, 13]
@[1, 3, 5]
@[1, 3, 5]
gppcbs
gppcbs
fpqeew
fpqeew
[11, 12, 13]
[11, 12, 13]
[11, 12, 13]
[11, 12, 13]
11 12 13
[11,12,13]
<Students>
<Student Name="Aprilfoo" />
<Student Name="bar" />
</Students>'''
"""
block:
var xs = @[1,2,3]
for x in xs.mitems:
x += 10
echo xs
block:
var xs = [1,2,3]
for x in xs.mitems:
x += 10
echo(@xs)
block:
var xs = @[1,2,3]
for i, x in xs.mpairs:
x += i
echo xs
block:
var xs = [1,2,3]
for i, x in xs.mpairs:
x += i
echo(@xs)
block:
var x = "foobar"
for c in x.mitems:
inc c
echo x
block:
var x = "foobar"
var y = cast[cstring](addr x[0])
for c in y.mitems:
inc c
echo x
block:
var x = "foobar"
for i, c in x.mpairs:
inc c, i
echo x
block:
var x = "foobar"
var y = cast[cstring](addr x[0])
for i, c in y.mpairs:
inc c, i
echo x
import lists
block:
var sl = initSinglyLinkedList[int]()
sl.prepend(3)
sl.prepend(2)
sl.prepend(1)
for x in sl.mitems:
x += 10
echo sl
block:
var sl = initDoublyLinkedList[int]()
sl.append(1)
sl.append(2)
sl.append(3)
for x in sl.mitems:
x += 10
echo sl
block:
var sl = initDoublyLinkedRing[int]()
sl.append(1)
sl.append(2)
sl.append(3)
for x in sl.mitems:
x += 10
echo sl
import deques
block:
var q = initDeque[int]()
q.addLast(1)
q.addLast(2)
q.addLast(3)
for x in q.mitems:
x += 10
echo q
import json
block:
var j = parseJson """{"key1": 1, "key2": 2, "key3": 3}"""
for key,val in j.pairs:
val.num += 10
echo j["key1"], " ", j["key2"], " ", j["key3"]
block:
var j = parseJson """[1, 2, 3]"""
for x in j.mitems:
x.num += 10
echo j
import xmltree, xmlparser, streams, strtabs
block:
var d = parseXml(newStringStream """<Students>
<Student Name="April" Gender="F" DateOfBirth="1989-01-02" />
<Student Name="Bob" Gender="M" DateOfBirth="1990-03-04" />
</Students>""")
for x in d.mitems:
x = <>Student(Name=x.attrs["Name"] & "foo")
d[1].attrs["Name"] = "bar"
echo d
|