Opened 14 years ago
Last modified 13 years ago
#1707 closed defect
type mismatch — at Initial Version
| Reported by: | mohamed | Owned by: | mohamed |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.9.0 |
| Component: | Frontend | Version: | |
| Keywords: | Cc: | mohamed |
Description
Have you any idea how can I solve this problem,
model tableau
String tab[8];
equation
tab=getVariableNameTable(2,8);
end tableau;
*************
function getVariableNameTable
extends modelInExpressionBase;
public
input Integer indexModel ;
input Integer dim;
output String variableNameTable[dim] ;
algorithm
if indexModel == 1 then // model1
variableNameTable[1:size(model2,1)] := model1[:];
elseif indexModel == 2 then // model2
variableNameTable [1:size(model2,1)]:= model2[:];
end if;
end getVariableNameTable;
********************************************
record modelInExpressionBase
public
final constant String model1[8] = {"a", "b", "c", "d", "e", "f", "g","h"};
final constant String model2[8] = {"a", "b", "c", "d", "e", "f", "g", "i"};
end modelInExpressionBase;
********************************************
Error: Type mismatch in assignment in variableNameTable[{1,2,3,4,5,6,7,8}] := {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\"} of String[dim] := String[8]
Error:
Error occurred while flattening model tableau
Thank you in advance,
Best regards,
Note:
See TracTickets
for help on using tickets.
