set l to {}
repeat with n from 0 to 10
set n to n as string
set c to count n + 1
set l's end to {n:n, r:0 + (item c of n)}
end repeat
l
kai, when I run your script I get weird things.
First, I get an error running it in Smile. Not on SE.
When I log c, I get 1 all the time (???). By the numbers you get, I
believe you do not get the same thing
Although, yes, sum or subtraction *before* (item c of n) they always
return n.
After (item c of n) they all generate the expected error.
Look what I get:
set l to {}
repeat with n from 0 to 10
set n to n as string
set c to count n + 1
log c & (count n)
set l's end to {n:n, r:0 + (item c of n)}
end repeat
l
Last night, I tried modifying a series of the quoted integer (0 *
(item 2 of "1"), 0 * (item 2 of "2"), etc.) - and was rewarded with a
sequence that started:
I find it hard to believe myself that this happened on the same
machine. If it didn't, then I'm moving into the advanced stages of
senility. Go figure...
You probably had quit some applications from one time to the other.
I believe Nigel got the problem with respect to *. But It does not
explain the problems with + or -.
Another weird stuff is, if there is a log (item 2 of "9") for instance
it sometimes gives the error as expected.
It is indeed some very weird.
deivy
--------------------------------------------
Agora quem da bola é o Santos,
Salve o novo campeão!