19 data conversion, 20 high precision, 19 data conversion 5.20 high precision – Rice Lake iRite IDE User Manual

Page 83

Advertising
background image

920i

Programming Reference - API Reference

79

Right$

Returns a string containing the rightmost I characters of string S. If I is greater than the length of S, the function
returns a copy of S.

Method Signature:
function Right$ (S : String; I : Integer) : String;

Space$

Returns a string containing N spaces.

Method Signature:
function Space$ (N : Integer) : String;

UCase$

Returns the string S with all lower-case letters converted to upper case.

Method Signature:
function UCase$ (S : String) : String;

5.19 Data Conversion

IntegerToString

Returns a string representation of the integer I with a minimum length of W. If W is less than zero, zero is used as
the minimum length. If W is greater than 100, 100 is used as the minimum length.

Method Signature:
function IntegerToString (I : Integer; W : Integer) : String;

RealToString

Returns a string representation of the real number R with a minimum length of W, with P digits to the right of the
decimal point. If W is less than zero, zero is used as the minimum length; if W is greater than 100, 100 is used as
the minimum length. If P is less than zero, zero is used as the precision; if P is greater than 20, 20 is used.

Method Signature:
function RealToString (R : Real; W : Integer; P: Integer) : String;

StringToInteger

Returns the integer equivalent of the numeric string S. If S is not a valid string, the function returns the value 0.

Method Signature:
function StringToInteger (S : String) : Integer;

StringToReal

Returns the real number equivalent of the numeric string S. If S is not a valid string, the function returns the
value 0.0.

Method Signature:
function StringToReal (S : String) : Real;

5.20 High Precision

DecodeExtFloat

A five-byte IEEE-1594 extended floating point number, expressed as an array or bytes, is converted to a standard
4-byte floating point real. NaN and infinity are processed. If a number is too small to convert to 4-byte precision,
zero is returned. If a number is too large to convert to 4-byte precision, infinity is returned.

Method Signature:
function DecodeExtFloat( weight : ExtFloatArray ) : real;

EncodeExtFloat

Converts a 4-byte floating point real to a 5-byte IEEE-1394 extended floating point number in the form of an
array of five bytes.

Advertising
This manual is related to the following products: