Maybe external objects does what you want.
Mit freundlichen Grüßen,
Kind regards,
Jens Frenkel
_________________________________________________________________
Dipl.-Ing.
Jens Frenkel
*****************************************************************
Technische Universität Dresden
Institut für Verarbeitungsmaschinen und Mobile Arbeitsmaschinen
D-01062 Dresden
Tel: 0351 463-39278
Fax: 0351 463-37731
E-Mail: jens.fren...@tu-dresden.de
Internet: http://tu-dresden.de/bft
Wissensportal: www.baumaschine.de
*****************************************************************
*****************************************************************
Dresden University of Technology
Institute of Processing Machines and Mobile Machinery
D-01062 Dresden
Germany
Tel: +49 351 463-39278
Fax: +49 351 463-37731
E-Mail: jens.fren...@tu-dresden.de
Internet: http://tu-dresden.de/bft
*****************************************************************
Am 18.12.2012 12:22, schrieb Adrian Pop:
Hi,
This only works for constants.
You can define the constant in a package that contains the function.
package P
constant Integer i = 10;
function f
input Real x;
output Real y;
algorithm
y := x * i;
end f;
end P;
Or you can define the package containing the constant in the function.
function f
input Real x;
output Real y;
protected
package P
constant Integer i = 10;
end P;
algorithm
y := x * P.i;
end f;
Cheers,
Adrian Pop/
On 2012-12-18 11:41, Emil Larsson wrote:
Hi,
does anyone know if it is possible to define global variables inside a
Modelica function? Using the inner/outer concept does not work for
functions, or?
Does anyone have an idea how I can solve the problem of accessing
environment variables inside a function without having to send these
variables as input arguments to each function?
Best regards,
Emil