We are working on converting the wiki to a static website controlled by markdown files in https://github.com/nsis-community. You can already see there how plug-ins will be posted. The end-user interface will still be a website but with a fresh coat of paint. Come meet us at Discord to talk about it.

Abs

From NSIS Wiki
Jump to navigationJump to search
Author: Lloigor (talk, contrib)


A very simple macro to get an integer's absolute value.

!define Abs "!insertmacro _Abs"
!macro _Abs _RetVal_ _Value_
   IntOp ${_RetVal_} ${_Value_} & 0x7FFFFFFFFFFFFFFF
!macroend

Usage:

StrCpy $0 -40
${ABS} $0 $0  ; $0 = 40