Skip to content

Commit

Permalink
- Rename keyword overload to $overload
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14793 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jan 16, 2013
1 parent 4cd0a25 commit fa6c35f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Dump.mo
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ algorithm
s5 = stringDelimitList(List.map(paths,Absyn.pathString), ", ");
s6 = unparseCommentOption(cmt);
prefixKeywords = unparseElementPrefixKeywords(re, finalStr, innerouterStr, encapsulatedStr, partialStr);
str = stringAppendList({is,prefixKeywords,restrictionStr," ",n," = overload(",s5,")", s6});
str = stringAppendList({is,prefixKeywords,restrictionStr," ",n," = $overload(",s5,")", s6});
then
str;

Expand Down
14 changes: 7 additions & 7 deletions Compiler/FrontEnd/ModelicaBuiltin.mo
Original file line number Diff line number Diff line change
Expand Up @@ -313,43 +313,43 @@ algorithm
v := {x1 + (x2-x1)*(i-1)/(n-1) for i in 1:n};
end linspace;

function div = overload(OpenModelica.Internal.intDiv,OpenModelica.Internal.realDiv)
function div = $overload(OpenModelica.Internal.intDiv,OpenModelica.Internal.realDiv)
"Integer part of a division of two Real numbers"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'div()'\">div()</a>
</html>"));

function mod = overload(OpenModelica.Internal.intMod,OpenModelica.Internal.realMod)
function mod = $overload(OpenModelica.Internal.intMod,OpenModelica.Internal.realMod)
"Integer modulus of a division of two Real numbers"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'mod()'\">mod()</a>
</html>"));

function rem = overload(OpenModelica.Internal.intRem,OpenModelica.Internal.realRem)
function rem = $overload(OpenModelica.Internal.intRem,OpenModelica.Internal.realRem)
"Integer remainder of the division of two Real numbers"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'rem()'\">rem()</a>
</html>"));

function abs = overload(OpenModelica.Internal.intAbs,OpenModelica.Internal.realAbs)
function abs = $overload(OpenModelica.Internal.intAbs,OpenModelica.Internal.realAbs)
"Absolute value"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'abs()'\">abs()</a>
</html>"));

function outerProduct = overload(OpenModelica.Internal.outerProductInt,OpenModelica.Internal.outerProductReal)
function outerProduct = $overload(OpenModelica.Internal.outerProductInt,OpenModelica.Internal.outerProductReal)
"Outer product of two vectors"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'outerProduct()'\">outerProduct()</a>
</html>"));

function cross = overload(OpenModelica.Internal.crossInt,OpenModelica.Internal.crossReal)
function cross = $overload(OpenModelica.Internal.crossInt,OpenModelica.Internal.crossReal)
"Cross product of two 3-vectors"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'cross()'\">cross()</a>
</html>"));

function skew = overload(OpenModelica.Internal.skewInt,OpenModelica.Internal.skewReal)
function skew = $overload(OpenModelica.Internal.skewInt,OpenModelica.Internal.skewReal)
"The skew matrix associated with the vector"
annotation(Documentation(info="<html>
See <a href=\"modelica://ModelicaReference.Operators.'skew()'\">skew()</a>
Expand Down
2 changes: 1 addition & 1 deletion Parser/BaseModelica_Lexer.g
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ MODEL : 'model';
T_NOT : 'not';
T_OUTER : 'outer';
OPERATOR : 'operator';
OVERLOAD : 'overload';
OVERLOAD : '$overload'; // OpenModelica extension
T_OR : 'or';
T_OUTPUT : 'output';
T_PACKAGE : 'package';
Expand Down

0 comments on commit fa6c35f

Please sign in to comment.