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

f instead of loater #60

Open
legobit opened this issue May 5, 2016 · 0 comments
Open

f instead of loater #60

legobit opened this issue May 5, 2016 · 0 comments

Comments

@legobit
Copy link

legobit commented May 5, 2016

On the functions page things are declared as floater and then the code try to access it as the variable f.
Guess someone did some really sloppy variablename changes


import "math"

//return A+B and A*B in a single shot
func MySqrt(floater float64) (squareroot float64, ok bool){
if floater > 0 {
squareroot, ok = math.Sqrt(f), true
}
return squareroot, ok

}

import "math"

//return A+B and A*B in a single shot
func MySqrt(floater float64) (squareroot float64, ok bool) {
if floater > 0 {
squareroot, ok = math.Sqrt(f), true
}
return // Omitting the output named variables, but keeping the "return".

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant