P-Code Instructions (pcode.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CmpsL
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  CmpsL
 
  /* Compare top two signed longs on stack */
 
  Description
 
  Compares two signed longs on the stack.
 
  Pseudocode equivalent:
 
  l2 = (long *)Pop();
  l1 = (long *)Pop();
  Push(l1 == l2 ? 0 : (l1 > l2) ? 1 : -1);
  Push(0);
 
  The following code fragment shows how this instruction is generated:
 
  lTest1 = 99;
  lTest2 = lTest1 + 10000l;
  if (lTest2 != 10099l)    /* generates CmpsL */
 
 
                                     -♦-