Last active
December 10, 2015 22:29
-
-
Save thorade/4502548 to your computer and use it in GitHub Desktop.
just a simple function for my very first gist,what a pity one can't select Modelica as language even though it is supported by pygments
This file contains 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
function isOdd "if input value is odd return true, else false" | |
input Integer value; | |
output Boolean isOdd; | |
algorithm | |
isOdd := if mod(value, 2) <> 0 then true else false; | |
end isOdd; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment