January 27, 200422 yr Commercial Member I'm trying to set the value of a G:var based on the value of another, as in:18 (>G:Var1)1 2 8 10 11 12 15 16 18 19 20 11 (G:Var2) case 0 (>G:Var2)181 183 184 185 193 197 0 7 (G:Var2) case 18 (>G:Var2)But this obviously doesn't work:(. I'm trying to set the value of G:Var2 to either 0, if G:var1 = the one of the first set of values, or 18 if it's one of the second sets of values.Can anyone show me how the syntax would work for this?Thanks,--Jon Jon Blum Vertical Reality Simulations
January 27, 200422 yr Hi,Probably this works too:(G:Var1) 20 <= if{ 0 (>G:Var2) } els{ 18 (>G:Var2) }Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
January 27, 200422 yr If you look in xmlgau01.zip you'll find the case syntax a bit explained.It is first the values you want to get out of the case, then the numbers of entries, then the value the case depends on, then "case":e.g. setting G:Var2 depending on G:Var11 2 8 10 11 12 15 16 18 19 20 11 (G:Var1) case (>G:Var2)"1 2 8 10 11 12 15 16 18 19 20" are the values to set, these are 11 items, it depends on G:Var1, after the case you have the "cased" values, which can be written to G:Var2. Note the output can be quite reversed, I assume if G:Var1 is 0 the returned value is 20, 1->19,...,10->1. If you want it reversed, reverse the values.Arne Bartels
January 28, 200422 yr Author Commercial Member Ah yes thanks, it was the output values that were stumping me. I was able to adjust the thing accordingly.Thanks again!--Jon Jon Blum Vertical Reality Simulations
Create an account or sign in to comment