1. # This character can be represented by a character encoding followed by a decimal or hexadecimal character encoding;
For example, the character "a" is encoded in 65 (decimal) or $41 (hexadecimal ).
For more information about anⅱ coding, see http://www.cnblogs.com/del/archive/2007/12/07/987071.html.
--------------------------------------------------------------------------------
VaR
C: ansichar;
Begin
C: = #65;
Showmessage (c); {}
C: = # $41;
Showmessage (c); {}
End;
--------------------------------------------------------------------------------
2, with # can also represent double byte characters, all Chinese character encoding see: http://www.cnblogs.com/del/archive/2007/12/15/996290.html
--------------------------------------------------------------------------------
VaR
WC: widechar;
Begin
WC: = #19975;
Showmessage (WC); {tens of thousands}
WC: =#$ 4e07;
Showmessage (WC); {tens of thousands}
{Dual-byte compatible single-byte}
WC: = #65;
Showmessage (WC); {}
WC: =#$ 41;
Showmessage (WC); {}
End;
--------------------------------------------------------------------------------
3. When multiple # characters are connected, the + number can be omitted.
--------------------------------------------------------------------------------
VaR
STR: string;
Begin
STR: = #65 + #66 + #67;
Showmessage (STR); {ABC}
STR: = #65 #66 #67;
Showmessage (STR); {ABC}
STR: = 'in case '+ #32 + #68 + #101 + #108 + #112 + #104 + #105 + #32 + 'blog ';
Showmessage (STR); {in case of a Delphi blog}
STR: = 'in case '#32 #68 #101 #108 #112 #104 #105 #32' blog ';
Showmessage (STR); {in case of a Delphi blog}
End;
--------------------------------------------------------------------------------
In addition, the system unit has a constant slinebreak, which indicates the carriage return and line feed;
Enter #13 and line feed #10, so the slinebreak value is #13 #10;
When we enter the prompt, slinebreak = # $ D # $ A is displayed, but it is displayed in hexadecimal format.