Description - <parametername>.enumName: <parametername>.enum Type: String Description: This parameter based attribute can be used only on int-parameters. Sometimes a formula has some switches, say a parameter can have only a few values, each value has a special meaning. Lets make an example: parameter int iMode; void loop(void) { if (iMode==0) { z=sin(z)+pixel; } else if (iMode==1) { z=cos(z)+pixel; } else if (iMode==2) { z=tan(z)+pixel; } } void description(void) { iMode.enum="Sinus Iteration\nCosinus Iteration\nTangent Iteration"; }
So let's say you have a parameter of type int, which you would like to use to select the iteration mode (see above): Now it would
be quite confusing for any user of your formula if he/she has to select an integer number from 0 to 2 and this would choose
the iteration mode. Right? The value of the void loop(void) { if (iMode=="Sinus Iteration") { z=sin(z)+pixel; } else if (iMode=="Cosinus Iteration") { z=cos(z)+pixel; } else if (iMode=="Tangent Iteration") { z=tan(z)+pixel; } } void description(void) { iMode.enum="Sinus Iteration\nCosinus Iteration\nTangent Iteration"; } |