Archive: StrCmp vs IntCmp


StrCmp vs IntCmp
I just had a shortage of bits when some numbers I have in a script grew beyond 4G. I were not doing any arithemetic on them, only comparing them so I thought it would be easy just to switch to strings.

But IntCmp(U) is:

val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]

and StrCmp is:

str1 str2 jump_if_equal [jump_if_not_equal]

and of course it was less than and more than comparisons I were doing.

I can't find anything in the current implementation that explains why this rather odd limitation is there (lstrcmpi works like any C strcmp AFAIK) and the
"best" solution IMO would be to change StrCmp to work the
way IntCmp works with the obvious exception of that breaking most scripts existing today.

So lacking the "perfect" solution have anyone else already created an StrCmpX macro/function that works like this? (I could not find anything in the list archives or "The Archives")


The System plug-in and the Math plug-in support 64-bit numbers.


Thank you.

The Math plugin also happily does just the string comparison I was looking for.

So for future searchers in this forum: strcmp, less than, greater than, math, plugin.