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



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

OctStr

Convert integer to a string with octal representation.

Declaration

Source position: line 0

function OctStr(

  Val: LongInt;

  cnt: Byte

):shortstring;

function OctStr(

  Val: Int64;

  cnt: Byte

):shortstring;

Description

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

Errors

None.

See also

Str

  

Convert a numerical value to a string.

Val

  

Calculate numerical 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.

Notes

 No notes exist for this page yet. 





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