Empty and logical expressions

Ralph DiMola rdimola at evergreeninfo.net
Thu Nov 8 18:40:17 EST 2012


Mark,

Another one just bit me. Take this command

command TestItems svar1 , svar2 , svar3
 put "*" & item 1 of svar2 & "*"
end TestItems

Now call it like this:
TestItems 1, 3 ,2
Yields "*3*"

TestItems 1,,2
Yields "**"

But what I did NOT expect is....

TestItems 1, ,2
Yields "* *"

TestItems 1,   ,2
Yields "*   *"

Now why would extra spaces between parameters become spaces???????

This just move to the top of the bite-an-LC-newbee list for me!

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Mark Schonewille
Sent: Thursday, November 08, 2012 4:40 PM
To: How to use LiveCode
Subject: Re: Empty and logical expressions

Hi Ralph,

In addition to your list:

(empty < NULL) ==> true :-)

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour
spaces. http://www.color-converter.com

We have time for new software development projects. Contact me for a quote.




On 8 nov 2012, at 22:34, Ralph DiMola wrote:

> Mark,
> 
> Thanks! Did some serious searching and I ran into this case once in 
> all my LC apps and libraries.
> 
> Here's an interesting exercise I just did.......
> 
> (Null < 0) ==> true
> (Empty < 0) ==> true
> (Empty = Null) ==> false
> 
> Based on your info, this is what I would have expected.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
> 


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list