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

Octal

Convert octal to decimal value

Declaration

Source position: oldlinux.pp line 1579

function Octal(

  l: LongInt

):LongInt;

Description

Octal will convert a number specified as an octal number to it's decimal value.

This is useful for the Chmod call, where permissions are specified as octal numbers.

Errors

No checking is performed whether the given number is a correct Octal number. e.g. specifying 998 is possible; the result will be wrong in that case.

See also

Chmod

  

Change file permission bits

Example

Program Example68;

{ Program to demonstrate the Octal function. }

Uses oldlinux;

begin
  Writeln('Mode 777 : ', Octal(777));
  Writeln('Mode 644 : ', Octal(644));
  Writeln('Mode 755 : ', Octal(755));
end.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.