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.
DivLWW
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  DivLWW
 
  /* Divide long by word, push word result */
 
  Description
 
  Pops a word and a long from the stack and pushes an integer that results
  from dividing the long value by the word value. The remainder is stored
  in the temporary p-code register t.
 
  Pseudocode equivalent:
 
  w = Pop();
  l = LongPop();
  w2 = (int)(l / w);
  Push(w2);
  t = l % w;
 
  This is generated in the following statement:
 
  int w1;
  w1 = (int)(lTest / wTest); /* generates DivLWW */
 
 
                                     -♦-