Re: What happened to delimiters?
Re: What happened to delimiters?
- Subject: Re: What happened to delimiters?
- From: Deivy Petrescu <email@hidden>
- Date: Fri, 13 Jun 2003 18:03:34 -0400
On Friday, Jun 13, 2003, at 15:41 US/Eastern, Kai wrote:
I must admit that, by trying to use more than 2 delimiters, I was
expecting
to be hit by a -50 parameter error. (Are _you_ rewarded with an error
if you
engage in this sort of irresponsible, anti-social behaviour?)
I thought 50 was too many, however, no error returned when I used
set lr to read file k using delimiter {"a", "u", return, space, tab,
"e"}
As far as your own tests are concerned, I actually get similar results:
---------------------------
read file f using delimiter {"-200", return} -- or {-200, return}
--> {"1 1 2 3 4 ", "200", "3 3 5"}
---------------------------
You may have noticed that, in my original tests, I used only single
character delimiters - mainly because 'Read' seems to ignore anything
beyond
the first character. For example, if I write "this is a test" to a
file, I
get this:
---------------------------
read file f using delimiter "is"
--> {"th", "s ", "s a test"}
---------------------------
(This would also explain why only the "-" of "-200" is acting as a
delimiter.)
So, unless anyone else can chip in with more information, I'm tempted
to
assume that Read's delimiters are restricted to single characters. For
anything more ambitious, AppleScript's text item delimiters would seem
to be
more appropriate.
Well, Nigel got the same thing in 9.2.2, which is strange. I remember
at one time I used "read file k using delimiters ..."
a lot, but I do not remember if it was with a constant and a word or
with two constants (return, tab, space, ...).
According to the dictionary
[using delimiters a list of plain text] -- or up to 2 values that
separate items to read
plain text, does not mean one character string. Also, a list... or 2
values sounds a bit ambiguous to me.
Regards
Deivy Petrescu
http://www.dicas.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.