System Functions
I3E( ) Convert to/from IEEE Format
 
Formats 1. Convert From Internal Value to Floating Point: I3E(num[,ERR=stmtref])
 
2. Convert From Floating Point to Internal Value: I3E(string$[,ERR=stmtref])
 
Where:
num
Numeric value to convert to 8-byte IEEE format (scientific notation). string$
Program line number or statement label to which to transfer control.
 
Returns Numeric data, IEEE converted to/from ProvideX internal values.
 
Description The I3E( ) function converts data to/from IEEE floating point format and ProvideX internal values. The primary purpose of this function is to allow for the conversion of data between ProvideX and other applications.
 
Format 1 Convert From Internal Value to Floating Point
 
I3E(num[,ERR=stmtref])
If the function is passed a numeric expression, it will return an 8-byte string containing the IEEE floating point value of the number.
 
Format 2 Convert From Floating Point to Internal Value
 
I3E(string$[,ERR=stmtref])
 
If the function is passed an 8-byte string, the string will be converted to an internal
ProvideX numeric value.
 
Example 0010 ! Program to convert values to square roots
0020 OPEN (1,ISZ=8) "FLTDTA"
0030 I=0
0040 LOOP: READ RECORD (1,IND=I,ERR=DONE) F$
0050 F$=I3E(SQR(I3E(F$)))
0060 WRITE RECORD (1,IND=I) F$
0070 LET I=I+1; GOTO LOOP
0090 DONE: CLOSE(1)
0100 END