I've got the error message "Missing operator or semicolon" on line 38 of this code:
procedure TForm1.SpinEdit1Change(Sender: TObject);
begin
case SpinEdit1.Value of
1: Label6.Caption('rok'); // line 38
end;
end;
end.
Does somebody know what I am missing? Thank you.
Caption
is a property which behaves as a variable does. You treat it as though it is a procedure (which it is not) and hence the compilation error. The parser knows that the only thing that can follow a property name is a semicolon, bracket (if the property is indexed) or an operator like:=
,+
,=
etc.This code would compile:
Perhaps that's what you meant.