• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Arthur Knapp <email@hidden>
  • Date: Mon, 24 Nov 2003 09:52:06 -0500

From: Rob Stott <email@hidden>
Subject: Re: (no subject)
Date: Sun, 23 Nov 2003 18:13:17 +0000

As you've probably sussed out by now, the "repeat... ...by -1" method
is the best way... if you were feeling particularly perverse;

set loop_list to {"a", "b", "c", "d"}

--flip the list round backwards
set loop_list to reverse of loop_list

But this is needlessly efficient, the problem will be solved too quickly. What about this:

set loop_list to {"a", "b", "c", "d"}

repeat with i from 1 to (loop_list's length div 2)
set t to loop_list's item i
set loop_list's item i to loop_list's item -i
set loop_list's item -i to t
end

{ Arthur J. Knapp;
<mailto:email@hidden>;

What...? Oh...!
}
_______________________________________________
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: How do I build an OSAX with Xcode?
  • Next by Date: Re: iCal question
  • Previous by thread: Re: (no subject)
  • Next by thread: Writing Binary Files, Data Code Limitations, and Unicode Tables (not necessarily in that order)
  • Index(es):
    • Date
    • Thread