Chr

From Delphi Pascal wiki
Jump to navigation Jump to search

Returns a character with a specified ordinal number.


Declaration
function Chr(X: Byte): Char;


Target
Windows, Real, Protected


Remarks
Chr returns the character with the ordinal value (ASCII value) of the byte-type expression, X.


See Also
Ord


Sample Code

{Chr.PAS}
{Sample code for the Chr function.}

{ For Windows: }
{ uses WinCrt; }
var
 I: Integer;
begin
 for I := 32 to 126 do Write(Chr(I));
end.