﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5061	[NF] Are public parameters allowed in functions by the Modelica spec?	Adrian Pop	Per Östlund	"The NF is really strict on this:
https://libraries.openmodelica.org/branches/newInst/AdvancedNoise/files/AdvancedNoise_AdvancedNoise.Examples.RailIrregularities.Comparisons.FilterAndConvolution.err
{{{
[/var/lib/hudson/slave/workspace/OpenModelica_TEST_LIBS/OpenModelica/OMCompiler/build/lib/omlibrary/AdvancedNoise 1.0.0/Generators/QuickXorshift64star/package.mo:13:5-13:62:writable] Warning: Invalid public variable p, function variables that are not input/output must be protected.
}}}
The function looks like this:
{{{#!mo
redeclare function extends initialState
  ""Returns an initial state for the xorshift64* algorithm""

    /* According to http://vigna.di.unimi.it/ftp/papers/xorshift.pdf, the xorshoft*
     random number generator generates statistically random numbers from a bad seed
     within one iteration.
    */
    parameter Integer p = 1 ""The number of iterations to use"";
protected
    Real r ""Random number not used outside the function"";

  algorithm
// more here  
end function initialState;
}}}

I think we should just issue a warning and allow this."	defect	new	high	2.0.0	New Instantiation				
