Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> str convert number to string pp 70</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 STR                       Convert Number to String                    pp 70

 Syntax:  Str (NumVar:Parm,StrVar) ;

 Type:    String

 Form:    Procedure

 Purpose: Convert numeric value of NumVar to a string in StrVar.

 Notes:   Parm is a Write formatting parm and determines the format of the
          created string.


 ----------------------------------------------------------------------------


 Usage:
       CONST
          IntVar  : Integer = 1234  ;
          RealVar : Real    = 2.5E4 ;
       VAR
          StrVar  : String [10]     ;

       BEGIN
          Str (IntVar :5,StrVar)    ;  { StrVar = ' 1234'     }
          Str (RealVar:9,StrVar)    ;  { StrVar = '     2500' }
       END.

See Also: Write Val

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson