• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug in iTunes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: path to over eppc?
  • Next by Date: Re: Delete me...
  • Previous by thread: Re: Bug in iTunes?
  • Next by thread: Re: Bug in iTunes?
  • Index(es):
    • Date
    • Thread