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



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

Dec2Numb

Convert a decimal number to a string representation, using given a base.

Declaration

Source position: strutils.pp line 165

function Dec2Numb(

  N: LongInt;

  Len: Byte;

  Base: Byte

):String;

Arguments

N

  

Number to represent.

Len

  

Minimal length of the returned string

Base

  

Base to use when converting

Function result

The representation of the given number.

Description

Dec2Numb converts N to its representation using base Base . The resulting string is left-padded with zeroes till it has length Len . Base must be in the range 2-36 to be meaningful, but no checking on this is performed.

Errors

If Base is out of range, the resulting string will contain unreadable (non-alphanumeric) characters.

See also

Hex2Dec

  

Converts a hexadecimal string to a decimal value

IntToBin

  

Converts an integer to a binary string representation, inserting spaces at fixed locations.

intToRoman

  

Represent an integer with roman numerals

RomanToInt

  

Convert a string with a Roman number to it's decimal value.

Notes

 No notes exist for this page yet. 





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