|
I just started to learn DELPHI, and I don’t understand many questions, and I can’t solve them after all. Ask the big brothers and sisters? Ha...
I dragged several controls in Delphi. Then, in a BUTTON click event, I wrote the following:
Begin
Label1.Caption:=Concat(Edit1.text,Edit2.text);
Label2.Caption:=Delete(Label1.Caption,1,1);
End;
Celsius, prompt:
[Error] Unit1.pas(34): Constant object cannot be passed as var parameter
I then changed it to:
var
S:string;
begin
Label1.Caption:=Concat(Edit1.text,Edit2.text);
S:=label1.Caption;
Label2.Caption:=Delete(S,1,1);
end;
The result is:
[Error] Unit1.pas(35): Incompatible types:'String' and'procedure, untyped pointer or untyped parameter'
Dare to ask everyone, what does this mean? |
|