Sign in Join
FPDoc Onlineexperiment

OctStr function

In unit System

Convert integer to a string with octal representation.

Declaration

pascal
function OctStr(Val: LongInt; cnt: Byte): shortstring

Description

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

Errors

None.

See also

Example: ex112

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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.