PHP كود :
try
if StrToInt(Edit1.Text) >255 then Edit1.Font.Color:=clRed else Edit1.Font.Color:=clGreen;
if StrToInt(Edit1.Text) in [0..127] then
Caption:= 'Classe A';
if StrToInt(Edit1.Text) in [128..191] then
Caption:= 'Classe B';
if StrToInt(Edit1.Text) in [192..223] then
Caption:= 'Classe C';
if StrToInt(Edit1.Text) in [224..239] then
Caption:= 'Classe D';
if StrToInt(Edit1.Text) in [240..255] then
Caption:= 'Classe E';
except
end;

