Opened 14 years ago
Last modified 14 years ago
#1392 closed defect (worksforme)
Functions with inputs and outputs in protected section gives no error.
Reported by: | Peter Aronsson | Owned by: | Peter Aronsson |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Peter Aronsson, |
Description
The following function works fine to check:
{{{function AddIntegerToQueue
protected
Boolean added;
input Integer array[10];
input Integer valueToAdd;
output Integer newArray[10];
algorithm
newArray:=array;
for i in 1:10 loop
if not added then
if array[i] == 0 then
newArray[i]:=valueToAdd;
added:=true;
end if;
end if;
end for;
end AddIntegerToQueue;}}}
But it should give an errorr that the inputs and outputs are declared in a protected section.
Note:
See TracTickets
for help on using tickets.
Mathcore trac: http://intranet/trac/mathmodelica/ticket/3020