Skip to content

Commit

Permalink
- Removed the non-standard constrain function from the initial enviro…
Browse files Browse the repository at this point in the history
…nment, since

  it's not handled in the compiler and caused the compiler to fail without a
  proper error message when constrain was used.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5213 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Mar 26, 2010
1 parent 7b5013a commit 562109b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions Compiler/Builtin.mo
Expand Up @@ -3482,8 +3482,6 @@ algorithm
env = Env.extendFrameT(env, "sqrt", sqrtreal2real);
env = Env.extendFrameT(env, "mod", realReal2real);
env = Env.extendFrameT(env, "mod", intInt2int);
env = Env.extendFrameT(env, "constrain", realrealreal2real);
env = Env.extendFrameT(env, "constrain", array1dimrealarray1dimrealarray1dimreal2array1dimreal);
/*
env = Env.extendFrameT(env, "semiLinear", realRealReal2real);
env = Env.extendFrameT(env, "delay", realReal2real);
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Codegen.mo
Expand Up @@ -1282,7 +1282,7 @@ protected function isBuiltinFunction
takes an Absyn.path and returns true if the name matches a modelica builtin function"
input Absyn.Path path;
output Boolean b;
list<String> builtins = { "delay","smooth","size","ndims","zeros","ones","fill","max","min","transpose","array","sum","product","pre","initial","terminal","floor","ceil","abs","sqrt","div","integer","mod","rem","diagonal","differentiate","simplify","noEvent","edge","sign","der","sample","change","cat","identity","vector","scalar","cross","String","skew","constrain" };
list<String> builtins = { "delay","smooth","size","ndims","zeros","ones","fill","max","min","transpose","array","sum","product","pre","initial","terminal","floor","ceil","abs","sqrt","div","integer","mod","rem","diagonal","differentiate","simplify","noEvent","edge","sign","der","sample","change","cat","identity","vector","scalar","cross","String","skew"};

algorithm
out := matchcontinue(path)
Expand Down

0 comments on commit 562109b

Please sign in to comment.