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

Kay C Lan lan.kc.macmail at gmail.com
Wed Aug 14 20:51:01 EDT 2013


Sorry Geoff I just don't follow your logic. Just because one doesn't exist
why shouldn't the others? If I understand your logic, which clearly I
don't, you are suggesting that because LC can create and count multiple
empty lines, and create and count multiple empty items, it should be able
to create and count a line with 5 empty words in it? Each are counted by
their own definition, and just because you can do something with one
doesn't mean you can do the same with the others. LC's current definitions
can create interesting results:

In the Message Box: (2 lines)

put "Geoff said - " & quote & "The number of words in this line is 11." &
quote & cr into msg
put "But LC only counts " & the number of words of msg & " words." after msg

Again, I'm not suggesting the current behavior should be changed. I know it
works consistently. As I said before, I think if HC was first implemented
with a definition that "test" is 0 items and not a List; and "," is a List
of 2 empty items, then we wouldn't be having this thread, because as Jacque
said: it's a "structure that is more similar to real lists in other
languages".

I think Mark Wieder is right on the mark (bad pun) when he said the time is
now, LC is at a critical point with hopefully droves of developers from
other languages and non-developers trying it out, so the less 'quirks'
(Mark Waddingham's word) the better.

I love LC and the xTalk language, for me it is the best, there is nothing
even close. If I wasn't so dumb I'd be able to dive into the engine and
create a new keyword "datum" which would have a different definition of
counting Lists to the way items does now. [I'd also like to be able to 'is
a list' and return true or false in the same way I can currently 'is an
array' - yes I know I can create functions to do both now] Mark's suggested
addition seems a win win to me, it gives the option to count items
differently and I don't have to do anything ;-)

On Wed, Aug 14, 2013 at 9:35 PM, Geoff Canyon <gcanyon at gmail.com> wrote:

> Wouldn't this mean that:
>
>   the number of items of "test"  -- puts zero
>
> And by extension:
>
>   the number of words of "test"  -- puts zero
>   the number of lines of "test"  -- puts zero
>
> Sent from my iPad
>
> On Aug 14, 2013, at 7:03 AM, Kay C Lan <lan.kc.macmail at gmail.com> wrote:
>
> > 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.
>
> _______________________________________________
> 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