Hey, New here and I got a quick question
I'm trying to figure out the if then else case. I get the error message:
unit1.pas(50,36) Error: Incompatible types: got "Constant String" expected "Real"
unit1.pas(57,4) Fatal: Syntax error, ";" expected but "." found
Sorry if this is relay easy but like I said I'm new and trying to figure this out
So what I'm trying to do is when the amount that is entered in the top is above 200, it will give you a discount of 4% and the extras shipping cost will be clear, but if it's above 200 then there will be a 20 dollar shipping fee.
Sorry for it being in German..
//Eingabe
RBestellBetrag:=strtofloat(EBestellBetrag.text);
//Rechnen
begin
if RBestellBetrag<200 then
RVersandpauschale:=20
else
RVersandpauschale:='';
RRabatt:=4;
end;
RGesamt:=(RBestellBetrag+RVersandpauschale)*0.96;
//Ausgabe
EGesamt.text:=floattostr(RGesamt);