Page 2 of 2

Posted: Sun Mar 09, 2008 11:11 pm
by Kaeru Gaman
could any Moderator please split this thread and move the Pow() subtopic into T&T?

;---------------------------------------------------------

@Topic

there is still no Abs() for Integer, yet, though it was announced in the Help for Version 3.30 and older.

is it really too difficult to implement?

Re: Pow() and Abs() for integers

Posted: Thu May 12, 2011 3:41 pm
by Frabbing
3 years after and no Abs() for Integer? :cry:

I think, it's an very elementar thing for a progam-language and easy to build in. Possible solution in Asm, 32 bit:

Code: Select all

Abs proc uses edx dwNum:DWORD
mov eax, dwNum
mov edx, eax
and eax, 0F0000000h
cmp eax, edx
je @F
xor edx, 0F0000000h
xchg eax, edx
@@:
ret
Abs endp