Re: Odd & Even Pages
Re: Odd & Even Pages
- Subject: Re: Odd & Even Pages
- From: Ian Ferguson <email@hidden>
- Date: Fri, 24 Oct 2003 14:04:25 -0400
I would suggest doing this using "mod":
set odd_list to {}
set even_list to {}
repeat with i from 1 to 100
if i mod 2 is 1 then
set end of odd_list to i
else
set end of even_list to i
end if
end repeat
On Oct 24, 2003, at 1:23 PM, Michelle Steiner wrote:
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
_______________________________________________
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.