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



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

chr

Convert byte value to character value

Declaration

Source position: systemh.inc line 561

function chr(

  b: Byte

):Char;

Description

Chr returns the character which has ASCII value X.

Historical note:

Originally, Pascal did not have typecasts and chr was a necessary function in order to do certain operations on ASCII values of characters. With the arrival of typecasting a generic approach became possible, making chr mostly obselete. However, chr is not considered deprecated and remains in wide use today.

Errors

None.

See also

Ord

  

Return ordinal value of an ordinal type.

Str

  

Convert a numerical value to a string.

Example

Program Example8;

{ Program to demonstrate the Chr function. }

begin
  Write (chr(10),chr(13)); { The same effect as Writeln; }
end.

Notes

 No notes exist for this page yet. 





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