OctStr

Convert integer to a string with octal representation.

Declaration

Source position: systemh.inc line 1273

  function OctStr(Val: LongInt; cnt: Byte) : shortstring;
  function OctStr(Val: Int64; cnt: Byte) : shortstring;
  function OctStr(Val: QWord; cnt: Byte) : shortstring;

Description

OctStr returns a string with the octal representation of Value. The string has exactly cnt characters.

Errors

None.

See also

Name Description
BinStr Convert integer to string with binary representation.
HexStr Convert integer value to string with hexadecimal representation.
Str Convert a numerical or enumeration value to a string.
Val Calculate numerical/enumerated value of a string.

Example

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.