# Use of symbols

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.