Hi.

When trying to compilke this code:

{...}
8.if (a == 0) && (b == 0)
9.       then do
10.             nr1 <- read (prompt "enter 1. number: ")
11.             nr2 <- read (prompt "enter 2. number: ")
12.       else do
13.            let nr1 = a
14.                nr2 = b
{...}

The compiler tells me thats there's an error on line 10:
"The last statement in a 'do' construct mesy be an expression"

Could you tell me how to change it so that the "declaration" of the
first nr1 and nr2 is still in the "then" block.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to