I tried to read and understand the Chinese language programming language “ word word ''


I tried to read and understand the Chinese language programming language “ word word ''

Most programming languages ​​are written in English or a series of numbers, and if you don't have knowledge, you don't know what is written. Chinese language programming languageWordingIs a slightly different programming language that allows you to write programs in the writing style used in ancient China.

An online editor is prepared for the wording, and it is possible to write and execute a simple code from the following URL.

Some sample code is provided in the online editor. As a test, let's check the code that outputs text such as "Hello, World", which is often used in programming language tutorials. First select pull-down.

If you select "helloworld" …

A code that outputs the text "Kantenchi Koi" instead of "Hello, World" was displayed. Because programming languages ​​have a strong image of half-width numbers and English enumerations, the wording with full-width kanji characters doesn't look like a programming language. There is no such thing as a “re-spot”, but the contents of the code are transmitted somehow from the meaning of kanji.

The wording is compiled into JavaScript code by the compiler. When the above code is converted to JavaScript, it looks like the following image.

Since the contents of the sample code can be edited, I changed it to a code that outputs "GIGAZINE". Click Run to run the code.

The result was output.

It is also a kind of sorting algorithmQuick sortSome complicated sample code was prepared, such as a program example written in the word. For example, the following is "Filling" Less than three. Less than twenty. Eighth. 35. Less than seven hundred. "In other words, it is a program that sorts the numbers 5, 3, 20, 8, 35, and 700 in ascending order.

It is like this when converted to JavaScript.

The output results are also sorted in ascending order.

The grammar of the wordingOfficial siteGo to and click “REFERENCE” to check.

The following is a declaration of a variable. For example, “Yuichi Ichigo. "Means" Declare one variable. Substitute the number 3. Create a variable named A ". Compared to the JavaScript code on the right, it is quite long, but the Japanese programming language “Pink", So the meaning of the code is transmitted even if you are not familiar with programming.

For the fierce man who wants to write a program with words!GithubYou can also download the wording from.Extension for Visual Studio CodeOr the code I wroteProgram to output on manuscript paperWas also available.

Copy the title and URL of this article

Source link

Do you like this article??

Show More

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button