newbie help
Author |
Message |
RyanHB
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
saltpro15
![](http://compsci.ca/v3/uploads/user_avatars/9776171634ced6278d14c2.png)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
RyanHB
|
Posted: Mon May 04, 2009 7:25 pm Post subject: RE:newbie help |
|
|
Oh ok thanks:D |
|
|
|
|
![](images/spacer.gif) |
|
|