# permutation

The keyword is only used in conjunction with template definition. It denotes the inside matching mechanism where the incoming field contains exactly those elements that appear in the value list of permutation but in any order. It is applicable inside of record of templates or template fields only (i.e. within the pair of {}-s of the record of).

Related keyword:

- template

### permutation(value_list)

- value_list is a comma separated list containing all the values that are permitted for the concerned field.

Example:

`type record of integer ROI; template ROI tr_OneTwoThree := { permutation ( 1, 2, 3 ) };`

Template tr_OneTwoThree matches all three integers long ROI values that contain the numbers one, two and three in any order.
These is a total of 3! = 6 different matching value lists:

`{ 1, 2, 3 }
{ 1, 3, 2 }
{ 2, 1, 3 }
{ 2, 3, 1 }
{ 3, 1, 2 }
{ 3, 2, 1 }`

BNF definition of permutation