tvartup.nim 212 B

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