Salve a tutti!
Ho un problemino....

Voglio cancellare tutti gli spazi eventualmente immessi
dal'utente....
uso quindi DELETE ..... MA..... mi da errore..

procedure TForm1.Edit1Exit(Sender: TObject);
var
s, v : String;
j, x : integer;
begin

if Edit1.Text <> '' then begin
x := Length(Edit1.Text);
s := ' '; // s = spazio
for j := 0 to x-1 do begin
v := RightStr(Edit1.Text , 1);
if v = s then
Delete (Edit1.Text, x, 1);
x := Length(Edit1.Text);
end;

end;
end;

questo è l'errore che mi da :
[Error] Unit1.pas(181): Constant object cannot be passed as var parameter
[Fatal Error] Project1.dpr(35): Could not compile used unit 'Unit1.pas'


com'è possibile?
Forse c'è qualche errore che io non riesco a vedere..
voi magari...riuscite a vederlo?
com'è possibile che io non possa mettere una
variabile intera come indice ?
forse esiste un'altra procedura ??

Grazie a tutti,
Kate71