TELITAB# returns a TeLiTab based on a list of parameters
Arguments
If you have parameter A and B and relation
C0# = TELITAB#(0, A, B)
Calculate C0# with a value for A (for instance 1) and B (for instance 2). This results for C0#:
2
"A" 1
"B" 2
Restart the calculation with ranges for A and B, A = 1(1)10 and B = 2(2)20 (say you want no matrix). This returns for C0#:
0
2 "A" "B"
"1" 1 2
"2" 2 4
"3" 3 6
"4" 4 8
"5" 5 10
"6" 6 12
"7" 7 14
"8" 8 16
"9" 9 18
"10" 10 20
If you have parameter A and B, the previous relation for C0# and relation:
C0_2#=B_OBJECT(@C0#,@A:"1", @B:"2(1)6")
Calculate C0_2#, the relation will create B_OBJECT and calculate C0# inside this object using 1 as input for A and 2 to 6 with increments of 1 as input for B. Using C0# as written above without quotes this results into the following for C0-2#:
1
"A" 1
2 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
"C0#"
{
1
"A" 1
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
}
{
1
"A" 1
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
}
{
1
"A" 1
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
}
{
1
"A" 1
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
}
{
1
"A" 1
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
}
You see that on the top level there is only one list parameter A with the value 1, and there are two table parameters B and C0#, with eacht C0# containing a list of A and a table of B.
Althought we used Mode%=0, Every case of B has its own TeLiTab C0# with the same content. This is caused by the fact that B is a muti case value in the object B_Object and the TeLiTabC0# depends on it. As a result, Quaestor concludes that each case should have its value for C0#.
To resolve this, write C0# as follows:
C0# = TELITAB#(0, "A", "B")
Carry out the same calculation. The result for C0_2# will now be:
2
"A" 1
"C0#"
{
1
"A" 1
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
}
1 "B"
"1" 2
"2" 3
"3" 4
"4" 5
"5" 6
Now you see that on the tob level there are two list parameters A and C0# (with the same content as the first example) and there is only one table parameter B. Now there is only oneTeLiTab for A and all case of B, in correspondance with the Mode% used in the syntax.
The previous relation is changed
C1# = TELITAB#(1, A, B)
Calculate C1# with a value for A (for instance 1) and B (for instance 2). This results for C0#:
2
"A" 1
"B" 2
Restart the calculation with ranges for A and B, A = 1(1)10 and B = 2(2)20 (say you want no matrix).
You will see that a TeLiTab C1# is made for every case. For instance for case 5:
2
"A" 5
"B" 10
If we do a copy to clipboard for the total solution for C1# and do a preview we get:
0
3 "A" "B"
"1" 1 2
"2" 2 4
"3" 3 6
"4" 4 8
"5" 5 10
"6" 6 12
"7" 7 14
"8" 8 16
"9" 9 18
"10" 10 20
"C1#"
{
2
"A" 1
"B" 2
}
{
2
"A" 2
"B" 4
}
{
2
"A" 3
"B" 6
}
{
2
"A" 4
"B" 8
}
{
2
"A" 5
"B" 10
}
{
2
"A" 6
"B" 12
}
{
2
"A" 7
"B" 14
}
{
2
"A" 8
"B" 16
}
{
2
"A" 9
"B" 18
}
{
2
"A" 10
"B" 20
}
Download
An example knowledgebase of this function can be downloaded [ here].
Description
The knowledge base containt the first two examples. A constraint is used to choose between the TeLiTab syntax with our without quotes around the input parameters.