open System
let answer_to_life = 42;
let mutable count = 0; //Loop Counter
while count < 5 do
begin
let input = Console.ReadLine(); //ERROR OCCURS HERE
let intInput = Convert.ToInt32(input);
if intInput <> 42 then Console.WriteLine(intInput) else Console.WriteLine()
count <- count + 1
end
done
4 Replies - 2956 Views - Last Post: 24 February 2012 - 03:19 PM
#1
Block Following let is unfinished expect an Expression
Posted 23 February 2012 - 02:32 PM
I'm trying an SPOJ Problem with the ID Test however I need F# Syntax help
Replies To: Block Following let is unfinished expect an Expression
#2
Re: Block Following let is unfinished expect an Expression
Posted 23 February 2012 - 02:45 PM
It'a usually related to indenting issues, the indentation is similar to Python's
Parent
Child_1
Child_2
Child_1
Parent
#3
Re: Block Following let is unfinished expect an Expression
Posted 23 February 2012 - 03:13 PM
In this case the error is that you indented the whole contents of the file (except the first line) by 4 spaces. If you remove those, it will compile fine.
#4
Re: Block Following let is unfinished expect an Expression
Posted 24 February 2012 - 02:44 PM
So if I remove the indentation from the first 2 lets it should compile is that what you're saying?
#5
Re: Block Following let is unfinished expect an Expression
Posted 24 February 2012 - 03:19 PM
If you remove 4 spaces of indentation from every line, it will work.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|