Handling of final delimter (was Re: "this me"?)

J. Landman Gay jacque at hyperactivesw.com
Wed Aug 14 10:22:37 EDT 2013


Kay C Lan <lan.kc.macmail at gmail.com> wrote:
>Thanks for the Link, an excellent discussion.
>
>Marks Waddingham's statement:
>
>If you want to be able to represent a nullable string list of any
>number of
>> empty items from 0
>>
>
>is like saying:
>
>If you want to be able to represent a nullable array of any number of
>empty
>keys from 0 ???
>
>If you put empty into an Array, it is no longer an array. IMO once you
>get
>below two items you no longer have a List.


No, the difference between strings and lists or arrays is pretty much his point.  Given the limitations of strings, the trailing (or implied) delimiter is required, otherwise it is impossible to represent a string of zero items.  His solution is to implement a different structure that is more similar to real lists in other languages, which do act as you describe because they aren't strings. 

If the documentation were updated to include the two basic rules he gives , new users probably wouldn't have the problems you mention. 

One difference between LiveCode and the other apps you list is that you're an end user in those, and all you see is the output. It's likely that under the hood they aren't using strings to calculate item counts either.  
-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list