Opened 14 years ago
Last modified 10 years ago
#1633 new defect
Provide error message for unknown sizes in slices
| Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
|---|---|---|---|
| Priority: | high | Milestone: | Future |
| Component: | Version: | ||
| Keywords: | Cc: | Martin Sjölund, Adrian Pop |
Description
model ArrayTestModel
public
parameter Integer dimensionOne = 2;
parameter Real exampleArray[:,:] = {{0.4572,0.3556,0.2032}};
protected
function ArrayExampleFunction
input Integer dimensionOne;
input Real valuesList[:,:];
output Real outputList[dimensionOne,:];
protected
Integer listSize;
Integer aux;
algorithm
listSize:=size(valuesList, 1);
for i in 1:dimensionOne loop
aux:=min(i, listSize);
outputList[i]:=valuesList[aux]; // Type-checking should catch this; the runtime will be unable to handle such a construct
end for;
end ArrayExampleFunction;
parameter Real exampleArrayList[dimensionOne,:] = ArrayExampleFunction(dimensionOne, exampleArray);
end ArrayTestModel;
Note:
See TracTickets
for help on using tickets.
