On Jun 26, 2010, at 6:21 AM, Scott Rossi wrote:
Recently, Mark Schonewille wrote:
put (fld 1 is a color and the number of items of fld 1 is 3) into
myIsRGB
"...is a color..." Gad, I never knew about this usage. Good to know.
Thanks & Regards,
Scott Rossi
I didn't know that either. I experimented a little with this.
put "255,255" is a color --> false, but
put "255,255,255,34" is a color --> true,
hence the need for the extra check for the number of items = 3.
But beware:
put "255,255,401" is a color --> true
so the range is not checked, instead 401 is "wrapped" (mod 256) to 146
when the color is set to such a triplet
For a really strict parsing in just one line, I suspect you have to
use Regex. Notice I said "you," since *I* can't use Regex to save my
life, though I'm happy to copy and paste snippets provided by others
into my scripts when needed....
-- Peter
Peter M. Brigham
[email protected]
http://home.comcast.net/~pmbrig
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution