# valueof

The operation belongs to the family of predefined functions operating on templates. It allows to convert a sending template into a value. The returned value can be saved into a variable of the same type as the type of the template.

- Permitted for specific value (sending) templates only, i.e., each field of the template shall resolve to a single value.

Related keyword:

- template

### valueof ( template_instance)

- The valueof keyword introduces the operation.

- template_instance is a (sending) template which should be converted to a value.

Example 1

type record TandemType {
integer field1,
boolean field2
};
template TandemType t_SetupTemplate := {
field1 := 1,
field2 := true
};
var TandemType v_RecipeValue := valueof( t_SetupTemplate);

The field1 of v_RecipeValue will have the value 1, whereas field2 will equal to true.

BNF definition of valueof