[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Convert a numerical value to a string.
Source position: system.fpd line 61
procedure Str( |
var X: TNumericType; |
var S: string |
); |
Str returns a string which represents the value of X. X can be any numerical type. The actual declaration of Str is not according to pascal syntax, and should be
procedure Str(var X: TNumericType[:NumPlaces[:Decimals]];var S: String)
Where the optional NumPlaces and Decimals specifiers control the formatting of the string: NumPlaces gives the total width of the string, and Decimals the number of decimals after the decimal separator char.
None.
|
Calculate numerical/enumerated value of a string. |
Program Example68; { Program to demonstrate the Str function. } Var S : String; Function IntToStr (I : Longint) : String; Var S : String; begin Str (I,S); IntToStr:=S; end; begin S:='*'+IntToStr(-233)+'*'; Writeln (S); end.