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?
Pow() and Abs() for integers
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Re: Pow() and Abs() for integers
3 years after and no Abs() for Integer?
I think, it's an very elementar thing for a progam-language and easy to build in. Possible solution in Asm, 32 bit:

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
Best regards,
Frank
Frank