help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions][Variables] 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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505