with (reserved word)

Language:
Русский
English

 with (reserved word)


The with statement is a shorthand method for referencing the fields of a record.

Syntax:

   with var, var, ... var do statement

Remarks

Within the statement after do, the fields of one or more record variables can be accessed using only their field identifiers.

Example

 { "with" statement }
   with Date[I] do
   begin
     month := 1;
     year  := year + 1;
   end;

This is equivalent to:

   Date[I].month := 1;
   Date[I].year  := Date[I].year + 1;

Тэги: with
| G+
Код для вставки: :: :: :: ::
Поделиться: // //