H folks,
I'm a syntax issue (I hope that's all) with how you declare and set var's values with switch statements
below is a commented version of what i'm attempting (which should clarify the issue)
Var fav_colour; // i dont know where/how to declare these var's in a switch
Var fav_food;
//and so on letting me declare and manipulate values based on switch selection…
switch (this.rawValue) {
case "1":
fav_colour.rawvalue = “blue”;
fav_food.rawvalue = “Apples”;
///and so on to post variable values (which can then be used in (java version of a) concatenated environment e.g. X.rawvalue = a1.value + fav_colour.rawvalue + fav_food.rawvalue + a2.value or similar…… mostly values wont be displayed in their own form fields just concatenated...
break;
case "2":
fav_colour.rawvalue = “red”;
// am I right in thinking that just because you declare two var’s you don’t require values for both of them in each switch instance {acknowledging this could lead to “null” being inserted …..}
break;
case "3":
fav_colour.rawvalue = “grey”;
fav_food.rawvalue = “oranges”;
// and so on…
// these var’s and values will be used almost exclusively in as noted under case “2”: ie java spliced together to form output strings
}
Thanks folks