home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
cug
/
softt-11.lbr
/
CTOR.DQC
/
CTOR.DOC
Wrap
Text File
|
1984-07-05
|
1KB
|
49 lines
.he 'CTOR'03/23/80'CTOR'
NAME
.sp
ctor - character to real conversion
.sp 2
SYNOPSIS
.sp
.nf
real function ctor (str, i)
character str (ARB)
integer i
.fi
.sp 2
DESCRIPTION
.sp
'Ctor' is similar in function to 'ctoi', except that it
converts floating point numbers as well as integers.
The character
string in 'str' is examined starting in position 'i'.
Conversion stops when a character is encountered
that cannot correctly appear in the number.
'I' is updated to point to the first character not
included in the converted number.
The value returned by the function is the real (single precision)
value of the character string.
.sp
The number in 'str' may contain a leading sign, a
decimal point, and an exponent. A decimal point
is not required.
.sp 2
IMPLEMENTATION
.sp
'Ctod' is called to convert the character string into
a double precision value. This value is converted to
single precision format and returned as
the value of 'ctor'.
.sp 2
ARGUMENTS MODIFIED
.sp
i
.sp 2
CALLS
.sp
ctod
.sp 2
SEE ALSO
.sp
input (2), other conversion routines ('cto?*' and '?*toc') (2)