MCSN-project2014 / APproject

Project for the MCSN Advanced Programming Module A.Y. 2014/2015
http://mcsn-project2014.github.io/APproject/
MIT License
4 stars 0 forks source link

readln() translation #30

Closed teto1992 closed 9 years ago

teto1992 commented 9 years ago

Even for the readln() translation we need to know the type of a variable in advance, in order to convert the read string into the proper type. See @lucarin91 test file as an example.What we translate now, doesn't work:

while op <> 9 do
    value <- Console.ReadLine()

we should instead obtain something like:

while op <> 9 do
    value <- Convert.ToInt32(Console.ReadLine())

Is it possible to now the type of the variable value at the moment of the assignment, avoiding to keep a symbol table?