Type Casting [message #1292954] |
Sat, 12 April 2014 02:55  |
Eclipse User |
|
|
|
Hello.
I have a question which I think is related to type casting.
In the model space there is an entity of type Sample with a relation of type amount to an entity of type datatypes.Integer (which also exists in the model space). The following transformation rule does not work
gtrule Calculate(out A,out B)= {
precondition pattern FindSample(A,B)= {
Sample(A);
datatypes.Integer(B);
Sample.amount(X,A,B);
}
action {
let Z= 1 in seq {
update Z = 4 * value(B);
}
}
}
(Operator '*' is undefined for the argument types ('datatypes.Integer', 'datatypes.String')
In fact, I need to do some computations using the value of an entity.
Thanks for your help.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04014 seconds