Union_unit

relational-functions union_unit

syntax

  • union_unit(a, b, … , n)

definition

union_unit(a, b, … , n) results in a uint32 domain-unit, based on the domain units: a, b, .., n.

The number of elements of the new domain unit is the sum of the number of elements of the domain units: a, b, .., n.

Use void as domain unit for parameters that need to be added to the resulting unit, see example 2.

description

Use the union_data function to union data items for new domain units.

The union_unit function results in a uint32 domain unit. Use a union_unit_uint8_16_32_64 function to configure a domain of another value-type.

applies to

Units a, b, .., n with value types from the group CanBeDomainUnit

example

1: union two domain units

unit<uint32> HollandCity := union_unit(NHCity, ZHCity);  Result = domain unit with 8 rows

unit<uint32> NHCity: nrofrows = 3;
unit<uint32> ZHCity: nrofrows = 5;

2: union a domain unit and a void domain (to be able to use union_data to union an attribute and a parameter)

unit<uint32> src: nrofrows = 2
{
   attribute<.> id := id(.);
}
parameter<uint32> id_param := 10;
	
unit<uint32> src_param := union_unit(src, void)
{
   attribute<uint32> id := union_data(., src/id, id_param);
}

see also