[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Str_to_Real                                                   StrngTTT



Purpose   To convert a string to an real.

Returns   real;

Declaration    Str_to_real(Str:string):real;

          Str is the string to be converted

Uses StrngTTT.

Remarks   If the string Str is null, or the string cannot be
          successfully converted to a real , the function returns a
          zero.

          This procedure gets around the bug in Turbo 4 that occurs
          when trying to convert a string starting with a '.',  to a
          number.



Example


               USES STRNGTTT;
               VAR R : INTEGER;
               BEGIN
                 R := STR_TO_REAL('165.787');
               END.


The variable R is assigned the value 165.787 .

See Also: Str_to_Int Real_to_Str
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson