Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » tlse
  • » Profile

Posts

Posts

I've installed r8526 for Windows (is r8534 available somewhere ?)... and now, it's worse, I cannot even create a new function from OMEdit !

"File->New Function->toto->Error has occurred".

Ok but how to pass functions at the same time ?
I write the functions with OMEdit and call them from OMShell. For instance, with two simple functions "Sum" and "Average" :
/////////////////////////////////
function Sum
  input Real a;
  input Real b;
  output Real s;
algorithm
  s:=a + b;
end Sum;
///////////////////////////////////
function Average
  input Real x;
  input Real y;
  output Real z;
algorithm
  z:=Sum(x, y) / 2;
end Average;
/////////////////////////////////
I cannot save the second function with OMEdit because of the call of the first one that generates an error message.  Do I forget something ?

Thanks a lot for your help.

Hello,

I try to develop an application in Modelica and I don't understand why I cannot make function calls in another modelica function (define as usual sub-functions and a main function with Modelica). Even with simple examples, I get the message "Error occurred building AST - Syntax error". 

Do you have an idea about the problem ?

Thanks.

Kind Regards.

  • Index
  • » Users
  • » tlse
  • » Profile
You are here: