Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documented function return type declaration #25718 #26195

Merged
merged 2 commits into from
Feb 27, 2018

Conversation

adrianisuru
Copy link
Contributor

The Function section of the documentation now mentions return types with a helpful link to the Type Declaration section.

The Function section of the documentation now mentions return types with a helpful link to the Type Declaration section.
@JeffBezanson JeffBezanson added the docs This change adds or pertains to documentation label Feb 24, 2018
@@ -125,6 +125,18 @@ There are three possible points of return from this function, returning the valu
expressions, depending on the values of `x` and `y`. The `return` on the last line could be omitted
since it is the last expression.

A return type can also be specified in the function declaration using the `::` operator. This forces
the function to always return the specified type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually say that the return value will be converted to this type.

@JeffBezanson JeffBezanson merged commit b97d2f8 into JuliaLang:master Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants