11-15-2011 11:55 AM
@Jeff Bohrer wrote:
of course there is the Lexical class function on the comparision palatte to do all the regexs for you!
Hmmmmm This round thing is neat--- I should call it a "Wheel"
The OP asked how to test a string; your wheel would need a loop around it to test every character. On the other hand, I never think to use the Lexical Class function because I have a hammer.
11-15-2011 12:50 PM
@jcarmody wrote:
@Jeff Bohrer wrote:
of course there is the Lexical class function on the comparision palatte to do all the regexs for you!
Hmmmmm This round thing is neat--- I should call it a "Wheel"
The OP asked how to test a string; your wheel would need a loop around it to test every character. On the other hand, I never think to use the Lexical Class function because I have a hammer.
Well, Jim beat me to the punch. I was going to suggest a "side by side" comparison to see which solution makes it to the Rube Goldberg thread.
11-15-2011 01:01 PM - edited 11-15-2011 01:05 PM
@Darin.K wrote:
@jcarmody wrote:
@Jeff Bohrer wrote:
of course there is the Lexical class function on the comparision palatte to do all the regexs for you!
Hmmmmm This round thing is neat--- I should call it a "Wheel"
The OP asked how to test a string; your wheel would need a loop around it to test every character. On the other hand, I never think to use the Lexical Class function because I have a hammer.
Well, Jim beat me to the punch. I was going to suggest a "side by side" comparison to see which solution makes it to the Rube Goldberg thread.
Gosh! bust my chops!!!! the OP did state he wanted to test every character
"suppose i give a single character and it should check for alphanum....
11-15-2011 01:04 PM
Repeat after me: "Don't Mess With Texas Regexes!"
11-15-2011 01:06 PM
oh heck.... just 7.0 type cast it
11-15-2011 01:44 PM
Here is my side by side:
Now can someone explain to me again why And Array Elements returns true for an empty array?
11-15-2011 01:57 PM - edited 11-15-2011 01:57 PM
@Darin.K wrote:
Here is my side by side:
Now can someone explain to me again why And Array Elements returns true for an empty array?
WAY off topic---
You had this expained before? the cat is dead and alive at the same time
11-15-2011 02:15 PM
Hopefully the OP's question has been answered five different ways so this diversion is ok.
Explanations I have heard range from the ever helpful "It has to return something" to the slightly more informational "The default use is to look for a single false in a sea of true values, so the de facto default is true". In my mind, Booleans are False until explicitly set to true so empty elements should be considered False (like in Or Array Elements). The annoyance is that this choice requires negation to add a check for the empty case. And Array Elements AND NOT Empty Array. If AndAE returned False instead, you could use a simple OR with the Empty Array check to get back the current behavior if you so desired.
11-16-2011 12:54 AM
This conversation was very useful and i got to see different ways to approach this problem .Thanks once again .
11-16-2011 01:57 AM
@Darin.K wrote:
Hopefully the OP's question has been answered five different ways so this diversion is ok.
Explanations I have heard range from the ever helpful "It has to return something" to the slightly more informational "The default use is to look for a single false in a sea of true values, so the de facto default is true".
From a performance standpoint i guess that's the solution choosen since it'll stop the comparison earlier and could save lots of comparisons. The function should include "and not empty array" in itself since, as you say, an empty array should default to false.
/Y