Unit 'System' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

OctStr

Convert integer to a string with octal representation.

Declaration

Source position: systemh.inc line 1312

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
  or:=1 to 10 do
    Writeln (OctStr(Value,I));
  or:=1 to 16 do
    Writeln (OctStr(I,3));
end.

Documentation generated on: Oct 02 2024