[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'System' (#rtl)

OctStr

Convert integer to a string with octal representation.

Declaration

Source position: systemh.inc line 1192

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

Str

  

Convert a numerical or enumeration value to a string.

Val

  

Calculate numerical/enumerated value of a string.

BinStr

  

Convert integer to string with binary representation.

HexStr

  

Convert integer value to string with hexadecimal representation.

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.

Documentation generated on: Jun 23 2021