integer - Eiffel loop test program -


im learning eiffel language , trying basic stuff,as this:

class     application  inherit     arguments  create     make feature           make local         testvar:integer         i:integer      := 0 until     >= 10  loop     io.putstring ("input number")     io.read_integer     testvar:= io.last_integer     if         testvar>=2             io.putstring ("bigger")         i:=i+1     else         io.putstring ("smaller")         i:=i+1         io.put_integer(testvar)  end  end     

basically im testing loop wich read integers , print bigger or smaller on screen until "i" reach 10.however,this not compile,it has loop think.what doing wrong?

thank you

you missing 2 "end".you need "end" close "if", 1 close "loop", 1 close "make" routine , 1 close class "application". 4 "end" needed , have 2.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -