Is there are something like Python's 'pass' statement in Nim
Asked Answered
N

1

17

I am a newer to Nim programing language. when I use Python, I can use the 'pass' to skip the defination detail of a function and class.

def foo():
    pass # skip detail

class Bar():
    pass

Is there are something like this in Nim?

Neace answered 16/1, 2018 at 13:22 Comment(0)
T
16

discard does the same in Nim:

proc foo =
  discard # skip detail

type Bar = object

For objects it's not even necessary, but possible, to specify discard

Tramway answered 16/1, 2018 at 13:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.