Str

Declaration:
Procedure Str (Var X[:NumPlaces[:Decimals]]; Var S : String);
Description:
Str returns a string which represents the value of X. X can be any numerical type. The optional NumPLaces and Decimals specifiers control the formatting of the string.
Errors:
None.
See also:
Val (588)

Listing: refex/ex68.pp


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.