Anonymous user
Assertions: Difference between revisions
→{{header|F_Sharp|F#}}: Marked incomplete as the task asks for an assertion that an integer variable is equal to 42
(→{{header|F_Sharp|F#}}: Marked incomplete as the task asks for an assertion that an integer variable is equal to 42) |
|||
Line 161:
=={{header|F_Sharp|F#}}==
{{incomplete|F_Sharp|The task asks for an assertion that an integer variable is equal to 42.}}
F# provides an ''assert'' function that is only enabled when the program is compiled with ''DEBUG'' defined.
<lang fsharp>let f x =
assert (x > 1)
x</lang>
=={{header|Go}}==
<lang go>package main
|