with...do/try...finally...end;
with <переменная> do
begin
........
end;
try
<some operators>
finally
<some operators>
end;
:)
A with statement is a shorthand for referencing the fields of a record or the fields, properties, and methods of an object. The syntax of a with statement is
with obj do statement
or
with obj1, ..., objn do statement
where obj is an expression yielding a reference to a record, object instance, class instance, interface or class type (metaclass) instance, and statement is any simple or structured statement. Within statement, you can refer to fields, properties, and methods of obj using their identifiers alone--without qualifiers.
"TRY"
when a routine acquires control of a resource, it is often important that the resource be released, regardless of whether the routine terminates normally. In these situations, you can use a try...finally statement.
The following example shows how code that opens and processes a file can ensure that the file is ultimately closed, even if an error occurs during execution.
Reset(F);
try
... // process file F
finally
CloseFile(F);
end;
В help-е вроде всё написано. :)
Неплохо бы было найти более обширную информацию ... и хотелось бы на русском
[quote=Lenfer]Неплохо бы было найти более обширную информацию ... и хотелось бы на русском[/quote]