summary refs log blame commit diff stats
path: root/tests/varres/tvartup.nim
blob: a8f15b232f691d5a9704829401fd552fa74cacfd (plain) (tree)
1
2
3
4
5
6
7
8
9
           

               



                                            
 
                          
              
discard """
  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