Old 26th June 2020, 13:37   #1
st80rules
Junior Member
 
Join Date: Aug 2009
Posts: 10
Compare large numbers

Hi,

I have this code:

${If} $1 < 8300000
StrCpy $2 $APPDATA 2
MessageBox MB_ICONSTOP|MB_RETRYCANCEL "Insufficient free space on $2, at least 8.5 Gb need to be available (found $1)." IDRETRY check_disk_space IDCANCEL 0
Abort
${EndIf}

and I get a message dialog saying "(found 2780540944)"

Is there an issue comparing 64 bit numbers? Should I use IntCmp instead?

Thanks

Normand
st80rules is offline   Reply With Quote
Old 26th June 2020, 15:35   #2
st80rules
Junior Member
 
Join Date: Aug 2009
Posts: 10
ah ok never mind I think I need System::Int64Op.
st80rules is offline   Reply With Quote
Old 27th June 2020, 01:30   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,296
If you use LogicLib.nsh, if/when NSIS gets internal support for this, you will get the upgrade for free.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump