Chr (Compiler Magic Function)

From RemObjects Software

Jump to: navigation, search

This is a Oxygene Language Feature topic
Feel free to add your notes to this topic below.



The chr method returns the character for the specified unicode value.

method chr(Integer): Char;

Example

Consider the following code:

method ConsoleApp.TestCHR;
var c41,c321,c5000,c912345,c9123456: char;
begin
  c41 := chr(65);
  c321 := chr(65+256);
  c5000 := chr(5000);
  c912345 := chr(912345);
  c9123456 := chr(9123456);
end;

When executed and examined in a Watch Window (see Debug Windows), the following results are displayed:

c41       0x0041'A'
c321      0x0141
c5000     0x1388
c912345   0xebd9
c9123456  0x3680

The results illustrates that chr outputs a single unicode character, i.e. two bytes.


See Also


Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0 Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)

GlossaryKeywordsLanguage FeaturesPlatform FeaturesSamplesArticlesHow ToIssues

Personal tools