Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Statement expected, but expression of type 'Integer' found

98 views
Skip to first unread message

namco

unread,
Jul 1, 2008, 2:25:29 AM7/1/08
to
here is my code i do not know what it means and where i went wrong
i keep getting the above error message


procedure TForm3.btnYearMarkClick(Sender: TObject);
var
bestMark : integer ;
begin

sedOne.Enabled := false ;
sedTwo.Enabled := false ;
sedThree.Enabled := false ;
sedFour.Enabled := false ;
sedFive.Enabled := false;
sedSix.Enabled := false;
total1 := sedOne.Value + sedTwo.Value + sedFour.Value ;
total2 := sedThree.Value;sedFive.Value + sedSix.Value ;
YearMark := total1 + total2 ;
finalMark := YearMark/10;

bestMark := sedThree.Value;
if bestMark < sedFive.Value then
bestMark := sedFive.Value
else if bestMark < sedSix.Value then
bestMark := sedSix.Value;

lblYearMark.Caption := 'Sum is ' + intToStr(YearMark) + ' Best is ' +
intToStr(bestMark) + ' The year mark is ' + intToStr(finalMark) ;

--- posted by geoForum on http://delphi.newswhat.com

Bob Swart

unread,
Jul 1, 2008, 3:52:22 AM7/1/08
to
Hi namco,

> total2 := sedThree.Value;sedFive.Value + sedSix.Value ;

Change the first ; into a + here (look closely)

Groetjes,
Bob Swart

--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux)
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml

0 new messages