JCL Help:OrdToBinary@Byte

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the supplied value in its binary form.


Pascal

 function OrdToBinary(Value: Byte): string; overload;
function OrdToBinary(Value: ShortInt): string; overload;
function OrdToBinary(Value: SmallInt): string; overload;
function OrdToBinary(Value: Word): string; overload;
function OrdToBinary(Value: Integer): string; overload;
function OrdToBinary(Value: Cardinal): string; overload;
function OrdToBinary(Value: Int64): string; overload;


Parameters

Parameters Description
Value: Byte The value whose binary string representation to retrieve.


Return Value

Binary string representation of the supplied value. The string has a length equal to the number of bits in the supplied value and each character in the string represents a single bit. The highest bit is placed in Result[1] and the lowest bit in Result[Length(Result)].


Description

OrdToBinary returns a string representation of the specified value in its binary form. That is, a string of '1' and '0' characters representing the bits in the supplied value. The resulting string length is always equal to the number of bits in the supplied value (leading 0's aren't stripped).


About

Unit

JclLogic


Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page