implemented case expressions

This commit is contained in:
Zahary Karadjov
2012-10-01 23:48:37 +03:00
parent 92f70b08f9
commit 770d4a997e
8 changed files with 137 additions and 24 deletions

View File

@@ -2116,7 +2116,7 @@ proc `/`*(x, y: int): float {.inline, noSideEffect.} =
## integer division that results in a float.
result = toFloat(x) / toFloat(y)
template `-|`(b, s: expr): expr =
template `-|`*(b, s: expr): expr =
(if b >= 0: b else: s.len + b)
proc `[]`*(s: string, x: TSlice[int]): string {.inline.} =