Hola JXJ.
Sacar los ceros de la derécha:
Código Delphi
[-]
function SacaCerosDerecha(const Cad: string): string;
var
i: Integer;
begin
Result:= Cad;
i:= Length(Cad);
while (Result[i]='0') and (i > 0) do
begin
Delete(Result, i, 1);
Dec(i);
end;
end;
Llamada ejemplo:
Código Delphi
[-]
var
NroRecibido, Aux: string;
Nro: Integer;
begin
NroRecibido:= '230900000'; Aux:= SacaCerosDerecha(NroRecibido); Nro:= StrToInt(Aux) ; ...
Incorporé la variable
Aux para ampliar el ejemplo, pero se puede prescindir de ella y hacer directamente:
Código Delphi
[-]
Nro:= StrToInt(SacaCerosDerecha(NroRecibido));
Un saludo.