From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
'''Example:'''<br> | '''Example:'''<br> | ||
:'''Base Syntax''' | |||
tab : char; | var | ||
tab : char; | |||
crlf : string; | |||
begin | |||
// Show the use of Chr | |||
tab := Chr(124); | |||
crlf := Chr(13)+Chr(10); | |||
ShowMessage('Hello '+tab+' World'); | |||
ShowMessage('Hello'+crlf+'World'); | |||
end; | |||
:'''TRObject Syntax''' | |||
var | |||
tab : char; | |||
crlf : string; | |||
{ | |||
// Show the use of Chr | |||
tab = Chr(124); | |||
crlf = Chr(13)+Chr(10); | |||
ShowMessage('Hello '+tab+' World'); | |||
ShowMessage('Hello'+crlf+'World'); | |||
} | |||
Revision as of 13:00, 7 February 2024
function Chr(IntValue Integer):AnsiChar;
The Chr function converts an IntValue integer into either an AnsiChar or WideChar as appropriate.
Example:
- Base Syntax
var
tab : char;
crlf : string;
begin
// Show the use of Chr
tab := Chr(124);
crlf := Chr(13)+Chr(10);
ShowMessage('Hello '+tab+' World');
ShowMessage('Hello'+crlf+'World');
end;
- TRObject Syntax
var
tab : char;
crlf : string;
{
// Show the use of Chr
tab = Chr(124);
crlf = Chr(13)+Chr(10);
ShowMessage('Hello '+tab+' World');
ShowMessage('Hello'+crlf+'World');
}