10-10-2014 10:01 AM - edited 10-10-2014 10:05 AM
Thanks in advance
Edit: hahaha remove the select. Long week...
10-10-2014 10:10 AM
Hmm... I'm not quite sure what you're asking. The value of that whole thing is always true, so you could just replace all of it with a simple "T" boolean constant.
Are any of the constants shown there going to change?
10-10-2014 10:11 AM
@LandJBelenky wrote:
Hmm... I'm not quite sure what you're asking. The value of that whole thing is always true, so you could just replace all of it with a simple "T" boolean constant.
Are any of the constants shown there going to change?
Yes...this was just an example...
10-10-2014 10:21 AM
I guess I would do it this way. I normally don't like Case Structures very much because they're large and they don't let you see all of your code at the same time, but in this case, it seems appropriate.
Why do you only want to use the 3rd and 4th character (the "ri") in the comparison?
10-10-2014 11:44 AM
You might try this to avoid the string manipulation if the equality check fails:
Is your goal to improve efficiency or just make it prettier?
My thought is that comparing things outside of the Case selector is silly, but you said that all of those things could change. If "Type" was permanent it might be faster to do as LandJBelenky did above, but I don't know. I've read a thread that shows how Case structures slow down with more comparisons and that ordering cases (order of likely match) can help. I'm curious to see how others will approach this.
10-10-2014 01:43 PM
It was just to make it prettier. Efficiency isn't an issue here. I just had a Friday brainfart.
10-10-2014 01:45 PM
@LandJBelenky wrote:
Why do you only want to use the 3rd and 4th character (the "ri") in the comparison?
It's a subset of a string which contains concatentated information that I am keying off of. Those are the particular characters I care about in this instance.