• 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: I want to convert a list of integers to their negative self
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I want to convert a list of integers to their negative self


  • Subject: Re: I want to convert a list of integers to their negative self
  • From: Kevin Windham <email@hidden>
  • Date: Wed, 28 Feb 2001 16:33:55 -0600

> Hi all,
>
> I want to convert a list of integers to their negative self
>
> {"1", "3", "7", "", ""}
>
> To:
>
> {"-1", "-3", "-7", "", ""}

Try this. If you open your event log, you should the the results you want.

set list1 to {"1", "3", "7"}
set list2 to {}

repeat with anumber in list1
set list2 to list2 & (anumber * -1)
end repeat
log list1
log list2


  • Prev by Date: Text without formatting (OS 9.1)
  • Next by Date: Re: [OFF] Re: Records
  • Previous by thread: Re: I want to convert a list of integers to their negative self
  • Next by thread: Re: I want to convert a list of integers to their negative self
  • Index(es):
    • Date
    • Thread