Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

* Programming 1 (BI)
  ◇ exercises
  ◇ quick link

teaching assets


Félévek

* 2025/26/2
* archívum


Linkek

* kalendárium
   - munkaszüneti napok '20
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C++
* C#
* Clojure
* D lang.
* Java
* Nim
* Nim2
* Scala


[ edit | logout ]
[ sandbox | passwd ]

Optional parameters

Nim supports optional parameters, just like Python or D.

optional parameters
def hello(name="World"):
    print(f"Hello {name}!")


def main():
    hello()        # Hello World!
    hello("Laci")  # Hello Laci!
import std/strformat   # &"Hello {name}!"

proc hello(name: string = "World") =
  echo &"Hello {name}!"

proc main() =
  hello()        # Hello World!
  hello("Laci")  # Hello Laci!

Here you can find another example.

Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2026 April 04, 20:56