Created
September 17, 2018 19:03
-
-
Save larytet/f2526e207aaa5175d4f7beb4dd18007f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float get(obj* v, bool* ok) { | |
float c; | |
if(v->valid) { | |
*ok = true; | |
c = v->a + v->b; | |
} | |
else { | |
*ok = false; //not ok, so don't expect anything from c | |
} | |
return c; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment