diff options
author | Araq <rumpf_a@web.de> | 2014-02-02 14:34:37 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-02 14:34:37 +0100 |
commit | c30f6cfcf11cf5e61d708db476d7a6fcb62aab23 (patch) | |
tree | aa661e3fb6da6bdc03199448c7e2adc5a03783af /tests/parser/tcommand_as_expr.nim | |
parent | 7196c7637e00581f94ca9c02782f34ef7d480e2f (diff) | |
download | Nim-c30f6cfcf11cf5e61d708db476d7a6fcb62aab23.tar.gz |
cleaned up command expressions
Diffstat (limited to 'tests/parser/tcommand_as_expr.nim')
-rw-r--r-- | tests/parser/tcommand_as_expr.nim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/parser/tcommand_as_expr.nim b/tests/parser/tcommand_as_expr.nim index f6868a2fc..a9747b0ac 100644 --- a/tests/parser/tcommand_as_expr.nim +++ b/tests/parser/tcommand_as_expr.nim @@ -1,12 +1,17 @@ discard """ - output: "12" + output: '''140 +5-120''' """ +proc optarg(x:int):int = x +proc singlearg(x:int):int = 20*x +echo optarg 1, singlearg 2 + + proc foo(x: int): int = x-1 proc foo(x, y: int): int = x-y -let x = foo 7.foo, # comment here - foo(1, foo 8) -# 12 = 6 - -6 -echo x +let x = optarg foo 7.foo +let y = singlearg foo(1, foo 8) +echo x, y |