It is complaining because readln is not a constant expression that matches the case type (n is an integer), and then it is complaining that it found a semicolon after the readln() instead of a colon, as case expressions should.