SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST

# IntStr

### Import List

        ConvTypes

Type Summary
ConvResults = ConvResults One of strAllRight, strOutOfRange, strWrongFormat, or strEmpty.

Procedure Summary
IntToStr(LONGINT, VAR ARRAY OF CHAR) Converts the value of int to string form and copies the possibly truncated result to str.
StrToInt(ARRAY OF CHAR, VAR LONGINT, VAR ConvResults) Converts string to integer value.

Constant Summary
strAllRight The string format is correct for the corresponding conversion.
strEmpty The given string is empty.
strOutOfRange The string is well-formed but the value cannot be represented.
strWrongFormat The string is in the wrong format for the conversion.

Type Detail

### ConvResults

    TYPE ConvResults = ConvResults

> One of strAllRight, strOutOfRange, strWrongFormat, or strEmpty.

Procedure Detail

### IntToStr

    PROCEDURE IntToStr(int: LONGINT;
                       VAR str: ARRAY OF CHAR)

> Converts the value of int to string form and copies the possibly truncated result to str.

### StrToInt

    PROCEDURE StrToInt(str: ARRAY OF CHAR;
                       VAR int: LONGINT;
                       VAR res: ConvResults)

> Converts string to integer value. Ignores any leading spaces in str. If the subsequent characters in str are in the format of a signed whole number, assigns a corresponding value to int. Assigns a value indicating the format of str to res.

Constant Detail

### strAllRight

    CONST strAllRight

> The string format is correct for the corresponding conversion.

### strEmpty

    CONST strEmpty

> The given string is empty.

### strOutOfRange

    CONST strOutOfRange

> The string is well-formed but the value cannot be represented.

### strWrongFormat

    CONST strWrongFormat

> The string is in the wrong format for the conversion.