the volume of the tank nearest to connection-post-A +
the maximum-volume-at-shutdown of the inflow-pipe connected to
the tank nearest to connection-post-A -
( 0.10 * the volume of the tank nearest to connection-post-A )
the volumeVof the tankTnearest to connection-post-A +
the maximum-volume-at-shutdown of the inflow-pipe connected toT- ( 0.10 *V)
if the temperature T1 of tank-1 > 200 and T1 < 300
then ...
the temperature of tank-1. An implicit local name must be unique to the expression in which it appears. The scope of an implicit local name is also limited to the expression in which it appears. Thus, you can use the same implicit local name in different expressions in the same rule, action, or procedure statement.
This example demonstrates how a procedure can use both explicit and implicit local names:
local-names-sample ( ) = ( )
{ C is an explicit local name. }
C : class conveyor ;
begin
for C = each conveyor upon this workspace do
{ S is an implicit local name. }
case ( the status S of C ) of
paused, stopped :
inform the operator that "Status of conveyor
[the public-name of C] is [S]." ;
end ; { case }
end { do }
end
the quantifier. When you first refer to an attribute in a rule, you must identify the item of the attribute. When you make additional references to that same attribute, however, you need not identify the item, because the item is clear from the first reference. For example, this rule uses the name of the
Temperature attribute of the Tank class as a local name:
if the temperature of tank-1 > 200 and the temperature < 300
then ...
Temperature attribute omits the reference to tank-1. G2 assumes that the reference the temperature still refers to the temperature of tank-1.