Re: I want to convert a list of integers to their negative self
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