I want to convert a list of integers to their negative self
I want to convert a list of integers to their negative self
- Subject: I want to convert a list of integers to their negative self
- From: Jacco Rens <email@hidden>
- Date: Wed, 10 May 2000 02:38:02 +0200
- Readsource: 678899999
Hi all,
I want to convert a list of integers to their negative self
{"1", "3", "7", "", ""}
To:
{"-1", "-3", "-7", "", ""}
I have this;
set B to (the count of every item of A)
set This_List to {}
set c to 1
repeat with i from 1 to B
--
set c to c * i
set item c of A to D as integer
set E to D + D - D
set This_List to (This_List & D) as string
end repeat
display dialog This_List
end tell
But because I'm not handy with this, I get a bad result.
I could not find the trick anywhere in my books :-(
Thanks for the input
--
Best,
Jacco
Netherlands