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.
Cvt<t>T
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  Cvt<t>T
 
  /* Convert integer to temp-real. */
 
  Possible Instructions
 
  CvtLT, CvtuLT, CvtWT, CvtuWT
 
  See: P-Code Data Types
 
  Description
 
  Convert the signed or unsigned integer or long integer value on the top
  of the evaluation stack to a temp-real on the floating point stack.
  CvtLT is used for signed longs, CvtuLT is used for unsigned longs, CvtWL
  is used for signed words, and CvtuWL is used for unsigned words.
 
  Pseudocode equivalent:
 
  <t> = Pop<t>();
  Push<t>((treal)<t>);
 
  This is done when converting an integer type into any floating point
  type. For example:
 
  long l = 10L;
  float f;
  f = (float) l;      /* generates CvtLT */
 
 
                                     -♦-