Si mal no recuerdo lo lei en StackOverflow. Pero seamos sinceros, el with lo usamos porque a veces tenemos declaradas variables (bueno mas que variables, componentes) asi:
Código Delphi
[-]
Tabla_Registro_Historico_Ventas: TADOQuery;
..
procedure HacerAlgoConLaTabla;
begin
if not(Tabla_Registro_Historico_Ventas.Active) then
Tabla_Registro_Historico_Ventas.Open;
Tabla_Registro_Historico_Ventas.Edit;
Tabla_Registro_Historico_Ventas.FieldByName('Apellidos_Y_Nombres_Cliente').AsString :=
Tabla_Registro_Historico_Ventas.FieldByName('Apellido').AsString + ', ' +
Tabla_Registro_Historico_Ventas.FieldByName('Nombres').AsString
Tabla_Registro_Historico_Ventas.Post;
end;
procedure MasFacil;
var
t: TADOQuery;
begin
t := Tabla_Registro_Historico_Ventas;
if not(t .Active) then
t .Open;
t .Edit;
t .FieldByName('Apellidos_Y_Nombres_Cliente').AsString := t .FieldByName('Apellidos').AsString + ', ' + t.FieldByName('Nombres').AsString
t .Post;
end;