Docs(manual): add clarification for default params (#18522)

* Docs(manual): add clarification for default params

* Docs(manual): fix wording to refer to call time

* Docs(manual): Clarify default parameter wording

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
This commit is contained in:
ynfle 2021-07-19 13:44:06 +03:00 • committed by GitHub
commit 1e7a10001a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3543,7 +3543,8 @@ separation of types and subsequent identifiers more distinct.
proc foo(a; b: int; c, d: bool): int proc foo(a; b: int; c, d: bool): int
A parameter may be declared with a default value which is used if the caller A parameter may be declared with a default value which is used if the caller
does not provide a value for the argument. does not provide a value for the argument. The value will be reevaluated
every time the function is called.
.. code-block:: nim .. code-block:: nim
# b is optional with 47 as its default value # b is optional with 47 as its default value