Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 531

If statements questions in OCaml

$
0
0

I am trying to write the following code in OCaml:

let a = 0let b = 1 if a > b then   {    print_endline "a";    print_endline "a";  }print_endline "b"

And then I encountered the following error:

File "[21]", line 4, characters 0-2:4 | if a > b then     ^^Error: Syntax error

I have tried using the begin and end keywords.


Viewing all articles
Browse latest Browse all 531

Trending Articles