home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / cug / softt-11.lbr / CTOR.DQC / CTOR.DOC
Text File  |  1984-07-05  |  1KB  |  49 lines

  1. .he 'CTOR'03/23/80'CTOR'
  2. NAME
  3. .sp
  4. ctor - character to real conversion
  5. .sp 2
  6. SYNOPSIS
  7. .sp
  8. .nf
  9. real function ctor (str, i)
  10. character str (ARB)
  11. integer i
  12. .fi
  13. .sp 2
  14. DESCRIPTION
  15. .sp
  16. 'Ctor' is similar in function to 'ctoi', except that it
  17. converts floating point numbers as well as integers.
  18. The character
  19. string in 'str' is examined starting in position 'i'.
  20. Conversion stops when a character is encountered
  21. that cannot correctly appear in the number.
  22. 'I' is updated to point to the first character not
  23. included in the converted number.
  24. The value returned by the function is the real (single precision)
  25. value of the character string.
  26. .sp
  27. The number in 'str' may contain a leading sign, a
  28. decimal point, and an exponent.  A decimal point
  29. is not required.
  30. .sp 2
  31. IMPLEMENTATION
  32. .sp
  33. 'Ctod' is called to convert the character string into
  34. a double precision value.  This value is converted to
  35. single precision format and returned as
  36. the value of 'ctor'.
  37. .sp 2
  38. ARGUMENTS MODIFIED
  39. .sp
  40. i
  41. .sp 2
  42. CALLS
  43. .sp
  44. ctod
  45. .sp 2
  46. SEE ALSO
  47. .sp
  48. input (2), other conversion routines ('cto?*' and '?*toc') (2)
  49.