Re: Bug in iTunes?
Re: Bug in iTunes?
- Subject: Re: Bug in iTunes?
- From: Nigel Garvey <email@hidden>
- Date: Mon, 9 Jun 2003 15:30:44 +0100
In my previous message, I wrote:
[Regarding a method to increment positive integers and decrement negative
ones, except when they're divisible by 20]
>
... you could use a slight variation on Kai's *very* nice
>
method: :-)
>
>
set v to 42
>
if (v mod 20) is not 0 then set v to v + (v + 1) div v * 2 - 1
Drat! This gives the wrong answer when v = 1. :-(
The 'if...else if' approach is probably better then:
if (v mod 20) is greater than 0 then
set v to v + 1
else if (v mod 20) is less than 0 then
set v to v - 1
end if
NG
_______________________________________________
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.