Entertainment is for entertainment: named Chinese, let the Chinese characters will be developed!

zhaozj2021-02-16  31

Author: Rongze Wei, Du Honglin welcome communication, please respect the copyright, please ensure that posted the full article.

Recently, in the accidental opportunity to find PHP naming rules to '[A-ZA-Z_ / X7F- / X7F- / XFF] *' is saying A to Z, and A to z, and _, and 0x7f to 0xFF characters are supported by naming rules, that is, in the PHP program, most of the Chinese characters can be used to actually name!

After testing, this surprise allows us to directly DOTNET technology today! We can use Chinese characters to class, functions, and variables! That is, the current DOTNET development also supports such naming rules!

If this finding, it is indeed universal application, which will promote the Chinese culture of the program code, and quickly reach a new stage. Even we think that you can directly translate the pseudo code into actual program code!

Attached 1: C # .NET code

Using system;

Namespace consoleApplication1 ///

/// Class class is a class name instance name test /// Class class {static void display (String character) {Console.Write ("I wish the sixteen victories Held! " Characters);} /// /// The primary entry point of the application. /// [stathread] static void main (string [] args) {// // Todo: Add code here to start the application // String I am a string; I am a string = "- Du Honglin, Rongzewei "; display (I am string);

/ / Oh, suspend console.read ();}}}

After testing, the following code can be compiled correctly in the W2K Professional DotNet Framework environment.

Attached 2: PHP code

Class smile {

Var $ 要 = = NULL;

Function says () {echo "Welcome to the Chinese PHP World!
". 话;}

$ Smile = New smile; $ smile -> Say ("I hope this finding can effectively promote the program code culture!

- Rong Zewei, Du Honglin");

?>

After testing, the following code can operate correctly in the W2K Server PHP4.3 pre-environment.

转载请注明原文地址:https://www.9cbs.com/read-27921.html

New Post(0)