Page 1 of 1
space cannot be the itemdelimiter?
Posted: Sun Mar 30, 2014 6:54 pm
by dunbarx
Code: Select all
on mouseUp
get "a b c"
answer the number of words in it -- gives 3
set the itemdelimiter to space
answer the number of items in it gives 1
end mouseUp
Why is this?
Craig Newman
Re: space cannot be the itemdelimiter?
Posted: Sun Mar 30, 2014 6:59 pm
by Dixie
Code: Select all
on mouseUp
set the itemdelimiter to space
get "a b c"
answer the number of words in it & cr & the number of items in it
end mouseUp

Re: space cannot be the itemdelimiter?
Posted: Sun Mar 30, 2014 7:16 pm
by dunbarx
Never mind
Re: space cannot be the itemdelimiter?
Posted: Sun Mar 30, 2014 7:19 pm
by dunbarx
Oh hell, never mind.
How, after all these years, could I have been so careless. I wonder one what was in "it" after the "answer" command?
Ugh.
Craig
Re: space cannot be the itemdelimiter?
Posted: Sun Mar 30, 2014 7:27 pm
by Dixie
LOL... we've all been there at one time or another...

Re: space cannot be the itemdelimiter?
Posted: Sun Mar 30, 2014 8:58 pm
by dunbarx
The whole thing started in another thread where it was mentioned that the itemdelimiter was used with space. I wanted to make the point that there was a difference between that and simply counting the number of words, since adjacent spaces in the word count are ignored, whereas they are very much counted as items.
Made a quick example. That was where my brain went to sleep, though my fingers kept right on typing.
Craig