Работа со наредба за избор од две можности - IF

По поставување на еден Edit1, еден Button1  и две Label1 и Label2
Потоа на двоен клик на  Button1 се впишува следиот код:

   

    if (edit1.Text<>'') then
    if (strtofloat(edit1.Text)<=0) then
        begin
            Label1.Caption:=floattostr(sqr(strtofloat(edit1.Text)));
            label1.Visible:=true;
            label2.Visible:=false;
        end
    else
        begin
            Label2.Caption:=floattostr(sqrt(strtofloat(edit1.Text)));
            label2.Visible:=true;
            label1.Visible:=false;
    end
end;