Computer Science Canada

newbie help

Author:  RyanHB [ Mon May 04, 2009 6:56 pm ]
Post subject:  newbie help

when i type this code:

var Name : string
var Weight : int
var numname : int
numname := 0


loop
put "Enter Name: " ..

get Name

numname := numname + 1

put "Enter Weight: " ..

get Weight





exit when numname := 10

end loop

----------

it highlights exit when numname:=10 saying exit must be boolean type.

Author:  saltpro15 [ Mon May 04, 2009 7:11 pm ]
Post subject:  RE:newbie help

a boolean value must be either true or false you want something like this

var check : boolean
if numname = 10 then
check := true
else
check := false
end if
exit when check = true

Author:  RyanHB [ Mon May 04, 2009 7:25 pm ]
Post subject:  RE:newbie help

Oh ok thanks:D


: