JPH0640329B2 - Character processing apparatus and method - Google Patents
Character processing apparatus and methodInfo
- Publication number
- JPH0640329B2 JPH0640329B2 JP57013083A JP1308382A JPH0640329B2 JP H0640329 B2 JPH0640329 B2 JP H0640329B2 JP 57013083 A JP57013083 A JP 57013083A JP 1308382 A JP1308382 A JP 1308382A JP H0640329 B2 JPH0640329 B2 JP H0640329B2
- Authority
- JP
- Japan
- Prior art keywords
- width
- character
- characters
- full
- character string
- 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.)
- Expired - Lifetime
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Input From Keyboards Or The Like (AREA)
- Digital Computer Display Output (AREA)
- Document Processing Apparatus (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、半巾文字(半角文字)及び全巾文字(全角文
字)が混在した文字列に関する処理を行う文字処理装置
に関する。Description: TECHNICAL FIELD The present invention relates to a character processing device that performs processing on a character string in which half-width characters (half-width characters) and full-width characters (full-width characters) are mixed.
従来半巾文字(半角文字)と全巾文字(全角文字)との
混在した文字列を扱うことのできる文字処理装置があつ
た。Conventionally, there is a character processing device that can handle a character string in which half-width characters (half-width characters) and full-width characters (full-width characters) are mixed.
この文字処理装置の構成方法として大きく二つに分ける
ことができる。一つは、半巾単位に文字列の処理を行う
ことができるものであり他は、全巾単位に文字列の処理
を行うことができるものである。The character processing device can be roughly divided into two methods. One is capable of processing character strings in units of half width, and the other is capable of processing character strings in units of full width.
前者は、半巾文字も全巾文字も全て半巾単位に定められ
た位置に入出力あるいは編集を行うことができるもので
あり、後者が全巾単位に定められた位置にしか入出力編
集処理を行うことができないのと比べ機能的に優れてい
る。しかしながら、前者はそれだけハードウエア処理あ
るいはソフトウエア処理における負担が大きいこと、
又、オペレータにとつて半巾単位に入力編集を行なう対
象文字の位置を指定しなければならないといつた欠点が
有り、後者もそれなりに優れた点を持つている。The former is capable of inputting / outputting or editing both half-width characters and full-width characters at a position defined by a half-width unit, and the latter performs input / output editing processing only at a position defined by a full-width unit. Functionally superior to not being able to. However, in the former, the load on the hardware processing or software processing is large,
Further, there is a drawback that the operator has to specify the position of the target character to be input / edited in half width units, and the latter also has its own advantages.
本発明は、後者の構成に成る装置に関するものであり、
それは従来例えば次のように構成されていた。The present invention relates to a device having the latter configuration,
It has been conventionally constructed, for example, as follows.
即ち、キーボードからの入力は半巾文字又は全巾文字と
して入力でき、それによりオペレータは文章を作成して
いく。その時、半巾文字は必ず2文字単位で入力するよ
うにし、半巾文字2文字で全巾文字1文字と同等に取扱
つていくようにする。入力あるいは一度入力した文字列
の編集を行おうとする時は、カーソルを該当位置に移動
した上で行うのであるが、その位置は全巾単位に指定で
きるものであり、半巾文字に対しては常に半巾文字2文
字単位に指定し、その単位で取扱うことになる。このよ
うにして半巾文字と全巾文字との混在文字列の処理を実
現している。That is, the input from the keyboard can be input as half-width characters or full-width characters, whereby the operator creates sentences. At that time, be sure to input half-width characters in units of two characters so that two half-width characters can be handled in the same way as one full-width character. When you try to enter or edit a character string once entered, move the cursor to the corresponding position, but that position can be specified in full width unit, and it is always for half width characters. It will be specified in units of two half-width characters and handled in that unit. In this way, processing of a mixed character string of half-width characters and full-width characters is realized.
しかしながら、従来のこの種の文字処理装置において
は、半巾文字列及び全巾文字列が混在した文字列の内の
1つの半巾文字を削除しようとして、その半巾文字以降
の半巾文字を1つずつ前ずめにし、半巾削除を行なおう
とする試みが考えられるが、その場合半巾文字列に後続
する全巾文字列の位置は、半巾文字列の一部を削除して
も、いつまでも同じ位置にとどまるだけで、前づめがさ
れず間に空白だけが広がり不自然な状態が発生する。However, in the conventional character processing device of this type, one half-width character after the half-width character is deleted one by one in an attempt to delete one half-width character in the character string in which the half-width character string and the full-width character string are mixed. An attempt may be made to delete the full-width characters, and in that case, the position of the full-width character string that follows the half-width character string will remain in the same position forever even if part of the half-width character string is deleted. Only then, the spaces are not spread and the unnatural state occurs.
本発明の目的は、半巾文字列の内の一つの文字を削除す
るにあたつて、その文字以降の文字を1つずつ前ずめに
し、最後に新たに半巾スペースを付加させることによ
り、半巾削除を実現しようとする文字処理装置を提供す
ることにある。An object of the present invention is to delete one character in a half-width character string, to make the characters after that character one by one, and to add a new half-width space at the end. An object is to provide a character processing device that realizes deletion.
本発明の他の目的は、全巾1文字又は半巾2文字を単位
として処理を行う文字処理装置にあつてより自然な形で
半巾文字の1文字を削除することができる文字処理装置
を提供することにある。Another object of the present invention is to provide a character processing device that can delete one half-width character in a more natural manner in a character processing device that processes one full-width character or two half-width characters as a unit. Especially.
本発明の他の目的は、半巾文字列の内の一つの文字を削
除するにあたつてその文字以降の文字を1つずつ前ずめ
にし、最後に新たに半巾スペースを付加させようとする
文字処理装置にあつて、最後に付加した半巾スペースコ
ードによつて、2文字(あるいは2文字以上)連続して
半巾スペースが並ぶ結果になつた時その2つの半巾スペ
ースコードを一括して削除することによりさらに後続す
る全巾文字列等を前にくり上げることにより、より自然
な形での削除を行える文字処理装置を提供することにあ
る。Another object of the present invention is to delete one character in a half-width character string, to make the characters after that character one by one, and to add a new half-width space at the end. In the character processing device, when the half width space code added at the end causes two (or more) characters to be lined up with a half width space, the two half width space codes are collectively deleted. Thus, a character processing device capable of deleting in a more natural form is provided by curving up the succeeding full-width character string and the like to the front.
本願発明に係る文字処理装置は、全巾文字及び半巾文字
を入力するための入力手段と、該入力手段により入力さ
れた全巾文字及び半巾文字が混在した文字列を記憶する
記憶手段と、半巾文字の削除を指示する指示手段と、該
指示手段の指示に基づき半巾文字を削除する削除手段
と、前記削除手段により削除される半巾文字に続く半巾
文字列を半巾分前詰めにする時に、前記半巾文字列を最
後が該半巾文字列に続く全巾文字の表示位置のずれを防
ぐために付加される半巾ダミーキャラクタの場合、該半
巾ダミーキャラクタを削除し、前記半巾文字列を半巾分
前詰めし、前記半巾文字列の最後が前記半巾ダミーキャ
ラクタでない場合、前記半巾文字列を半巾分前詰めし、
該半巾文字列の後に前記半巾ダミーキャラクタを付加す
る調整手段とから成る。A character processing device according to the present invention includes input means for inputting full-width characters and half-width characters, storage means for storing a character string in which full-width characters and half-width characters input by the input means are mixed, and half-width characters. Instructing means for instructing deletion of characters, deleting means for deleting half-width characters in accordance with an instruction of the instructing means, and when the half-width character string following the half-width characters deleted by the deleting means is moved forward by half width, In the case of a half-width dummy character that is added at the end of the half-width character string to prevent the display position of full-width characters following the half-width character string from being shifted, the half-width dummy character is deleted and the half-width character string is shifted to the half-width forward If the end of the half-width character string is not the half-width dummy character, the half-width character string is moved forward by half width,
Adjusting means for adding the half-width dummy character after the half-width character string.
また、本願発明に係る文字処理方法は、入力される全巾
文字及び半巾文字を記憶し、記憶された全巾文字及び半
巾文字を表示装置に表示し、半巾文字の削除が指示され
た場合、該指示に基づき半巾文字を削除し、削除された
半巾文字に続く半巾文字列を半巾分前詰めして表示する
時に、前記半巾文字列の最後が該半巾文字列に続く全巾
文字の表示位置のずれを防ぐために付加される半巾ダミ
ーキャラクタの場合、該半巾ダミーキャラクタを削除
し、前記半巾文字列を半巾分前詰めし、前記半巾文字列
の最後が前記半巾ダミーキャラクタでない場合、前記半
巾文字列を半巾分前詰めし、該半巾文字列の後に前記半
巾ダミーキャラクタを付加する。Further, the character processing method according to the present invention stores the input full-width characters and half-width characters, displays the stored full-width characters and half-width characters on the display device, and when deletion of half-width characters is instructed, When the half-width character is deleted based on the instruction and the half-width character string following the deleted half-width character is displayed with the half-width justified, the end of the half-width character string is displayed at the display position of the full-width character. In the case of a half-width dummy character added to prevent deviation, the half-width dummy character is deleted, the half-width character string is moved forward by half width, and if the end of the half-width character string is not the half-width dummy character, the half-width character The row is justified by half width, and the half width dummy character is added after the half width character string.
[実施例] 本発明の一実施例を説明する。[Example] An example of the present invention will be described.
第5図に本実施例の構成を示す。以下各構成要素を説明
する。FIG. 5 shows the configuration of this embodiment. Each component will be described below.
CPUは、中央演算処理ユニツトであり、本実施例の制
御を行う。The CPU is a central processing unit and controls the present embodiment.
ROMは、コントロールプログラムが格納される制御メ
モリであり、第7図〜第10図に示す制御プログラムが
格納される。The ROM is a control memory that stores a control program, and stores the control program shown in FIGS. 7 to 10.
RAMは、ランダムアクセスメモリであり、制御メモリ
ROMに格納された制御プログラムが実行されるにあた
つてのワークレジスタとして使用される。The RAM is a random access memory and is used as a work register for executing the control program stored in the control memory ROM.
KB1,KB2,KB3は、キーボードであり、操作者
が本装置に対する入力を行う。KB1は全巾文字を入力
するためのキーボードであり、KB1の内の1つのキー
を押下することにより、第6図(a)に示す全巾文字コー
ドが出力される。KB1, KB2 and KB3 are keyboards, and the operator inputs to this apparatus. KB1 is a keyboard for inputting full-width characters, and when one of the keys in KB1 is pressed, the full-width character code shown in FIG. 6 (a) is output.
KB2は半巾文字を入力するためのキーボードであり、
KB2の内の任意の二つのキーを押下することにより、
半巾文字を二つペアにした形でデータが出力される。第
6図(b)がその時に出力される二つの半巾文字を示すコ
ードである。KB2 is a keyboard for entering half-width characters,
By pressing any two keys in KB2,
The data is output in the form of two half-width characters. FIG. 6 (b) is a code showing two half-width characters output at that time.
KB3はフアンクシヨンキーから成る。KB3 consists of a function key.
入力を開始する時に使用するイニシヤライズキーIN
T, 入力した文字列を半巾化することを指示する半巾化キー
HZ, 入力した半巾文字の削除をするにあたつてカーソルが指
し示す2つの半巾文字列の左側を削除することを指示す
る左削除キーLD, 入力した半巾文字の削除をするにあたつてカーソルが指
し示す2つの半巾文字列の右側を削除することを指示す
る右削除キーRD, 入力した全巾文字を削除することを指示する全巾削除キ
ーAD, 入力した文字列を全巾化する全巾化キーAZ, CRT上のカーソルを移動させるカーソルキーCU, 等から成る。Initialization key IN used to start input
T, a half-width key HZ for instructing to half-width the input character string, left deletion for instructing to delete the left side of the two half-width character strings indicated by the cursor when deleting the input half-width character Key LD, right delete key RD to delete the right half of the two half-width characters pointed to by the cursor when deleting the half-width character entered, full delete to enter the full-width character entered A width deletion key AD, a full width key AZ for making the input character string full width, a cursor key CU for moving the cursor on the CRT, and the like.
BUF1はキーボードKB1,KB2から入力された文
字列を蓄えるバツフアーであり、このバツフアー内に文
章等情報が蓄えられる。The BUF1 is a buffer for storing character strings input from the keyboards KB1 and KB2, and information such as sentences is stored in this buffer.
又BUF1の内容は後述するDISPに表示される。The contents of BUF1 are displayed on DISP described later.
本実施例の場合、バツフアBUF1の容量は、全巾文字
が32文字分収納される容量である。In the case of the present embodiment, the capacity of the buffer BUF1 is a capacity for storing 32 full-width characters.
BUF2は、ワーク用バツフアであり、バツフアBUF
1と同等の容量を有する。BUF2 is a work buffer and is a buffer BUF.
It has the same capacity as 1.
CPはカーソルポインタで、表示装置DISP上に示さ
れるカーソルのアドレスを格納するレジスタであり、表
示装置DISP上のカーソルと、バツフアBUF1のア
ドレスとを対応づけるものである。CP is a cursor pointer, which is a register for storing the address of the cursor shown on the display device DISP, and associates the cursor on the display device DISP with the address of the buffer BUF1.
DISPは、カーソルポインタCPによつて示される位
置にカーソルを表示し、又バツフアBUF1の内容を表
示する表示装置である。本実施例の場合第1図(a)に示
すように横8文字縦4行の文字列が表示される。The DISP is a display device that displays the cursor at the position indicated by the cursor pointer CP and also displays the contents of the buffer BUF1. In the case of this embodiment, as shown in FIG. 1 (a), a character string of 8 horizontal characters and 4 vertical rows is displayed.
以上の構成より成る本実施例の動作を第7図〜第10図
を用い詳述する。The operation of this embodiment having the above configuration will be described in detail with reference to FIGS.
電源をONすると、以下の作動を行なう。When the power is turned on, the following operations are performed.
まずステツプ1でキーボード上のキーが操作されたかを
調べる処理が行なわれる。もしキーが操作されれば、ス
テツプ2以下の処理に移つて行き、操作されたキーに応
じた処理がなされる。First, in step 1, a process for checking whether a key on the keyboard has been operated is performed. If the key is operated, the process proceeds to step 2 and subsequent steps, and the process corresponding to the operated key is performed.
1.KBからのデータの入力を待つ。もし入力が有れば
ステツプ2に進む。1. Wait for data input from KB. If there is an input, go to step 2.
2.KB(KB1,KB2,KB3)からのデータを入
力する。2. Input the data from KB (KB1, KB2, KB3).
3.入力したデータの種別により処理の方法を判断す
る。もしイニシヤライズキーであるならステツプ4に進
む。もし、文字キーであるならステツプ5に進む。もし
半巾化キーであるならステツプ6に進む。もし左削除キ
ーであるならステツプ7に進む。もし、右削除キーであ
るならステツプ8に進む。もし、全巾削除キーであるな
らステツプ9に進む。もし、全巾化キーであるならステ
ツプ10に進む。もし、カーソルキーであるならステツ
プ11に進む。3. The processing method is determined according to the type of input data. If it is the initialize key, proceed to step 4. If it is a character key, go to step 5. If it is the half width key, proceed to step 6. If it is the left delete key, proceed to step 7. If it is the right delete key, proceed to step 8. If it is the full width delete key, the process proceeds to step 9. If the key is the full width key, the process proceeds to step 10. If it is the cursor key, proceed to step 11.
4.イニシヤライズ処理を行う。即ち各種バツフア,レ
ジスタのイニシヤライズを行なう。4. Performs initialization processing. That is, various buffers and registers are initialized.
5.文字入力処理を行なう。即ち入力したデータを、バ
ツフアBUF1の中に書き込む。書き込む位置はカーソ
ルポインタCPが指し示す位置に対応したアドレスの位
置である。書き込んだ後はカーソルを1つ進める。5. Performs character input processing. That is, the input data is written in the buffer BUF1. The writing position is the position of the address corresponding to the position pointed by the cursor pointer CP. After writing, move the cursor forward by one.
6.半巾化処理を行う。即ちバツフアBUF1に蓄えら
れた情報の半巾化を行う。詳細は後述する。6. Perform half width processing. That is, the information stored in the buffer BUF1 is reduced to half width. Details will be described later.
7.左削除処理を行う。即ちカーソルが存在している位
置の文字が半巾2文字から成る時、その左部分の削除を
行なう。詳細は後述する。7. Performs left deletion processing. That is, when the character at the position where the cursor is present consists of two half-width characters, the left part is deleted. Details will be described later.
8.右削除処理を行う。即ちカーソルが存在している位
置の文字が半巾2文字から成る時、その右部分の削除を
行う。詳細は後述する。8. Right delete processing is performed. That is, when the character at the position where the cursor is present consists of two half-width characters, the right part is deleted. Details will be described later.
9.全巾削除処理を行う。即ちカーソルが存在している
位置の文字が全巾文字であるならば、その文字を削除
し、後続する文字をすべて左づめにする。9. Perform full width deletion. That is, if the character at the position where the cursor is located is a full-width character, that character is deleted and all the characters that follow are left-justified.
10.全巾化処理を行う。即ちバツフアBUF1に蓄えら
れた文字列の全てを全巾化する。詳細は後述する。Ten. Perform full width processing. That is, all the character strings stored in the buffer BUF1 are made full width. Details will be described later.
11.カーソル移動処理を行う。カーソルを1つ歩進させ
る。もし、カーソルがバツフアBUF1の末尾をさして
いるならば、カーソルをバツフアBUF1の先頭を指す
ようにする。カーソルを1つ歩進させるためには、カー
ソルポインタCPを1つインクリメントし、カーソルを
バツフアBUF1の先頭に対応する位置に持つてくるに
はカーソルポインタCPを0にクリアすれば良い。11. Performs cursor movement processing. Move the cursor one step forward. If the cursor points to the end of the buffer BUF1, the cursor points to the beginning of the buffer BUF1. In order to advance the cursor by one, the cursor pointer CP may be incremented by one, and the cursor pointer CP may be cleared to 0 to bring the cursor to the position corresponding to the beginning of the buffer BUF1.
前述のステツプ6の半巾化処理について第8図を参照し
てさらに説明する。かかる処理の各ステツプの内容を以
下に示す。The half width processing of step 6 will be further described with reference to FIG. The contents of each step of this processing are shown below.
6.1BUF1に入つている情報をすべてBUF2に移
す。その際、既に半巾になつている文字は全て全巾に変
換した後BUF2に移すものとする。又半巾スペースの
直ぐ次に全巾文字がある時、その半巾スペースは無意味
なスペースであるのでBUF2へは移さないものとす
る。6.1 All the information contained in BUF1 is moved to BUF2. At this time, all the characters that are already half width are converted to full width and then moved to BUF2. If there is a full-width character immediately after the half-width space, that half-width space is meaningless and should not be moved to BUF2.
6.2BUF2にセーブされた情報を再びBUF1に戻
す。その際必ず二文字ずつパツキングを行ないながら移
す。二文字の全巾文字を二文字の半巾文字にパツキング
するためには各一文字ごとに半巾文字コードを求め、第
6図に示すフオーマツトに従つて、16bitのパツキン
グされたコードにする。6.2 The information saved in BUF2 is returned to BUF1 again. At that time, be sure to transfer each two characters while doing the packing. In order to pack two full-width characters into two half-width characters, a half-width character code is obtained for each character, and a 16-bit packed code is obtained according to the format shown in FIG.
上述のステツプ6.1によつて行なわれた結果を第1図
(b)に示す。かかる処理についてさらにその詳細を後述
する。またステツプ6.2によつて得られた結果を第1
図(c)に示す。FIG. 1 shows the result obtained by the above-mentioned step 6.1.
Shown in (b). The details of this processing will be described later. The results obtained according to step 6.2 are
It is shown in Figure (c).
第8図を参照しステツプ6.1の詳細を以下に示す。Details of step 6.1 are shown below with reference to FIG.
6.1.1バツフアBUF1の内容を順に全巾文字分づ
つ1つ取り出す。6.1.1 Extract the contents of buffer BUF1 one by one for each full width character.
6.1.2取り出したデータをバツフアBUF2に順に
セーブするのであるが、その前に場合分けをする。6.1.2 The fetched data is saved in the buffer BUF2 in order, but before that, the cases are divided.
即ち、セーブしようとするデータが、全巾文字データで
あるならば、ステツプ6.1.5に進む。否なら6.
1.3に進む。That is, if the data to be saved is full width character data, the process proceeds to step 6.1.5. If not 6.
Proceed to 1.3.
6.1.3セーブしようとしているデータの次のデータ
が全巾文字データであるならステツプ6.1.4に進
む、否ならステツプ6.1.6に進む。6.1.3 If the data following the data to be saved is full width character data, proceed to step 6.1.4, otherwise proceed to step 6.1.6.
6.1.4セーブしようとしているデータは、二文字の
半巾文字データであるが、その二文字の内右側の文字が
スペースであるならば、ステツプ6.1.7に進む。否
ならステツプ6.1.6に進む。6.1.4 The data to be saved is two-character half-width character data. If the character on the right side of the two characters is a space, proceed to step 6.1.7. If not, proceed to step 6.1.6.
6.1.5セーブしようとするデータは、1文字の全巾
文字データであり、そのデータをBUF2に順に移す。6.1.5 The data to be saved is full width character data of one character, and the data is sequentially transferred to BUF2.
6.1.6セーブしようとするデータは2文字の半巾文
字データであり、その二文字の半巾文字データを二文字
の全巾文字データに変換し、BUF2に順に移す。それ
らのデータ構造は第6図に示す通りであり容易に全巾コ
ードに変換することができる。6.1.6 The data to be saved is two-character half-width character data, and the two-character half-width character data is converted into two-character full-width character data, which are sequentially transferred to BUF2. The data structure thereof is as shown in FIG. 6 and can be easily converted into the full width code.
6.1.7セーブしようとするデータは、2文字の半巾
文字コードであり、かつその右側の文字は、スペースで
ある。この場合は、左側文字のみセーブすることにす
る。6.1.7 The data to be saved is a two-character half-width character code, and the character to the right of it is a space. In this case, only the left character will be saved.
6.1.8BUF1にあるデータを全て、上記の方法に
よりBUF2に移すまで6.1.1〜6.1.7までの
ステツプを繰り返す。The steps from 6.1.1 to 6.1.7 are repeated until all the data in 6.1.8 BUF1 is transferred to BUF2 by the above method.
上述のステツプ6の半巾化処理により第1図(a)に示す
如き形態のバツフアBUF1の内容を第1図(c)に示す
如き形にさせる。従つて全巾文字と半巾文字が混在して
いる文字列の半巾化を行なうことができる。By the half width processing of step 6 described above, the contents of the buffer BUF1 having the form shown in FIG. 1 (a) are made to have the form shown in FIG. 1 (c). Therefore, a full width character and a half width character can be converted into a half width character string.
次に第7図に示すステツプ7の左削除処理の詳細を第9
図を参照して説明する。Next, the details of the left deletion processing of step 7 shown in FIG.
It will be described with reference to the drawings.
その各ステツプの詳細の内容を以下に示す。The details of each step are shown below.
7.1カーソルが存在する位置の文字が、全巾文字であ
るならリターンする。否ならば即ち2つの半巾文字から
成るならばステツプ7.2に進む。7.1 Return if the character at the position of the cursor is a full width character. If not, ie if it consists of two half-width characters, proceed to step 7.2.
7.2半巾文字列がカーソル以降どこまで続くかその範
囲を決定する。7.2 Determine the range to which the half width character string continues after the cursor.
7.3ステツプ7.2で決定された範囲内で先頭の半巾
文字を削除し、以降に続く全ての半巾文字列を左へ1文
字分だけシフトし、末尾には半巾スペースを1つ埋め
る。7.3 Steps Delete the leading half-width characters within the range determined in 7.2, shift all the trailing half-width characters by 1 character to the left, and fill one trailing half-width space at the end.
7.4末尾に追加した半巾スペースの直ぐ左隣りの半巾
文字がスペースであるならステツプ7.5に進む、否な
らリターンする。7.4 If the half-width character immediately to the left of the half-width space added at the end is a space, proceed to step 7.5, otherwise return.
7.5追加した半巾スペースと直左の半巾スペースとの
二つの半巾スペース文字を一括して削除する。即ち、二
つの半巾スペースを一つの全巾スペースと同等と見なし
削除を行ない、以降に続くすべての文字を全巾1文字分
だけ左側にシフトする。この処理はステツプ9と同等で
ある。7.5 Delete the added half-width space and the left half-width space character at once. That is, the two half-width spaces are regarded as one full-width space and deleted, and all the characters that follow are shifted to the left by one full-width character. This process is equivalent to step 9.
上述の処理を実行することにより例えば第3図(a)に示
す如き内容がバツフアBUF1に入つているとき、カー
ソルで指示された「DE」のうちの左側の「D」が削除
され、そこで「D」以降に続く半巾文字列「EFGHI
JK」をすべて半巾1文字分前に詰め(左方向に詰め
る)末尾に半巾スペースを追加する。かかる処理結果が
第3図(b)である。When the contents shown in FIG. 3 (a) are contained in the buffer BUF1 by executing the above-mentioned processing, the left "D" of the "DE" designated by the cursor is deleted, and " Half-width character string "EFGHI" after "D"
All "JK" are padded one character before the full width (pad to the left) and a half width space is added at the end. The result of this processing is shown in FIG.
次にステツプ8の右削除処理の詳細を第9図を参照して
説明する。第9図に示す右削除処理の各ステツプの内容
は以下の通りである。Next, details of the right deletion processing in step 8 will be described with reference to FIG. The contents of each step of the right deletion processing shown in FIG. 9 are as follows.
8.1カーソルが存在する位置の文字が、全巾文字であ
るならリターンする。否ならば即ち二つの半巾文字から
成るならばステツプ8.2に進む。8.1 If the character at the position of the cursor is a full width character, return. If not, ie if it consists of two half-width characters, proceed to step 8.2.
8.2カーソル以降、半巾文字が連続して続く範囲を求
める。8.2 After the cursor, find the range where half-width characters continue in succession.
8.3カーソルが存在する位置の次の文字が、半巾文字
であるなら、それ以降に続く半巾文字をすべて半巾文字
分だけ左づめ(前づめ)にし、末尾に半巾スペースを1
つ追加する。その範囲はステツプ8.2で決定された範
囲である。もし、カーソルが存在する位置の次の文字が
全巾文字であるならば、カーソルが存在する位置の二つ
の半巾文字の内右側の半巾文字を半巾スペースに変更す
る。8.3 If the character next to the position where the cursor is located is a half-width character, all the following half-width characters are left-justified by a half-width character (earlier) and a half-width space is added at the end.
Add one. The range is the range determined in step 8.2. If the next character after the cursor is a full width character, the right half width character of the two half width characters at the cursor position is changed to a half width space.
8.4追加又は変更された半巾スペースの直前(直左)
の半巾文字が半巾スペースであるならばステツプ8.5
に進む、否ならリターンする。8.4 Immediately before the added or changed half-width space (direct left)
If the half-width character of is a half-width space, step 8.5
Go to, if not return.
8.5追加又は、変更した半巾スペースと直左の半巾ス
ペースとの二つの半巾スペース文字を、一つの全巾スペ
ース文字と同様に一括して削除する。ステツプ7.5あ
るいはステツプ9と同等である。8.5 Delete the two half-width space characters, the added or changed half-width space and the left-hand half-width space, in the same manner as one full-width space character. It is equivalent to step 7.5 or step 9.
上述の処理はカーソルキーによりカーソルマークを所望
の位置に移動させた後、右削除キーを操作することによ
り起動され実行される。バツフアBUF1の内容が第4
図(a)に示す如き半巾と全巾との文字が混在している文
字列で、今半巾の文字「E」を削除する場合、上述の処
理を実行することによりバツフアBUF1の内容は第4
図(b)に示す如き配列となる。そこでさらに半巾文字F
を削除しようとすると、同様にF以降に続く半巾文字が
すべて左ずめまたは前詰めされ半巾文字列の末尾に半巾
スペースが追加されるが、この場合2回の半巾文字の削
除により半巾スペースが2個連続するので、ステツプ
8.5で削除し、それ以降の文字列を第4図(c)に示す
如く前詰めまたは左詰めする。The above processing is started and executed by moving the cursor mark to a desired position with the cursor key and then operating the right delete key. The contents of buffer BUF1 are the fourth
In case of deleting the character "E" of the current half width in the character string in which the characters of the half width and the full width are mixed as shown in Fig. (A), the content of the buffer BUF1 is the fourth by executing the above process.
The arrangement is as shown in FIG. Therefore, half-width character F
If you try to delete, the half-width characters that follow F will be left-justified or left-justified, and a half-width space will be added to the end of the half-width character string. Since two characters are consecutive, they are deleted in step 8.5, and the character strings after that are left-justified or left-justified as shown in FIG. 4 (c).
次にステツプ10の全巾処理の詳細を第10図を参照し
て説明する。第10図に示す全巾処理の各ステツプの内
容は以下の通りである。Next, details of the full width processing of step 10 will be described with reference to FIG. The contents of each step of the full width process shown in FIG. 10 are as follows.
10.1ステツプ6.1と同等の処理を行う。10. Perform the same processing as in step 6.1.
10.2ステツプ10.1でバツフアBUF2に蓄えら
れた情報をそのままバツフアBUF1に戻す。10.2 Step 10.1 The information stored in the buffer BUF2 is returned to the buffer BUF1 as it is.
上述の処理は全巾化キーAZを操作することにより起動
され実行される。バツフアBUF1の内容が第2図(a)
に示す如き文字列であるとき、上述の処理により第2図
(b)に示す如く半巾の文字が全巾化される。第2図(c)は
バツフアBUF2の内容を再びバツフアBUF1にもど
したところである。The above-mentioned processing is started and executed by operating the full-width key AZ. The contents of buffer BUF1 are shown in Fig. 2 (a).
When the character string is as shown in FIG.
Half-width characters are made full width as shown in (b). FIG. 2 (c) shows the contents of the buffer BUF2 returned to the buffer BUF1 again.
1.本実施例においては、左削除キーと右削除キーとを
別に設けたが、例えば、コントロールキーあるいは、制
御キーあるいはコードキーと呼ばれているシフトキーを
用い、そのシフトキーと半巾削除キーとを組み合わせ
て、左削除あるいは右削除を指示しても良い。1. In this embodiment, the left delete key and the right delete key are provided separately, but for example, a control key or a shift key called a control key or a code key is used, and the shift key and the half-width delete key are combined. , Left deletion or right deletion may be instructed.
2.本実施例においては全巾単位の削除キーと半巾単位
の削除キーとを別に設けたが、例えば、カーソルが指し
示している文字によつてそのモード切換えを行つても良
い。即ち、カーソルが全巾文字を指し示していれば全巾
削除を意味し、半巾文字を指し示していれば半巾削除を
意味するようにしても良い。さらにカーソルが半巾文字
を指し示している時、単に削除キーを押した時は、左側
半巾文字の削除が行なわれ、シフトキーを押して又は押
しながら削除キーを押した時には右側半巾文字の削除が
行なわれるようにしても良い。2. In the present embodiment, the full width unit delete key and the half width unit delete key are separately provided, but the mode may be switched by the character pointed by the cursor, for example. That is, if the cursor points to a full-width character, it means deletion of full-width characters, and if it points to a half-width character, it means deletion of half-width characters. When the cursor is pointing to a half-width character, the left half-width character is deleted when the delete key is simply pressed, and the right half-width character is deleted when the delete key is pressed while holding down the shift key. You can
3.内部処理としては、全巾文字も半巾文字も空きな
く、つまつた状態で処理できる(即ち半巾文字が奇数個
の時も余分なスペースコードを付加する必要が無く処理
できる)機能を有しているが、例えばCRTの表示機能
のみつめた表示ができない(即ち半巾文字が奇数個連続
して存在する時は必ず半巾のスペースを1つ付加して表
示しなければならない)場合は、CRTに表示を行なお
うとする時のみ半巾スペースを1つ付加させて、表示す
る必要が有る。3. As for internal processing, there is no space for full-width characters and half-width characters, and there is a function that can be processed in a pinched state (that is, even if there are an odd number of half-width characters, it can be processed without the need to add an extra space code). However, for example, if it is not possible to display only the display function of the CRT (that is, if an odd number of half-width characters are consecutive, it is necessary to add one half-width space for display), then display on the CRT. It is necessary to add a half-width space and display it only when trying to perform.
4.半巾文字と全巾文字とが混在している文字列を一括
して半巾文字列に変換する時、もし全巾文字列の中に半
巾化不可能な文字が混ざつていたとしても本実施例にお
けるパツキング処理を工夫することにより問題なく、本
処理を実行できる。即ち、もし、半巾化可能な文字と半
巾化不可能な文字とをパツキングしなければいけない時
は、その間に半巾化可能であるダミーキヤラクタ、例え
ばスペースを挿入した上でパツキングを行えば良い。
又、半巾化不可能な文字は、あえてパツキングを行なわ
ずにリストアすれば十分である。4. When a character string in which half-width characters and full-width characters are mixed is converted into a half-width character string in a lump, even if non-half-width characters are mixed in the full-width character string, this embodiment This process can be executed without any problem by devising the packing process in (1). That is, if it is necessary to pack half-width characters and non-half-width characters, a dummy character that can be half-width, for example, a space, may be inserted between them before performing the packing.
In addition, it is sufficient to restore characters that cannot be half-width, without intentionally packing.
5.本実施例においては、半巾文字の削除を行うにあた
つて削除を行なうとする半巾文字が属する半巾文字列の
末尾に半巾スペースを付加させることを行うが、半巾ス
ペースのかわりに他のコード、例えば、半巾の空白コー
ドを付加させても良い。5. In this embodiment, a half-width space is added to the end of the half-width character string to which the half-width character to be deleted is deleted when the half-width character is deleted. However, instead of the half-width space, another code, For example, a half width blank code may be added.
又、本実施例においては、文字列を記憶するバツフア内
で半巾スペースの付加を行なつたが、バツフア内では半
巾スペースの付加を行なわず、例えばCRTに表示する
時に半巾スペースを付加しても良い。Further, in this embodiment, the half-width space is added in the buffer for storing the character string. However, the half-width space is not added in the buffer, and the half-width space may be added when displaying on a CRT, for example. good.
[発明の効果] 以上説明したように、本発明に係る文字処理装置によれ
ば、半巾文字と全巾文字が混在した文字列における半巾
文字の削除をより自然な形で行なうことができる。[Effects of the Invention] As described above, according to the character processing device of the present invention, it is possible to delete half-width characters in a more natural form in a character string in which half-width characters and full-width characters are mixed.
第1図(a),(b),(c)は半巾化を説明する図、 第2図(a),(b),(c)は全巾化を説明する図、 第3図(a),(b),(c)は半巾文字の左削除を説明する
図、 第4図(a),(b),(c)は半巾文字の右削除を説明する
図、 第5図は本発明による1実施例を示すブロツク図、 第6図(a),(b)はコードを説明する図、 第7図〜第10図は制御手順を示す図、 KB3……キーボード BUF1,BUF2……バツフアFIGS. 1 (a), (b), and (c) are diagrams for explaining the half width, FIGS. 2 (a), (b), and (c) are diagrams for explaining the full width, and FIG. 3 (a). ), (B) and (c) are diagrams for explaining the left deletion of half-width characters, Fig. 4 (a), (b), and (c) are diagrams for explaining the right deletion of half-width characters, and Fig. 5 is this book. Block diagram showing an embodiment according to the invention, FIGS. 6 (a) and 6 (b) are diagrams for explaining codes, FIGS. 7 to 10 are diagrams showing a control procedure, KB3 ... Keyboard BUF1, BUF2 ... Buffer
Claims (2)
力手段と、 該入力手段により入力された全巾文字及び半巾文字が混
在した文字列を記憶する記憶手段と、 半巾文字の削除を指示する指示手段と、 該指示手段の指示に基づき半巾文字を削除する削除手段
と、 前記削除手段により削除される半巾文字に続く半巾文字
列を半巾分前詰めにする時に、前記半巾文字列の最後が
該半巾文字列に続く全巾文字の表示位置のずれを防ぐた
めに付加される半巾ダミーキャラクタの場合、該半巾ダ
ミーキャラクタを削除し、前記半巾文字列を半巾分前詰
めし、 前記半巾文字列の最後が前記半巾ダミーキャラクタでな
い場合、前記半巾文字列を半巾分前詰めし、該半巾文字
列の後に前記半巾ダミーキャラクタを付加する調整手段
と を有することを特徴とする文字処理装置。1. An input means for inputting full-width characters and half-width characters, a storage means for storing a character string in which the full-width characters and half-width characters input by the input means are mixed, and deletion of half-width characters. An instructing means for instructing, a deleting means for deleting the half-width character based on the instruction of the instructing means, and a half-width character string following the half-width character deleted by the deleting means is moved forward by half width, When the last is a half-width dummy character that is added to prevent the display position of the full-width character following the half-width character string from being shifted, the half-width dummy character is deleted, and the half-width character string is shifted forward by half width, When the end of the line is not the half-width dummy character, the half-width character string is moved forward by half width, and the half-width dummy character is added after the half-width character string. That character processing apparatus.
し、 記憶された全巾文字及び半巾文字を表示装置に表示し、 半巾文字の削除が指示された場合、 該指示に基づき半巾文字を削除し、 削除された半巾文字に続く半巾文字列を半巾分前詰めし
て表示する時に、前記半巾文字列の最後が該半巾文字列
に続く全巾文字の表示位置のずれを防ぐために付加され
る半巾ダミーキャラクタの場合、該半巾ダミーキャラク
タを削除し、前記半巾文字列を半巾分前詰めし、 前記半巾文字列の最後が前記半巾ダミーキャラクタでな
い場合、前記半巾文字列を半巾分前詰めし、該半巾文字
列の後に前記半巾ダミーキャラクタを付加する ことを特徴とする文字処理方法。2. A full-width character and a half-width character that are input are stored, the stored full-width character and a half-width character are displayed on the display device, and when the deletion of the half-width character is instructed, the half-width character is instructed based on the instruction. Is added, and when the half-width character string following the deleted half-width character is displayed with half-width justified, the end of the half-width character string is added to prevent the display position of full-width characters following the half-width character string from shifting. If the half-width dummy character is deleted, the half-width dummy character is deleted, and the half-width character string is justified by half width. If the end of the half-width character string is not the half-width dummy character, the half-width character string is justified by half width. Then, the half-width dummy character is added after the half-width character string.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57013083A JPH0640329B2 (en) | 1982-01-29 | 1982-01-29 | Character processing apparatus and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57013083A JPH0640329B2 (en) | 1982-01-29 | 1982-01-29 | Character processing apparatus and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58129637A JPS58129637A (en) | 1983-08-02 |
| JPH0640329B2 true JPH0640329B2 (en) | 1994-05-25 |
Family
ID=11823269
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57013083A Expired - Lifetime JPH0640329B2 (en) | 1982-01-29 | 1982-01-29 | Character processing apparatus and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0640329B2 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS55143645A (en) * | 1979-04-26 | 1980-11-10 | Toshiba Corp | Input-output system for en character and em character |
-
1982
- 1982-01-29 JP JP57013083A patent/JPH0640329B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58129637A (en) | 1983-08-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH08212203A (en) | Document display device and method | |
| JPH0640329B2 (en) | Character processing apparatus and method | |
| JPH0526227B2 (en) | ||
| JPH05242092A (en) | Character processor | |
| JPS63288357A (en) | Data editing method | |
| JPH0411393B2 (en) | ||
| JPS6026234B2 (en) | Text editing display method | |
| JP2655900B2 (en) | Character processor | |
| JP3072516B2 (en) | Document editing device | |
| JPH03147062A (en) | Document generation device | |
| JPH0816834B2 (en) | Curve generation method | |
| JPS63282561A (en) | Document processing system | |
| JPS6329876A (en) | Document preparing device | |
| JP2821002B2 (en) | Character processing device and character processing method | |
| JPS63254557A (en) | Character processor | |
| JPH06236371A (en) | Coupling device | |
| JPH04373065A (en) | Document preparing device | |
| JPH0798698A (en) | Document processor | |
| JPS60118970A (en) | Registration erasure control system of phrase in japanese word processor | |
| JPH0661080B2 (en) | Document processor with furigana addition function | |
| JPS6325765A (en) | Document editing device | |
| JPS59111520A (en) | Data erasion control system for sentence processor | |
| JPS63138390A (en) | Character processor | |
| JPH0683860A (en) | Electronic dictionary | |
| JPH0512263A (en) | Document creation device |