Opened 14 years ago

Last modified 14 years ago

#1477 closed defect (fixed)

array cref codegeneration

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund,

Description

From http://www.openmodelica.org/index.php/forum/topic?id=263

model FrameTest 
// --- MAIN CLASS --- 

  Element element[1];  
end FrameTest; 

//############################################################################################################ 

model Element 
  Profile profile; 
  Real angle;                              
equation 
  angle = funct(alpha=profile.alpha); 
end Element; 

//############################################################################################################ 

function funct 
  input Real[:] alpha;                      
  output Real cOut;                          
algorithm 
  cOut:= alpha[5]; 
end funct; 

//############################################################################################################ 

record Profile 
  parameter Real alpha[20]={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0}; 
  //parameter Real alpha[19]={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0}; 
end Profile; 

Change History (0)

Note: See TracTickets for help on using tickets.