Page 3 of 3
Re: viewing invisible characters in variable watcher
Posted: Wed Sep 24, 2014 6:51 pm
by dunbarx
So the line:
split "splittingMigraineHeadache" by return and "migraine" would yield the one line array:
splitting Headache (with the key being "splitting" and its element "headache)?
Will the itemDelimiter also be enhanced this way?
set the itemDel to "Migraine"
answer item 2 of "splittingMigraineHeadache" --gives you a "Headache"
Craig
Re: viewing invisible characters in variable watcher
Posted: Thu Sep 25, 2014 5:37 pm
by jacque
I hadn't thought about that, but yes, it appears that item delimiters do allow multiple characters in LC 7.0. At least, I get no errors from the message box, where I do see an error in version 6.6.2. Interesting.
Re: viewing invisible characters in variable watcher
Posted: Thu Sep 25, 2014 6:18 pm
by dunbarx
Jacque.
Not on 7 yet.
But does;
Code: Select all
set the itemDel to "Migraine"
answer item 2 of "splittingMigraineHeadache"
give you "Headache" or "igraineheadache"? (the "M" being the actual delim)
I suppose there is no particular reason to. er, limit the itemDelimiter to a single char. What would it hurt?
Craig
Re: viewing invisible characters in variable watcher
Posted: Thu Sep 25, 2014 6:48 pm
by jacque
In LC 7.0 it gives me [a] "Headache". It's working just like the new version of "split".
You might want to try 7.0 just to tinker. I don't do real work in it yet but it's good for one-off tests and I've found a few bugs and features that way. You can run any number of LC versions at once; right now I have three running. I usually do.