CN1514362A - Chinese character programming method - Google Patents
Chinese character programming method Download PDFInfo
- Publication number
- CN1514362A CN1514362A CNA031247016A CN03124701A CN1514362A CN 1514362 A CN1514362 A CN 1514362A CN A031247016 A CNA031247016 A CN A031247016A CN 03124701 A CN03124701 A CN 03124701A CN 1514362 A CN1514362 A CN 1514362A
- Authority
- CN
- China
- Prior art keywords
- chinese character
- chinese
- source program
- program
- word
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
A method uses directly Chinese characters to write computer source program, and then uses Chinese character bisect lapse coding method to carry on automatically coding for source program so as to convert to phonetic alphabet source program. ASCII coder can be formed after edition as well as target program which can be identified and executed by computer is formed at last through editing so that to write source program directly with Chinese characters becomes true for the people.
Description
Affiliated technical field
The present invention relates to the computer source program write method, especially can directly write computer source program with Chinese character
Background technology
Modern computer software is write with high level language mostly, and higher level lanquage closely links to each other with the human lives near reality, and is visual and understandable, covered obscure machine language, is convenient to people's reading, thinking, inspects, creates.People create the soft work of various excellence with higher level lanquage.
The high level language that uses in the world today is a lot.As: QBASIC, VB, JAVA, C, C++ or the like.But not having a kind of Chinese character program language, concerning numerous Chinese, read, thinking, write authoring software with the foreign language program language, is a very difficult thing.Even, also be not easy on top of through academic program.Therefore, use the work that people's coding is a technical height, difficulty is big of Chinese.Many students of specialized procedure because of the restriction of L proficiency, can not grasp word definitions and flexible use, learned program for many years, also only can do a little textbook exercises, can't carry out practical programs and write, said nothing of numerous laymans, aphasis seriously fetters the development of Chinese software engineering.Moreover foreign language also has weakness, as: word length code is many, and the committed memory capacity is big, and write a Chinese character in simplified form and increase learning difficulty, be not perfect in every way.Chinese is one of the most formal language of a specified duration in the world, and its expressiveness is strong, and definition is deep, and multiple functional, usable range is wide, but does not also have a kind of Chinese character programmed method up till now.
Summary of the invention
The purpose of this invention is to provide and a kind ofly can directly write the Chinese character programmed method of computer source program with Chinese character.
The technical solution adopted for the present invention to solve the technical problems is: directly write computer source program with Chinese character, passed compiling method in two minutes to the source program automatic coding with Chinese character then, convert the phonetic source program again to, behind editor, become American Standard Code for Information Interchange, through compiling, become the target program that computing machine can be discerned execution at last.Compiling method passed in described Chinese character two minutes is to adopt the pronunciation code of stroke, radicals by which characters are arranged in traditional Chinese dictionaries, the radical coding of divining by means of characters.Described program compiler is meant procedure-oriented and OO program compiler.Described Chinese character was passed compiling method in two minutes and is adopted two fens Chinese characters in common use tables, and adopt Chinese character source program-alphabetical source program function converse routine and adopt alphabetical source program-Chinese character source program memory converse routine, keep former input Chinese speech when converting alphabetical source program to the Chinese character source program.Adopt the hand over word dictionary that editor changed in various different Chinese character program languages.Adopt autocoder at the custom words of conversion in the editing process, and adopt the exclusive cause and effect sign of operation of Chinese, hyphen-or stain form Han-Han, Han-Ying compound word, compound word is not divined by means of characters.Keep international standard keyboard fully with cladding process, or be provided with Hanzi keyboard and phonetic hand over word keyboard as required.Keep international general calculation machine linguistic notation, continue to employ part alphabet and code, and continued to employ the letter character of science vocabulary, it comprises that radius is R, and speed is V, and area is S.When being edited, adopts unsimplified Hanzi unsimplified Hanzi source program-simplified phonetic hand over word switching software.Perhaps unsimplified Hanzi is adopted and passed compiling method in two, three minutes.
In using the performance history of Chinese character as program language, run into a lot of difficult problems, as the Chinese character pattern complex structure, changeful.The nearly word of shape, synonym, homonym, polyphone, polysemant, crisscross, computing machine is difficult to identification, therefore, makes program language with Chinese character and just must resolve these problems.Computer identification Chinese character difficulty, the identification letter coding but is easy to, and we finish source program with Chinese earlier, convert alphabetic coding again to, and computer just can have been discerned, and at this moment just can realize with the direct coding of Chinese.
The inventor has invented this Chinese character program language in November, 2002, promptly directly write source program with Chinese, machine conversion as calculated, compiling are transformed into target program, for the computer system operation operation, fundamentally solved because of this bottleneck factor of aphasis,, made thousands upon thousands intelligentsias the restriction of China's software industry, even, students in middle and primary schools can both be in conjunction with the speciality of oneself, and software is write in creation.
Chinese character program language telotism of the present invention, powerful can be beautiful with the english language ratio, and according to my research, the function of Chinese character program language will surmount english language.Because Chinese is than the more concise distinctness of foreign language, the same with all higher level lanquages, the Chinese character language also can cover on the target language, there is not any difference with foreign language, as long as can accurately crown all target program all sidedly, thereby make Chinese character language and english language not have what difference, metaphor: " opening " of Chinese " duplicated " " search " and " added " (+) and " subtract " " opening " that (-) " take advantage of " (*) " removing " (/) and English and " duplicate " " search " and " add " (+) and " subtract " (-) and " take advantage of " (*) " removing " (/) just without any difference, function is in full accord, certainly, to become alphabetic language to the Chinese character language conversion, must realize by hand over word.
Chinese character of the present invention was passed compiling method in two minutes and is successfully compiled out the holophrastic of maximum not repeated codes with minimum code, the shortest sign indicating number position, and expressiveness is strong, distinct succinct, meet liberal normalization, it is simplified easy as capitalization commentaries on classics small letter, traditional font commentaries on classics to convert the Chinese character source program to alphabetic coding.
Advantage of the present invention is: 1, usable range is wide; 2, easy-to-understand, distinct succinct; 3, the short and small refining of Chinese, the speech short code is few, and committed memory is little, and travelling speed is fast; 4, two fens compiling method structures are infinite, can adapt to any giant-scale engineering; 5, two fens codings meet two byte structures of each Chinese character, favourable various conversions and butt joint; 6, Chinese uses flexibly, easily learns unforgettable.It can directly use Chinese character to write computer source program, promptly can finish whole work of program language with Chinese character.Comprising various computer functions of definition, expression, computing and transmission and instruction, is the Chinese character program language of initiative, and it is powerful, easy to use, Yi Xue is unforgettable, greatly reduces the work difficulty that the people that uses Chinese character writes software, makes that to write software work popular.
Description of drawings
Fig. 1 is a workflow synoptic diagram of the present invention.
Fig. 2 is compiling and carries out block diagram.
Embodiment
At first adopt hand over word that Chinese character is changed, the key that program language can be made in Chinese character is that a kind of good hand over word must be arranged, and converts Chinese character to alphabetic coding, and hand over word must possess following advantage:
1, can express the meaning of a word, the pronunciation of Chinese character simply, brightly, be convenient to the editor and read, think deeply, inspect, revise, writing.
2, require repeated code few, help converting Chinese character to alphabetic coding like clockwork.
3, the necessary speech short code of hand over word is few, and it is little to take calculator memory, is convenient to quick operation.
2 byte structures of the every word of computing machine be need meet when 4, this yard breaks Chinese character, various butt joints and conversion are convenient to.
5, certainly in actual applications, as long as do not clash with keeping speech and system, code can be reused.
Chinese character was passed compiling method in two minutes, can satisfy above terms and conditions, can successfully the Chinese character source program be converted to alphabetical source program.Hand over word is by adopting English character to replace Chinese character:
The character that the phonetic hand over word uses is the same substantially with the english language character, 26 capitalizations, 26 lowercases, 10 numerals and some symbols:
Capitalization: A-Z; Small letter: a-z; Numeral: 0-9; Symbol :+-*/() # ,=; :?{}[]+-><>=<=‘’“”。
Phonetic alphabet are case sensitive in the Chinese character program language, in order to represent different meanings.
Passed compiling method in described two minutes: be meant that code coding made in each character pronunciation first letter in the individual character of getting Chinese character, phrase, the phrase, run into repeated code and split, respectively get one yard coding from tail word two, if repeated code still, pass word partition forward, repeated code is passed forward more again, until repeated code not.For example: " editor BJ " and " background BJ " two vocabulary repeated codes, the tail word of " background " can be splitted into two yards, background just becomes the trigram speech, makes it and " editor " repeated code not.
Chinese | Radical | Code |
Background | The back of the body+day+capital | ??BRJ |
Background | North+the moon+scape | ??BVJ |
Background | North+the moon+day+capital | ??BVRJ |
If BRJ and other word repeated code can be passed word partition forward, ' back of the body ' word is as above taken apart.If BVJ still with other word repeated code can with two words as above completely knocked down get final product.After taking into two words apart four bit codes entirely.If can't avoid repeated code, just make identification code with the pronunciation of tail word.Individual character is perhaps got three just with this word sound.
Chinese | Radical | Code |
Background | North+the moon+day+capital+(J) | BVRJJ |
4, the little block diagram of compiling method passed in two minutes in Chinese character:
Figure individual character explanation:
Two fens individual character of example
Many words of phrase needs
One words, two words, three words, four words five character words
5, calculate according to permutation and combination on the mathematics
Two bit codes have: 26
2=676 kinds of structure five-bit codes 26
5More than=1 thousand ten thousand kinds,
Three bit codes 26
3=17,576 six bit codes.。。。。。
Four bit codes 26
4Kind more than=45 ten thousand is above just more, is infinite number.
Duo monogram structure so covers all target programs of computing machine, and is more than sufficient.
The primary word of hand over word and custom words: hand over word vocabulary is provided with bag letter two major parts, and primary word and custom words, primary word are computer instruction, function and common everyday words; Operated by rotary motion 1,000---5 ten thousand custom words are when writing software, some detailed programs, function, figure, symbol are named the general reserved empty position 1,000 of definition----20,000 voluntarily, if custom words and basic vocabulary clash, custom words was just passed compiling method by two minutes and is dodged.For example: reach a yard software, ddmrj is as clashing with a certain primary word, computing machine splits the tail word " part " two of this vocabulary automatically: reach+reach+sign indicating number+soft+Ren+coding after the ox ddm r r n partition, as still clashing with other primary word, computing machine can be passed word partition automatically forward, after conflict is eliminated, the Chinese character and the code that are broken, computing machine is confirmed with color or symbol logo.After custom words is provided with, promptly participate in the conversion of Chinese character one phonetic.The wide range that self-defined vocabulary comprises, this is write various softwares, is provided with enough lexical space, has avoided millions of words once are arranged in the hand over word waste memory headroom.
The custom words autocoder: custom words is people when writing different software, and definition is provided with voluntarily.Chinese character one phonetic switching software has only been reserved the room to them, does not set in advance these vocabulary, because these vocabulary all toos are many, software setting is too big, and is too complicated.After we adopted self-defined Chinese character input, instant automatic coding had been simplified switching software greatly.Its program is roughly as follows: will use the about 6000-12000 of basic Chinese characters earlier always and be stored in the character library with word two formulas, the same form is: individual character single-tone sign indicating number, promptly get first letter of Chinese-character pronunciation and make code, place Chinese character after.As: give birth to s product c and refer to z mark b.Two formulas are: the individual character dicode splits Chinese character two and respectively gets one yard, place behind the Chinese character as: input " production target " when giving birth to nh and producing lp and refer to that tz mark ms is provided with, the software first step can access corresponding individual character single-tone sign indicating number, add phonetic for " production target ", production target sczb, when this phonetic sign indicating number and reservation speech or other function clash, second step of software will access corresponding individual character dicode word in the character library, custom words " production target " was split from tail word beginning two, production refers to+wood+show sczms, weave into 5 bit codes, if this 5 bit code still clashes with system, software will be passed word partition forward, produces ++ purport+mark sctzb, repeated code is passed again again, and general partition once just can repeated code.After the custom words coding is finished, promptly participate in conversion.Software can come out the Chinese character and the code of partition with color or symbology.
The coding example: this word two of Chinese character underscore _ expression splits.One words:
Two words:
Three words:
Four words:
The rest may be inferred for the above multi-character words of five character word.Chinese conversion character code example:
Chinese character | Radical | Hand over word | Chinese character | Radical | Hand over word |
Be | Day+Shu | ??RP | Not | No+mouthful | ??BK |
Non- | Non-+non- | ??FF | With | With+one | ??VH |
Chinese character | Radical | Hand over word | Chinese character | Radical | Hand over word |
Open | Beat+open | ??DK | Volume | Body+standing grain+only | THZ |
If | As+really | ??RG | Image | +winter+resemble | FDX |
Chinese character | Radical | Hand over word | Chinese character | Radical | Hand over word |
Depth-width ratio | High+wide+ratio | ??GKB | Shareholding equity | Always+thigh+wood+one | ??ZGMH |
Format | Lattice+formula+change | ??GSH | Net assets | Only+inferior+shellfish+product | ??JCBC |
Principal function | Master+letter+number | ??ZHS | Annual value of production | _+ヰ+product+value | ??MNCZ |
Chinese character | Radical | Hand over word | Chinese character | Radical | Hand over word |
Floating-point variable | Floating+point+change+amount | FDBL | Operation revenue | Battalion+already+receipts+Pie+_ | IYSPN |
Integer variable | Whole+type+change+amount | ZXBL | Season index | The season+degree+Rolling+purport+mark | JDTZB |
The Chinese hand over word
Open DK
Animation (number 0--9) DHT (n 0--9)
Circulation SH
Movable HD
Finish JS
Illustrate: Chinese character all converts the character code number to and changes into reserve code n, and digital bracket hyphen is constant.Arithmetical operation symbol aperture and hand over word
Chinese | Symbol | Example | Mathematic(al) representation | Aperture | Hand over word |
Add | + | A+B | A+B | + | LK |
Subtract | - | A-B | A-B | - | DX |
Take advantage of | * | A*B | A*B | * | QB |
Remove | / | A/B | A/B (B#0) | / | AV |
Complementation | QVS | A QVS B | Remainder behind the A/B | 。。 | QVS |
From increasing | ++ | A++ | A ↑ | ++ | ++ |
From subtracting | _ _ | A__ | A ↓ | _ _ | -- |
The arithmetical operation symbol uses in China for a long time.When having Chinesized coding fully, can write Chinese conversion aperture, but preferably direct mark.Hand over word is done the data foundation and the reference of inverse symbol noun, rems and uses QVS.
Relational calculus symbol aperture and hand over word:
Chinese | Sign of operation | Example | Mathematic(al) representation | Aperture | Hand over word |
Equal | ????= | ??A=B | ????A=B | ???= | ????DV |
Not etc. | ????!= | ??A<>B | ????A≠B | ???!= | ????BD |
Greater than | ????> | ??A>B | ????A>B | ???> | ????DDH |
Less than | ????< | ??A<B | ????A<B | ???< | ????XV |
More than or equal to | ????>= | ??A>=B | ????A≥B | ???>= | ????DVDV |
Smaller or equal to | ????<= | ??A<=B | ????A≤B | ???<= | ????XVDV |
These relational calculus symbols have used Chinesizing fully in China for a long time, and coding can be write the Chinese conversion, also direct mark, and hand over word is done the data foundation and the reference of inverse symbol noun:
Logic connective and hand over word
The logical operation character becomes Pinyin coding with the Chinese character language conversion, and program language Chinesizing degree is higher like this.Chinese cause-effect relationship operational symbol:
Chinese | Sign of operation | Example | Mathematic(al) representation | Hand over word |
Non- | ??NOT | ????NOT?A | ????A- | ????FF |
With | ??AND | ????A?AND?B | ????A^B | ????VH |
Or | ??OR | ????A?OR?B | ????A | ????GK |
XOR | ??XOR | ????A?XOR?B | ????A | ????IH |
Chinese | Code | Symbol | Example | Illustrate: cause-effect relationship statement in the Chinese, use very extensively, Gu Te lists the cause and effect computing.In computer program, mostly be the selection sentence pattern. |
Because | IW | ∵ | IW A SI B | |
So | SI | ∴ | SI B IW A | |
If will | RG JH | _ ▲ | RG A JH B JH B | |
Can not | BH | Δ | BH B | |
Order of operation relation: Chinese character program language order of operation, follow the operation rule of modern computer equally, computing of Chinese cause and effect and logical operation are arranged side by side.
Stet: international mathematics, computer language symbols, image are simply popular for a long time in China.For numerous intelligentsias know, in the Chinese character program language, it is remained, directly write these symbols when writing software.During Chinese character source program conversion phonetic source program, the symbol in the program is not changed, and does not change.
Add | + | Round bracket | () | Root | ^ | Parallel bars | \ | |
Subtract | - | Bracket | [] | Macro substitution | & | Horizontal bar | ||
Take advantage of | * | Braces | {} | Inclined shaft | # | ^ | ||
Remove | / | @ | Shu | |||||
Equal | = | From increasing | ++ | ~ | ||||
Not etc. | != | From subtracting | -- | 、 | ||||
Greater than | > | More than or equal to | >= | Comprise | $ | Period | · | |
Less than | < | Be less than or equal to | <= | Pause mark | 、 | Consecutive numbers | - | |
Comma | , | Exclamation | ! | Question mark | ? | Percentage | % | |
Quotation marks | “” | Colon | : | Branch | ; | Omit | …… |
ESC: the ESC of Chinese character program language, roughly the same in function and the foreign language, but some difference on sign, the escape symbol of Chinese character language used phonetic alphabet for example to make a check mark to have added the pronunciation t t that moves back word be an integral body to: t space character, can not represent backspace by Fen Ge t.Neither represent do not represent t yet.
Character | Implication | Character | Implication |
????n | Line feed | y | Paper transfer is skipped |
????h | Laterally jump lattice | \ | The shielding symbol |
????s | The decimal system | b | Scale-of-eight |
????z | Vertically jump lattice | sl | Sexadecimal |
????t | Backspace |
Keep speech: the sign of operation of computing machine and some critical function vocabulary are special-purpose, can not define its usefulness in addition, and Here it is, and what is called keeps vocabulary.Following table is listed part and is kept speech:
Add+ | Smaller or equal to>= | XOR ih | Rem | Qvs | Search ss | ||
Subtract- | More than or equal to<= | Because iw | Input sr | Ask integer | Qzs | Replace th | |
Take advantage of * | Less than< | Rooting qg | So si | Output sc | Can bh | From increasing ++ | Integer variable zbl |
Remove/ | Non-ff | Evolution kf | Not etc.!= | Substring $ | Long pqn | From subtracting-- | Principal function zhs |
Equal= | With vh | Close gb | If rg | Length cd | Short sd | Sinusoidal sin | Conversion zh |
Greater than> | Or gk | Open dk | Will jh | Duplicate fz | Tangent tan | Cosine cos | Select xz |
Other reservation part of speech pushes away, and can increase or reduce vocabulary in the table according to actual conditions.
Vocabulary continued to employ in foreign language: have many alphabets to use for a long time in China, Chinese know approval already.As: " sinusoidal sin, cosine cos ".If these vocabulary are translated into the phonetic sign indicating number, can make the people obscure, so it continued to employ in the Chinese character program language.During coding, can write Chinese conversion foreign language, also can directly write foreign language and continue to employ speech.
The sinusoidal sin cosecant of longitudinal axis y number n limit lim csc
Transverse axis x cosine cos sinh sh secant sec cotangent cot
Tangent tan cosh ch
Scientific definition speech and conventional sign are continued to employ: numerous scientific and technical notions generally all has corresponding Chinese vocabulary, for example: radius, speed, electric current, area.These vocabulary were passed compiling method with two minutes, were easy to compile out the phonetic hand over word, and computing machine also can be discerned.
Yet the scientific and technical notion that these are numerous is in the textbook of China, when formula deduction, sequential operation, expression explanation, represent with simple letter mostly, for example: " R " expression " radius ", " V " expression " speed ", " S " expression " area ", " I " expression " electric current ".Express with letter, distinct succinct, be vast Chinese intelligentsia's applications well known, if we abandon these simple letter characters, go to replace with the phonetic hand over word, fall and can complicate simple thing, this is inadvisable certainly, must continue to employ these letter characters, can directly write letter character during coding, need not change.Also but writing Chinese characters is provided with the secondary conversion, promptly after once converting the phonetic sign indicating number to, again scientific term contained in the phonetic sign indicating number is converted to letter character.For example:
Chinese | The phonetic hand over word | Letter character |
Radius | ????BRJ | ????R |
Speed | ????SXY | ????V |
Area | ????MHZ | ????S |
Illustrate: the phonetic hand over word also can not be economized, and needs under some other situation to use.
Compound word: in many cases, some words and other words, combining becomes compound word.The outer cliction of continuing to employ also can be formed compound word with Chinese character.For example: inverse sine negation word is a Chinese character, and sine is continued to employ speech for foreign language, runs into these situations, and phonetic got in Chinese character, and it is constant to continue to employ speech.Be connected with character between speech and the speech.Other Chinese-English mixed structure of inverse sine conversion f-sin also solves with the method.For example logarithm is converted to the compound word that e-dds Chinese speech and Chinese speech are formed at the bottom of the E.The division is clearly demarcated between speech and the speech, and compound word is not divined by means of characters visual and understandable.Chinese character compound word example:
1□-□□2□□-□□3□-□□□4□□-□□□5□□□-□□6□□□-□□□7□-□□-□□□。The rest may be inferred.
Syntax rule: by the Modern Chinese operating specification, arrange word order, from left to right, branch's identification is from top to bottom read.Have both selection, circulation, search, replace, side by side, bifurcated, various functions such as come and go, jump over.Chinese character program language, fundamental structural unit are speech, symbol, numeral and program statement.Use space, pause mark, branch between them.Separate, be convenient to computer Recognition and carry out.For example: the Chinese program: the date 1,2,3,4,5,6, Conversion back: rq 1,2,3,4,5,6, Branch generally is used for the statement ending.Comma: generally be used for expression formula and connect.For example:
Full Chinese expression formula: first-class in 5, the second grade is in 2, and the third gradegrade C is taken advantage of second in first;
Use stet: first=5, second=2, the third=first * second;
Hand over word expression formula: RS=5, II=2, HN=RS*II;
Other symbol and rule are analogized, and draw foreign language some rules of program language and strong point, accomplish to make foreign things serve china, and take according to qualifications.Parallel bars shieldings symbol " " plays the shielding buffer action, and the Chinese character in the parallel bars symbol, foreign language, symbol etc. are to be used for the explanatory notes program not participate in any program run.During Chinese character source program conversion phonetic source program, all do not change the Chinese character in the parallel bars symbol, foreign language, symbol, do not change.
Structured statement: the Chinese character program language, on language construction, the popular in the world structured statement of same employing.The Chinese reaches language employing order, selection, circulation basic sentence patterns.Han Dada is the base program structure with the type structure.The both incorporates the grammer of Chinese, has than big difference with foreign language on word order especially.It is procedure-oriented language that the Chinese reaches, and Han Dada then is an object-oriented language, the Chinese reach be similar to VB C language Han Dada and C++ java very approximate.
The programming example:
1, full Chinese character source program 2. conversion phonetic sign indicating number source programs
Ask cylinder volume qvzttj
# definition PA 3.1415//the get preceding two yards // #di of pronunciation PA 3.1415
Principal function () zhs ()
{ floating-point variable radius, height; { fdbl r, h;
The floating-point variable area; Fdbl s;
The floating-point variable volume; Fdbl v;
Radius equals 5.0; R=5.0;
High in 4.0; H=4.0;
Area equals PA and takes advantage of radius to take advantage of radius; S=PA*r*r;
Volume equals area and takes advantage of height; V=s*h;
Output (n decimal system f, volume) }; //f be subfunction //sc (n s, f is v) }; // when output n the s numeral replace //.
Illustrate 1, coding generally do not write full Chinese character program, and writes the Chinese character source program of band stet alphanumeric codes.Resemble and write the mathematics book, infull writing of Chinese characters is the same.
2, // double slashes is interior to be comment statement, does not participate in program run.
3, write the Chinese character source program of stet:
The high h area of # definition PA3.1415//radius r s volume v//
Principal function ()
{ floating-point variable r h;
Floating-point variable s;
Floating-point variable v;
r=5.0;
h=4.0;
s=PA*r*r;
v=s*h;
Output (" n/s f v ") };
Example 2: the children free ticket of steamship company's regulation height below 1 meter, 1 meter---1.5 meters children purchase half fare, buy unanimous vote more than 5 meters.Write the booking program: establish three variablees and be respectively: children's height, admission fee, amount of money program are as follows:
1. Chinese character source program 2. phonetic hand over word source programs
Principal function () zhs ()
{ floating-point variable height, admission fee, the amount of money; { fdbl sg, prj, je;
Input (" height, admission fee "); Sr (" sg, prj ");
Input (" s f sf " , ﹠amp; Height , ﹠amp; Admission fee) sr (sf sf ” ﹠amp; Sg , ﹠amp; Prj);
Output (n); Sc (n);
(if the height<=1) amount of money=0; Rg (sg<=1) je=0;
(if the height<=1.5) amount of money=admission fee/2 in addition; Cw rg (sg<=1.5) je=prj/2;
The amount of money=admission fee in addition; Cw je=prj;
Output (" amount of money=n the s amount of money); Sc (" je=n s je ");
Compiling with carry out: from fact, the compiling of Chinese character program language and the compiling of English program language do not have the difference on the principle.Link that the Chinese character program language is just many need be converted to the Chinese character source program phonetic source program, again the phonetic source program is compiled and carries out.The target of both compilings, the overwhelming majority is identical.For example: add+subtract-take advantage of the target program that * removed/searched these vocabulary of cz, after the compiling of English source program with all be identical after the compiling of phonetic source program, in whole Chinese character program language system and the English program language system, same like this and similar situation reaches more than 95%.
Certainly, Chinese character program language and english language also have difference, and one of them bigger difference is that word order is arranged, and from the angle of Chinese, english language mostly is the inversion sentence, and word order is just in time opposite with Chinese.When the compiling of phonetic source program is set, should have taken into full account this point, and solve well.The compiling of Chinese character program language and execution generally are divided into five steps:
The one, Chinese character conversion phonetic.After the programmer writes source program with Chinese, through inspecting the input calculator memory, convert the phonetic source program to, conversion is to be finished by a software, software is wrong as finding the Chinese character source program in the transfer process, will indicate immediately as: the hand over word of certain Chinese speech with keep speech and clash computing machine and can carry out passing in two minutes coding automatically and dodge and hold.If grammar mistake is arranged, computing machine can show caution, allows the people revise and corrects a mistake.Mistake is presented in the Chinese character source program, and is intuitively readable, is found easily to be convenient to entangle to change, and it is complicated to do switching software design meeting certainly like this.
The 2nd, editor.Convert the source program of phonetic alphabet to, point out faults during editor, revise the back generation and reach with the Chinese, ' HD ' or ' H ' is the file of suffix name, and compiles the storage of American Standard Code for Information Interchange form, and this can't directly be carried out by computing machine.Also need to compile.
The 3rd, compiling.Compiling will be changed exactly to edit and become the phonetic of American Standard Code for Information Interchange source program, translate into binary object program.Binary object code, computing machine can't directly be carried out, must each independently module synthesis connect, and place under the operating system, could move.
The 4th, connect.The binary object code of each module, through connecting the executable file that obtains specific address, file is that suffix also can keep the exe suffix with zxj.
The 5th, carry out.The Chinese program language after conversion, editor, compiling, connecting, has finally obtained executable file destination, and these files can be worked and carry out under the support and management of Operational Management System.We can make a whole software to conversion, editor, compiling, connection, test, and the user can finish whole work under the indication of window.This software just makes the Chinese reach the conversion compiler.Compiling and execution block diagram are seen accompanying drawing 2.
International standard keyboard: Chinese character program language software uses keyboard that three kinds of methods are arranged:
1, complete reservation international standard keyboard covers the phonetic hand over word with English key.
Esc | Withdraw from | Tc | Pageup | Page up | Siy | ?Num?lock | Number lock | Szsd |
Tab | The position mark | Wb | Pagedown | Following one page | Xiy | The form key | Scj | |
Enther | Carriage return | Hc | Home | First trip | Sh | ?Sleep | The dormancy key | Xmj |
Capslock | The letter locking | Zmsd | End | Footline | Mh | ?Wake?up | Activate key | Jhj |
Alt | Select | Xz | Insert | Insert | Cr | ?↑ | On move | Si |
Ctrl | Control | Kz | Di | ?↓ | Move down | Xi | ||
Shift | Shift | Sdj | Pause | Stop | Zz | ?← | Move to left | Zi |
Delete | Deletion | Sc | Scroll | Roll | Gd | ?→ | Move to right | Yi |
← | Backspace | Tg |
2. for adapting to the part human needs, cover hand over word with Chinese character cloth key..
3, with the direct cloth key of phonetic hand over word.
The unsimplified Hanzi program language: make program language with unsimplified Hanzi, several different methods is arranged, principle is identical with the simplified Chinese character method.With two minutes three minutes passing compiling methods, complex form of Chinese characters direct coding is changed.It is identical that compiling method passed in two minutes in this method and simplified Chinese character, unique difference be with the various individual character three of stroke split get for example three-code encoded: " " word splits into sound+an ancient weapon made of bamboo+ear=SSE and divines by means of characters when encoding, and makes radical with many simplified whole words, gets its pronunciation coding.With the unsimplified Hanzi source program, with (traditional font-simplified phonetic sign indicating number) switching software,, convert the source program of alphabetic coding to directly with complex form of Chinese characters source program, this method is simple and reliable.
Processor-oriented program language: promptly using the phonetic hand over word, serves as basic with existing high level language such as C, VB, gets both length, incorporates feature of Chinese language, changes and compiles, and be processor-oriented Chinese character program language substantially.
OO program language uses the phonetic hand over word equally, serves as basic with high level language such as c++java, gets both length, adds the Chinese grammar characteristics, and change and compile, be OO Chinese character program language, its development prospect is very good.1, hand over word dictionary example:
Dark ri north jb table qi third hn not the long pt of hx difference lpg take advantage of * remove/big hr hangs down gd point zd fourth hg at the bottom of the rd | The anti-fy of the short sd heap many xx of tz of deb east, top cx is put the useless gf of the non-ff of fff and is divided the negative high gg of db of the no bk of bd and hk | Behind the red jg of the grand ag of horizontal mh the long-pending hk of fg or gk add+the false rx alkali of first rs sx subtracts-falls az angle dy piece tg | Wide ax comes that the bright gi of je stays rt in the sk of that na south of the bright rv mould of the green jl of ad hs second mm in the cold dl of the blue cj of wd | The light cj of the strong gs of the shallow dj of qv goes the few dark ds of xp of the weak gd merchant lt of the hot tw of ts to rise pn before the strange Dk of dense dt idol rv | Beginning nt is that the perpendicular xl acid of rp receipts jf yj compares bcj Currency Type bhz with the outer xb of th west uk to the right yk of the different sn of the little sb second of pg ii | Return fh with the left yg of the positive hz value of the hu circle fv true sj of this wz of narrow xz of vh territory th unit rz to the zt heavy qr of whole jd and amplify fd |
Other word, vocabulary, statement were passed coding method in two minutes and are analogized.
Passed coding two fens Chinese character tables commonly used in two minutes:
Different sn sound lr draw gs answer the hard kg of gx reflect ry Y with the excellent ry sorrow of tn ly uranium jy still qy the right yk of yv friend yy is arranged in the surplus rv of dh | Sigh the kv former cb circle fv source dv of the pre-vy hu of the unit vz aw of institute far away with vh territory th and get over the fair se fortune of zv key jv vz Z calamity ah | Carry the temporary zr soap of we kz of zc bq then bl why the narrow xz of zx opens gc account jc barrier Zhao az zc according to the true sj pin of this wz of zd js shake vc | Positive hz political affairs zf props up the straight sm value of sy rz location tz and refers to that tz ends the many rc of the heavy qr of the whole jd kind of ks clock jz hz among a ss kb to the zt nk processed | Axle Zhu cy nb candle hc master dw helps ql to annotate dz to be turned to cz dress zi and chases after the accurate dz of iz and ym money cb lh and walk tz from the vertical jc of pm word az | Renting the left yg of rq of hq ancestral sq resistance group jq makes rz and sits the ct not stunned le of the ul child fn note of the ancient Chinese rs Buddhist nunnery ga lt girl nc moving to and fro of the narrow cr of pd that dies young | The ji jade or pearl earring we beautiful jade wi pestle mu reed mv eucalyptus ma nanmu mn that hangs makes a gift of bt astatine sa gadolinium jz beryllium jp kite in swan gn long, rectangular bag il swaddling clothes iq and listens the pious hw of el |
The coding method in two fens of other Chinese character is analogized, and Chinese character was mainly used in combination vocabulary and statement in two minutes, made it not repeated code.The independent use only got wherein part.
Claims (10)
1, a kind of Chinese character programmed method, it is characterized in that: directly write computer source program with Chinese character, passed compiling method in two minutes to the source program automatic coding with Chinese character then, convert the phonetic source program again to, behind editor, become American Standard Code for Information Interchange, through compiling, become the target program that computing machine can be discerned execution at last.
, Chinese character programmed method according to claim 1, it is characterized in that: compiling method passed in described Chinese character two minutes is to adopt the pronunciation code of stroke, radicals by which characters are arranged in traditional Chinese dictionaries, the radical coding of divining by means of characters.
3, Chinese character programmed method according to claim 1 is characterized in that: described program compiler is meant procedure-oriented and OO program compiler.
4, Chinese character programmed method according to claim 1, it is characterized in that: described Chinese character was passed compiling method in two minutes and is adopted two fens Chinese characters in common use tables, and adopt Chinese character source program-alphabetical source program function converse routine and adopt alphabetical source program-Chinese character source program memory converse routine, keep former input Chinese speech when converting alphabetical source program to the Chinese character source program.
5, Chinese character programmed method according to claim 1 is characterized in that: adopt the hand over word dictionary that editor changed in various different Chinese character program languages.
6, Chinese character programmed method according to claim 1, it is characterized in that: the custom words in the conversion editing process adopts autocoder, and adopt the exclusive cause and effect sign of operation of Chinese, hyphen-or stain form Han-Han, Han-Ying compound word, compound word is not divined by means of characters.
7, Chinese character programmed method according to claim 1 is characterized in that: keep international standard keyboard fully with cladding process, or be provided with Hanzi keyboard and phonetic hand over word keyboard as required.
8, Chinese character programmed method according to claim 1 is characterized in that: keep international general calculation machine linguistic notation, and continued to employ the letter character of science vocabulary, continue to employ part alphabet and code, it comprises that radius is R, and speed is V, and area is S.
9, Chinese character programmed method according to claim 1 is characterized in that: adopt unsimplified Hanzi source program-simplified phonetic hand over word switching software when unsimplified Hanzi is edited.
10, Chinese character programmed method according to claim 1 is characterized in that: unsimplified Hanzi is adopted passed compiling method in two, three minutes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA031247016A CN1514362A (en) | 2003-07-27 | 2003-07-27 | Chinese character programming method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA031247016A CN1514362A (en) | 2003-07-27 | 2003-07-27 | Chinese character programming method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1514362A true CN1514362A (en) | 2004-07-21 |
Family
ID=34239551
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA031247016A Pending CN1514362A (en) | 2003-07-27 | 2003-07-27 | Chinese character programming method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1514362A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103543997A (en) * | 2012-07-17 | 2014-01-29 | 于丙超 | Three-word programming method |
-
2003
- 2003-07-27 CN CNA031247016A patent/CN1514362A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103543997A (en) * | 2012-07-17 | 2014-01-29 | 于丙超 | Three-word programming method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1191514C (en) | System and method for processing chinese language text | |
JP4558482B2 (en) | National language character information optimization digital operation coding and input method and information processing system | |
CN101131689B (en) | Bidirectional mechanical translation method for sentence pattern conversion between Chinese language and foreign language | |
CN1043210A (en) | Character Root Code Input Method And Apparatus | |
CN101196881A (en) | Words symbolization processing method and system for number and special symbol string in text | |
CN1591414A (en) | Automatic translating converting method for Chinese language to braille | |
CN102479078A (en) | Chinese programming method for computer by using Chinese phonetic codes | |
CN106372039A (en) | Standard Chinese information ASCII system codes | |
CN103246354A (en) | Inputting method for encoding and expressing Chinese characters through common language characters and keyboards of inputting method | |
CN1514362A (en) | Chinese character programming method | |
CN1081353C (en) | Latinized phonetic codes for modern Chinese works | |
CN1053976C (en) | Full and double phoneticizing combined type Chinese input method | |
CN1018205B (en) | Chinese voice-digit coding input technique for computer | |
CN1257444C (en) | Complete pronunciation Chinese input method for computer | |
CN1054219C (en) | Substitution type Chinese phonetic character, word input coding method and keyboard thereof | |
Namboodiri et al. | On using classical poetry structure for Indian language post-processing | |
Joshi et al. | A phonemic code based scheme for effective processing of Indian Languages | |
CN1257445C (en) | Chinese-character 'Pronunciation-meaning code' input method | |
CN1050206C (en) | Regular Chinese phonetic alphabet Chinese character input method | |
CN107315725A (en) | Standard Chinese information ASCII gathers code | |
CN1088211C (en) | Chinese character positive and negative singular radicals periodic table and radicals digital code input method | |
CN101034319A (en) | Chinese character input method and special-purpose keyboard thereof | |
CN1542591A (en) | Chinese spelling simulation input method | |
CN1109283C (en) | Phonetic Chinese word encoding and its keyboard | |
CN1114146C (en) | Chinese morpheme code and its computer keyboard input |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |