With Statement
The With statement is a convenient method for referencing elements of a complex variable, such as a record.
It simplifies the code by removing the need to prefix each referenced element with the complex variable name; i.e. accessing all of the record's fields with only one reference.
Example:
program With_Test;
type Circle_Parameters =
Record
x_center : integer;
y_center : integer;
radius : integer;
end;
var Circle : Circle_Parameters;
begin
With Circle do
begin
x_center := 50;
y_center := 60;
radius := 10;
end;
end.
Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
What do you think about this topic ? Send us feedback!



