ParametersNormally 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? 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 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). |