Program Development
Recently in the occasional opportunity and friends found PHP naming rules for \ ' [a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*\ '
That is, A to Z, and A to Z, and _, and 0x7f to 0xFF characters are supported by the naming rules, that is, in the PHP program, you can directly use most of the Chinese characters for the actual name!
After testing, this surprised us to the dotnet technology of today's carefree!
We can use Chinese characters to name classes, functions, variables!
That said, now the dotnet development also supports such a naming convention!
If this discovery is indeed universally applied, it will promote the procedural code of the medium culture and quickly reach a new stage.
Even we consider that the pseudo code can be directly translated into the actual program code!
Attached 1:c#.net code
Using System;
Namespace ConsoleApplication1
///
The class class is a middle-name instance of a class named Test
///
Class
{
static void display (string character)
{Console.Write (\ "Wish 16 grand victory to hold!\" + character);
}
///
The main entry point for the application.
///
[STAThread]
static void Main (string[] args)
{
//
TODO: Add code here to launch the application
//
String I am the strings;
I am the string = \ "-Du Honglin, Rongsewei \";
Display (I am a string);
Oh, pause for a moment
Console.read ();
}
}
}
After testing, the following code can be compiled and run correctly in the W2K Professional + DotNet Framework environment.
Attached 2:php code
Class Smile {
var $ what to say = null;
function says ($) {
echo \ "Welcome to the Chinese PHP world!"
\" . $ words;
}
}
$ smile = new Smile;
Smile and say (\ "Hope this discovery can be effective in advancing the code of the program culture!") _
--Rongsewei, Du Honglin \ ");
?>
After testing, the following code works correctly in the W2K Server + PHP4.3 pre environment.