Incredibly easy integer question

Glen gcanaday at gmail.com
Wed Dec 3 13:26:36 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


AHHA!

u r sneekie one !! combining approaches!

- --GC

Tigro Spottystripes wrote:
> probably my first attempt would be somthing like
> yourint *= -1.0;
> 
> Glen escreveu:
>> my_int = -my_int;
>>
>> Is same as multiplying by -1.
>>
>> Literally slap a "-" in front of it. Note that this is not the same
>> as:
>>
>> my_int -= my_int;
>>
>> ... which will always result in 0 no matter the sign of the
>> original number.
>>
>> --GC.
>>
>> AnnMarie at SLFBI.com wrote:
>>> Or if you want to get REALLY obscure x=(integer)("-"+(string)x);
>>> ----- Original Message ----- From: Drakth To: Stickman Cc:
>>> Scripters Sent: Wednesday, December 03, 2008 12:13 PM Subject:
>>> Re: Incredibly easy integer question
>>
>>> Multiply it by -1 111 * -1 = -111
>>
>>> On 12/3/08, Stickman <stickman at gmail.com> wrote:
>>>> negative integer. Basicaly I just want to slap a - in front
>> of it so 111
>>>> becomes -111.
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>> _______________________________________________ Click here to
>>> unsubscribe or manage your list subscription:
>>>
>> https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
>>
>>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk2+YsACgkQLstl3vProOA3XwCghaqzaGTdtvjb6J4jLgySZyI1
/jkAn03CQIEVP7f7MleC4q8H93A6ivLH
=7Vt7
-----END PGP SIGNATURE-----


More information about the secondlifescripters mailing list