Tutorials to .com

Tutorials to .com » Php » Others » Chinese name of Chinese characters to allow development

Chinese name of Chinese characters to allow development

Print View , by: iSee ,Total views: 12 ,Word Count: 490 ,Date: Mon, 20 Apr 2009 Time: 3:08 AM

Recently, by chance and found a friend named php rules' [a-zA-Z_ \ x7f-\ xff] [a-zA-Z0-9_ \ x7f-\ xff] * '
In other words a to z, and A to Z, and _, and 0xff to 0x7f characters have been named the support of the rules, that is, in the php program, the majority of Chinese characters can be directly used to carry out the actual name!

After the test found that such a surprise for us today is through the dotnet Xiaoyao technology!
We can use Chinese characters to type, function, variable naming!
In other words, the DotNet now also support the development of such a naming convention!

If this discovery is indeed generally the application of the code will facilitate the process of culture, the rapid arrival of a new stage.
Even when we consider the pseudo-code can be directly translated into the actual code!

Bylaw 1: c #. Net code

using System;

namespace ConsoleApplication1
/ / /
/ / / Class category is in a class of examples of naming test
/ / /
class category
(

static void display (string characters)
(Console.Write ( "I wish the convening of Congress victory!" + Character);
)
/ / /
/ / / application main entry point.
/ / /
[STAThread]
static void Main (string [] args)
(
/ /
/ / TODO: Add code here to start the application process
/ /
I am a string string;
I am a string = "- Hongxiang Lin, Rong";
Show (I am a string);

/ / Oh, pause
Console.Read ();
)
)
)


After testing, the following code in W2k Professional + DotNet framework compiler environment to run correctly.

Bylaw 2: php code

<? php
(smile class
var $ to say = null;
function say ($ words) (
echo "welcome the Chinese into the php world! <br>". $ words;
)
)
$ Smile = new smile;
$ Smile -> say ( "I hope this discovery can be effective in promoting the culture of code! _
<p align=right> - Rong, DU Hong-lin ");
?>



php other Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.