Normally you define variables in order to do some calculations. But until now no user input has been mentioned. Writing a fractal formula could be easy, but it’s boring if there is no parameter to play around. Now how could parameters introduced into this language?
The solution is: They are simple standard variables, but they are initialized by the end user using ChaosPro and its GUI components. The formula writer does not need to care about that.
Because parameters are just special variables, you need to first declare them before using them. And on declaring the parameters you just need to provide an additional keyword so ChaosPro can see that this variable needs to be initialized by the end user. This keyword has been named
"parameter" and has to appear right in front of the variable declaration.
parameter complex zStart; // defines a complex parameter zStart: Normally variables are uninitialized after declaring them // but this variable has been initialized by the end user. parameter real Bailout,Bailout; // defines two real parameters
Parameter declarations can appear only on class level, not on function level.
Parameters can have several additional properties, for example a descriptive text label, a hint text, a default value and a range. This kind of meta information about a parameter must be set in a special function with the signature void description(void).