Files
Nim/tests/varres/tvartup.nim
2015-10-15 16:04:53 +03:00

14 lines
212 B
Nim

discard """
file: "tvartup.nim"
output: "2 3"
"""
# Test the new tuple unpacking
proc divmod(a, b: int): tuple[di, mo: int] =
return (a div b, a mod b)
var (x, y) = divmod(15, 6)
echo x, " ", y
#OUT 2 3