A test of the pressed button should be performed.
behind it is the calculation ....

case RadioGroup1.ItemIndex of 0:f:=cos(x); 1:f:=sqr(x); 2:f:=exp(x); end; if f>y then q:=f else q:=y if z>q then q:=z 

Produces an error in the string

 if f>y then q:=f else q:=y Variable f might not have been initialized 

What is the problem - I can not understand, can someone tell me.
all variables of type extended .
Delphi version 7

    1 answer 1

    This is not an error; it is a warning that the declared variable should be initialized.

    • one
      More precisely, that under certain conditions (ItemIndex is not 0, 1 or 2) the variable will not be initialized. It is better to fix it - and the compiler is calmer, and people. - alexlz