|
Oktatás * Programozás 1 * Szkriptnyelvek Teaching • Programming 1 (BI) Félévek Linkek * kalendárium |
Nim2 /
Ignore the return valueproc twice(n: int): int = echo "# twice() is called" return 2 * n twice(8) # ERROR: you do nothing with the return value discard twice(8) # OK If you have a function that returns a value, then you must do something with the returned value. If you do not need the return value, you must express it explicitly with the Missing bodyIf you want to leave the body of a precudure empty, in order to avoid a syntax error, you can use
|
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |
||||