OctStr

Declaration:
Function OctStr (Value : longint; cnt : byte) : String; Function OctStr (Value : int64; cnt : byte) : String;
Description:
OctStr returns a string with the octal representation of Value. The string has exactly cnt charaters.
Errors:
None.
See also:
Str (580), Val (588), BinStr (457), HexStr (509)

Listing: refex/ex112.pp


Program example112;

{ Program to demonstrate the OctStr function }

Const Value = 45678;

Var I : longint;

begin
  For I:=1 to 10 do
    Writeln (OctStr(Value,I));
  For I:=1 to 16 do
    Writeln (OctStr(I,3));
end.