next up previous contents index
Next: Swap Up: Functions and Procedures Previous: SSeg

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

Example
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.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998