Jump to content

Chinese BASIC

From Wikipedia, the free encyclopedia

Template:Short description Template:Multiple issues Chinese BASIC (Template:Zh) is the name given to several Chinese-localized versions of the BASIC programming language in the early 1980s.

Versions

At least two versions of Chinese BASIC were modified Applesoft BASIC that accepted Chinese commands and variables. They were built into some Taiwan-made Apple II clones. One of these was shipped with the best-selling Multitech Microprofessor II. Another version was shipped with MiTAC's Little Intelligent Computer ({{#invoke:Lang|lang}}).[1]Template:Unreliable source?

Multitech also developed a Zilog Z80-based port of the Chinese BASIC for its own line of high-end computers.

Example

In a typical Chinese BASIC environment, Chinese and English commands are interchangeable. It may also accept Chinese and Latin alphabet variables. For example, you may use Template:Mono in line 50, Template:Mono in line 200 and Template:Mono in line 250. They all do the same thing—to print out the value of Template:Mono on screen.

File:Keyboard layout Chinese Traditional.png
Chinese (traditional) keyboard layout
Chinese BASIC
Template:Nobold
  Applesoft BASIC
Template:Mono   <syntaxhighlight lang="basic" class="" style="" inline="1">10 Y=0</syntaxhighlight>
Template:Mono   <syntaxhighlight lang="basic" class="" style="" inline="1">20 INPUT E, F</syntaxhighlight>
Template:Mono   <syntaxhighlight lang="basic" class="" style="" inline="1">30 FOR A = E TO F</syntaxhighlight>
Template:Mono   <syntaxhighlight lang="basic" class="" style="" inline="1">40 Y = Y + LOG (A)</syntaxhighlight>
Template:Mono   <syntaxhighlight lang="basic" class="" style="" inline="1">50 NEXT A</syntaxhighlight>
Template:Mono   <syntaxhighlight lang="basic" class="" style="" inline="1">60 PRINT Y</syntaxhighlight>

This program calculates the sum of Template:Math. The Chinese characters used as variables are the 24 radicals of the Cangjie method, one of the earliest QWERTY keyboard-compatible Chinese input methods.

The significant length of an Applesoft BASIC variable name is restricted to two bytes. Therefore, the variables Template:Mono and Template:Mono are treated as the same. In Multitech's Chinese BASIC, a variable can be 3 bytes long (one Chinese character + one numeral).

See also

References

Template:Reflist

Template:BASIC

  1. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}