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
> 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