conclude action to change the value of that icon variable for an instance of the class whenever G2 is running. The appearance of that instance changes to reflect the new value(s). Other instances of the class are unaffected. Changes to icon variable values are permanent: resetting the KB does not reset the value.G2 performs type checking on all changes to icon variables, and signals an error if you attempt to conclude a value that is incompatible with the icon variable's usage.
width and height in an icon description are functionally icon variables already. Therefore, G2 lets you conclude values to them just as you can to icon variables that appear explicitly. This section hereafter refers to width and height as if they were ordinary icon variables. When you change icon size by concluding values into
width and height, the maximum allowable value for each dimension is 1000.
Tank specifies:
width and height of 50.
x, y, and z, whose values are all 0.
Tank named tank-1 exists, and none of these values has been changed by a conclude, the value of:
the icon-variables of tank-1
structure (width: 50, height: 50, x: 0, y: 0, z: 0)
conclude that the icon-variables of tank-1 =
structure (width:100, height: 100, x: 0, y: 50, z: 75)
tank-1's icon variables to have the values shown.
tank-1's icon variable values are:
structure (width:100, height: 100, x: 0, y: 50, z: 75)
current-icon-variables: structure;
new-icon-variables: structure;
begin
current-icon-variables = the icon-variables of tank-1;
new-icon-variables =
change-attribute (current-icon-variables, Z, 30);
conclude that the icon-variables of tank-1 = new-icon-variables; end
tank-1 being:
structure (width:100, height: 100, x: 0, y: 50, z: 30)
conclude that the icon-variables of tank-1 =
change-attribute (the icon-variables of tank-1, z, 30)
conclude that the z of the icon-variables of tank-1 = 30;
conclude action, you can conclude a structure that references only the icon variables that are to have non-default values. For example, if the
Tank class is as described under Referencing Icon Variables, and tank-2 has default values for all icon variables (width: 50, height: 50, x: 0, y: 0, z: 0), executing:
conclude that the icon-variables of tank-2 = structure ( z: 75)
tank-2's icon variables to:
structure (width: 50, height: 50, x: 0, y: 0, z: 75)
conclude that the icon-variables of tank-2 = structure ( width: 100)
tank-2 sets tank-2's icon attributes to:
structure (width: 100, height: 50, x: 0, y: 0, z: 0)
z, being unspecified in the concluded structure, has reverted from 75 to the class default value.