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.
Div<t>
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  Div<t>
 
  /* Divide top two items on stack */
 
  Possible Instructions
 
  DivB, DivL, DivT, DivuL, DivuW, DivW
 
  See: P-Code Data Types
 
  Description
 
  Pops the two top elements from the stack, does a divide, and then pushes
  the result onto the stack. The result and both operands are of type <t>.
  For integer operands the evaluation stack is used. For floating point
  operands the floating point stack is used.
 
  Pseudocode equivalent:
 
  <t>2 = Pop<t>();
  <t>1 = Pop<t>();
  Push<t>(<t>1 / <t>2);
 
  NOTE: DivW places <t>1 % <t>2 in the temporary p-code register t as a
        side effect.
 
  This instruction is generated by
 
  lT2 / lT1
 
 
                                     -♦-