# generate permutations

Hi all!
If someone knows how to generate permutations on different kind of objects... OK, the name for it is not "permutations", but I don't know how to name it in English.
For example, I have 2 objects: bool and int. Let us assume that bool can be one of 2 values: {true, false}, int can be one of 3 values: {0,1,2}.
So the permutations that I have to obtain are:

true, 0
true, 1
true, 2
false, 0
false, 1
false, 2

Thank you!

• : Hi all!
: If someone knows how to generate permutations on different kind of
: objects... OK, the name for it is not "permutations", but I don't
: know how to name it in English.
: For example, I have 2 objects: bool and int. Let us assume that bool
: can be one of 2 values: {true, false}, int can be one of 3 values:
: {0,1,2}.
: So the permutations that I have to obtain are:
:
: true, 0
: true, 1
: true, 2
: false, 0
: false, 1
: false, 2
:
:
: Thank you!
:
Here's the pseudocode for this:
[code]
for (i = false to true)
for (j = 0 to 2)
Set object (i, j)
endfor
endfor
[/code]