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



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

IntToBin

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

Declaration

Source position: strutils.pp line 167

function IntToBin(

  Value: LongInt;

  Digits: Integer;

  Spaces: Integer

):String;

Arguments

Value

  

Value to convert

Digits

  

Number of bits in the resulting string.

Spaces

  

Number of digits after which to insert a space.

Function result

Resulting string

Description

IntToBin converts Value to a string with it's binary (base 2) representation. The resulting string contains at least Digits digits, with spaces inserted every Spaces digits. Spaces should be a nonzero value. If Digits is larger than 32, it is truncated to 32.

Errors

If spaces is zero, a division by zero error will occur.

See also

Hex2Dec

  

Converts a hexadecimal string to a decimal value

IntToRoman

  

Represent an integer with roman numerals

Notes

 No notes exist for this page yet. 





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