gt6 := (StrToInt(edit6.text) >= 6); // gt6 is a boolean variable Shape1.visible := gt6; Label1.caption.visible := gt6; Shape2.visible := (not gt6); Label2.caption.visible := (not gt6);
Shape1.visible := (StrToInt(edit6.text) >= 6); Label1.visible := Shape1.visible; Shape2.visible := not Shape1.visible; Label2.visible := not Shape1.visible;
procedure TForm1.Button1Click(Sender: TObject);begin Media := StrToFloat(Bim1.Text)+StrToFloat(Bim2.Text)+StrToFloat(Bim3.Text)+StrToFloat(Bim4.Text)*3; Answermedia := (Media)/6 ; Mfinal.Text := FloatToStr(Answermedia); If StrToInt(Mfinal.text) >= 6 then Image1.Visible:= True; L1.Visible:= True; L2.Visible := True ; Image2.Visible:= False; L3.Visible := False; L4.Visible:= False; If StrToInt(Mfinal.text) <= 6 then Image1.Visible:= False; L1.Visible:= False; L2.Visible := False ; Image2.Visible:= True; L3.Visible := True; L4.Visible:= True;end;
if a<b then begin DoSomething1; DoSomething1;end else begin DoSomething3;end;
if a<b then begin DoSomething1;DoSomething1;end else begin DoSomething3;end;