• 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: Odd & Even Pages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd & Even Pages


  • Subject: Re: Odd & Even Pages
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 24 Oct 2003 10:23:21 -0700

On Friday, October 24, 2003, at 09:48 AM, Christopher MJ Tangora wrote:

What I am hoping is that someone knows a way to allow the script to only write odd or even numbers.

set the number_list to {}
repeat with i from 1 to 100
set the number_list to the number_list & i
end repeat
set even_list to even(number_list)
set odd_list to odd(even_list)

on even(inlist)
set temp to {}
repeat with this_number in inlist
set temp to temp & (this_number * 2)
end repeat
return temp

end even

on odd(inlist)
set temp to {}
repeat with this_number in inlist
set temp to temp & (this_number - 1)
end repeat
return temp
end odd
odd_list

--
Gore: 50,999,897
Bush: 50,456,002
Re-defeat Bush
_______________________________________________
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.

  • Follow-Ups:
    • Re: Odd & Even Pages
      • From: Ian Ferguson <email@hidden>
References: 
 >Odd & Even Pages (From: Christopher MJ Tangora <email@hidden>)

  • Prev by Date: Re: newbie question: real with fraction to int
  • Next by Date: Re: Copy items
  • Previous by thread: Odd & Even Pages
  • Next by thread: Re: Odd & Even Pages
  • Index(es):
    • Date
    • Thread