Inconsistent Behavior of Lists

Dan Shafer revdan at
Thu Sep 16 02:30:11 EDT 2004

On Sep 15, 2004, at 6:03 PM, Brian Yennie wrote:

> Dan,
> It appears to me that you're hitting the difference between strings 
> and lists. The native data type in Rev is a string, and if you want it 
> to be treated specially because it follows some sort of list syntax, 
> you'll need to script that behavior. Otherwise you would have the 
> opposite effect- many people would be alarmed if spaces started 
> disappearing from their strings any time they followed a certain 
> pattern. Unfortunately list is not a native type, whereas associative 
> arrays and strings are.
My only contention is that since the list isn't a quoted string and the 
value following the comma isn't a quoted string, it ought not be forced 
into being a string.

But I agree there are other times this is exactly what's wanted.

lesson learned. Transcript's treatment of lists is not what I expected.

> Generally, this is where split and combine come in handy, plus 
> possibly some replace and regex to clean things up. Is there a 
> particular task you have in mind?
> If your primary concern is extra whitespace, could you write a simple 
> trim() function which removes it, and run your item chunking through 
> that?
> I agree with (some) others that it's not a bug, but I could see an 
> enhancement- maybe something like an "ignoreWhitespace" global 
> property that could be set, much like the "caseSensitive" property.
> - Brian
>> A list should be seen as a comma-delimited data container where 
>> commas separate data elements. Spaces after commas should not be 
>> significant. They aren't in any other language I know of that 
>> processes list data structures. a="1",b="2" and a="1", b="2" should 
>> be identical. In Rev, they are not. Rev sees the first element of the 
>> second item  as " b", which makes no syntactic sense as far as I can 
>> tell.
>> Anyway, it appears nobody else thinks this is a bug so i won't BZ it. 
>> I'll just grouse.
>> Dan
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the use-livecode mailing list