From a8303679960a13aa9ddd1f2fa44c2e4f9a12f071 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf <andreas@andreas-desktop> Date: Tue, 5 Jan 2010 00:34:15 +0100 Subject: further development of httpserver --- tests/tfinally.nim | 2 +- tests/tmatrix.nim | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 tests/tmatrix.nim (limited to 'tests') diff --git a/tests/tfinally.nim b/tests/tfinally.nim index 102444e82..df6397125 100755 --- a/tests/tfinally.nim +++ b/tests/tfinally.nim @@ -6,5 +6,5 @@ proc main: int = finally: echo "came here" -echo main() +discard main() #OUT came here diff --git a/tests/tmatrix.nim b/tests/tmatrix.nim old mode 100644 new mode 100755 index a64ac0395..a162d0f10 --- a/tests/tmatrix.nim +++ b/tests/tmatrix.nim @@ -21,18 +21,18 @@ proc `[,]`*(m: TMatrix, x, y: int): float {.inline.} = proc `[,]=`*(m: var TMatrix, x, y: int, val: float) {.inline.} = m.data[x|y] = val -proc `[$..$, $..$]`*(m: TMatrix, a, b, c, d: int): TMatrix = +proc `[$ .. $, $ .. $]`*(m: TMatrix, a, b, c, d: int): TMatrix = result = createMatrix(b-a+1, d-c+1) for x in a..b: for y in c..d: result[x-a, y-c] = m[x, y] -proc `[$..$, $..$]=`*(m: var TMatrix, a, b, c, d: int, val: float) = +proc `[$ .. $, $ .. $]=`*(m: var TMatrix, a, b, c, d: int, val: float) = for x in a..b: for y in c..d: m[x, y] = val -proc `[$..$, $..$]=`*(m: var TMatrix, a, b, c, d: int, val: TMatrix) = +proc `[$ .. $, $ .. $]=`*(m: var TMatrix, a, b, c, d: int, val: TMatrix) = assert val.width == b-a+1 assert val.height == d-c+1 for x in a..b: @@ -57,4 +57,4 @@ for i in 0..w-1: m[i, i] = 1.0 for i in 0..w-1: - stdout.write(m[i,i]) #OUT 1.01.01.0 + stdout.write(m[i,i]) #OUT 111 -- cgit 1.4.1-2-gfad0