Shaitan00 Posted September 8, 2003 Posted September 8, 2003 Given 3 variables [var1, var2, var3], which represent the version [i.e.: 1, 2, 3, etc.] of each station. I need a method/function to ensure that the version is the same in all stations that are reporting. So if the value [varX] is blank/null then do not count it in the comparisons, otherwise ensure all filled variables are the same. I am looking for a way to check this without going threw case/select statements [first thing that comes to mind] for each possible case [when a variable is null]. Of course in reality there are 22 variables, which explains why I cannot do the trivial Case/Select for all possibilities of null variables. Anyone have a better idea on how to code the pseudo-code above in VC#? Quote
*Experts* Nerseus Posted September 9, 2003 *Experts* Posted September 9, 2003 What are you comparing the values to? Are you saying that each individual check needs only occur if both values are non-null? Would you want to stop comparison if any one of the comparisons failed? -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Shaitan00 Posted September 9, 2003 Author Posted September 9, 2003 I want the function to return TRUE or FALSE [boolean] regarding the comparaison. So I want it to check to see if the non-null variables have the same value. So if Var1=1, Var2=2, Var3= "" then it would return false [Var1 != Var2]. However is Var1=2, Var2="", and Var3=2 then it would return TRUE because the non-null vars are the same. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.