mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
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:
@@ -3543,7 +3543,8 @@ separation of types and subsequent identifiers more distinct.
|
||||
proc foo(a; b: int; c, d: bool): int
|
||||
|
||||
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
|
||||
# b is optional with 47 as its default value
|
||||
|
||||
Reference in New Issue
Block a user