﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1095	div operator not supported correctly	Francesco Casella	Francesco Casella	"The following simple model

 model Test \\  Real y = div(time,0.2); \\end Test;

gives the following compilation errors, instead of producing an executable simulator. This is a problem when one wants to implement, e.g., piecewise linear interpolations, or similar models. 

 g++ -I""C:\Programmi\OpenModelica1.4.5\/include"" -msse2 -mfpmath=sse  -I. -I""E:/Temp"" -o Test.exe Test.cpp -L""E:/Temp"" -lsim -L""C:\Programmi\OpenModelica1.4.5\/lib"" -lc_runtime -lf2c -lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32 \\Test.cpp: In function `int functionDAE_output()': \\Test.cpp:349: error: `div_rettype' was not declared in this scope \\Test.cpp:349: error: expected `;' before ""tmp0"" \\Test.cpp:351: error: `tmp0' was not declared in this scope \\Test.cpp:351: error: call of overloaded `div(double&, double)' is ambiguous \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:383: note: candidates are: div_t div(int, int) \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdlib:161: note:                 lldiv_t __gnu_cxx::div(long long int, long long int) \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdlib:126: note:                 ldiv_t std::div(long int, long int) \\Test.cpp: In function `int function_updateDependents()': \\Test.cpp:437: error: `div_rettype' was not declared in this scope \\Test.cpp:437: error: expected `;' before ""tmp0"" \\Test.cpp:441: error: `tmp0' was not declared in this scope \\Test.cpp:441: error: call of overloaded `div(double&, double)' is ambiguous \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:383: note: candidates are: div_t div(int, int) \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdlib:161: note:                 lldiv_t __gnu_cxx::div(long long int, long long int) \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdlib:126: note:                 ldiv_t std::div(long int, long int) \\Test.cpp: In function `int initial_residual()': \\Test.cpp:475: error: `div_rettype' was not declared in this scope \\Test.cpp:475: error: expected `;' before ""tmp0"" \\Test.cpp:479: error: `tmp0' was not declared in this scope \\Test.cpp:479: error: call of overloaded `div(double&, double)' is ambiguous \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:383: note: candidates are: div_t div(int, int) \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdlib:161: note:                 lldiv_t __gnu_cxx::div(long long int, long long int) \\C:/Programmi/OpenModelica1.4.5/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdlib:126: note:                 ldiv_t std::div(long int, long int) \\mingw32-make: *** [Test] Error 1 \\"	defect	closed	high			1.4.5	fixed		Francesco Casella
