Hi all,
At point 15.7 of core language (v. 4.2.1) it talks about matching mechanism
of templates. It includes arrays but I donÂ’t know if the Table 11 is ok, why
I donÂ’t understand if the inside values (AnyElements or AnyElementsOrNone)
and the length restriction can be apply to arrays of templates.
For example,
var template integer v_ta1[3]:={?,?,?}
var template integer v_ta2[3]:=?
var template integer v_ta3[3]:={*,1} Only 2 templates!!!
var integer v_a1[3]:={1,1,1}
var integer v_a2[2]:={1,1}
match(v_a1,v_ta1) --> Is it true? True for me.
match(v_a2,v_ta2) --> Is it false? False for me, because v_ta2 has
three elements and v_a2 has two elements.
match(v_a2,v_ta3) --> If it is false because the number of elements of
template is 3 and the number of elements of value v_a2 is 2, I think that an
array template canÂ’t have AnyElementsOrNone.
With arrays we know the numbers of elements, so I donÂ’t understand the use
of AnyElements or AnyElementsOrNone.
At point 15.7.4 says: “length: restrictions for string length of string
types and the number of elements for record of, set of and arrays”, but with
arrays we know the numbers of elements.
And another question is about point 15.6 “Referencing elements of templates
or template fields”. I think that is right get an element of array template,
but it isnÂ’t explained at this point. For example
var template integer v_t1:=v_ta1[0]; --> v_t1:=?
var template integer v_t2:=v_ta2[2]; --> v_t2:= what is the template
body?
And there are examples more complex according to the matching mechanism of
the array template and if we referencing elements at the left or right hand
side.
Thanks in advance.
BR,
Raúl Alfonso Quintana
MTP - Métodos y TecnologÃa
C/ Santa Leonor 65 Edificio C - Planta 4
28037 Madrid (SPAIN)
Tel.: +34 911440600
Fax: +34 913044915
<
www.mtp.es>
www.mtp.es