JP2750958B2 - Formula editing device - Google Patents

Formula editing device

Info

Publication number
JP2750958B2
JP2750958B2 JP6696191A JP6696191A JP2750958B2 JP 2750958 B2 JP2750958 B2 JP 2750958B2 JP 6696191 A JP6696191 A JP 6696191A JP 6696191 A JP6696191 A JP 6696191A JP 2750958 B2 JP2750958 B2 JP 2750958B2
Authority
JP
Japan
Prior art keywords
mathematical
formula
data
processing
display
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 - Fee Related
Application number
JP6696191A
Other languages
Japanese (ja)
Other versions
JPH04302351A (en
Inventor
秀康 河毛
文彰 川脇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Consejo Superior de Investigaciones Cientificas CSIC
Original Assignee
Consejo Superior de Investigaciones Cientificas CSIC
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Consejo Superior de Investigaciones Cientificas CSIC filed Critical Consejo Superior de Investigaciones Cientificas CSIC
Priority to JP6696191A priority Critical patent/JP2750958B2/en
Publication of JPH04302351A publication Critical patent/JPH04302351A/en
Application granted granted Critical
Publication of JP2750958B2 publication Critical patent/JP2750958B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Calculators And Similar Devices (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は関数機能を有する電子
式卓上計算器(関数電卓)に関し、特に、計算のための
数式を入力・記憶することがてきる関数電卓の、数式入
力の際の数式編集装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic desk calculator (function calculator) having a function function, and more particularly, to a function calculator for inputting and storing a mathematical expression for calculation. The present invention relates to a formula editing device.

【0002】[0002]

【従来の技術】何種類かの予め定められた関数機能とと
もに、利用者が定義した数式を記憶して、この数式に従
った計算を繰り返し実行することができる関数電卓が知
られている。数式は、電卓の所定のキーを用いて利用者
が入力していくことにより定義される。このとき、数式
を自由に編集することが必要であり、そのために数値エ
ディタと呼ばれる、数式を編集するための装置が用意さ
れている。
2. Description of the Related Art Scientific calculators are known which store a user-defined mathematical expression together with several kinds of predetermined function functions and can repeatedly execute calculations according to the mathematical expression. The mathematical expression is defined by a user inputting using a predetermined key of the calculator. At this time, it is necessary to freely edit the mathematical expression. For this purpose, a device called a numerical editor for editing the mathematical expression is provided.

【0003】図8は、従来の数値エディタを用いて数式
を編集する際の、キー操作および電卓の表示例を示す図
である。図8に示される表の上段を参照して、「123
+4456」という式を入力する場合について説明す
る。
FIG. 8 is a diagram showing a key operation and a display example of a calculator when editing a mathematical expression using a conventional numerical editor. Referring to the upper row of the table shown in FIG.
The case of inputting the expression "+4456" will be described.

【0004】利用者は、まずテンキーを用いて「1」
「2」「3」を順に入力する。入力は、「カーソル」と
呼ばれる、表示器上の入力位置を示すための下線が表示
されている部分に対して行なわれる。1文字が入力され
るごとにカーソルは右側に1桁ずつ移動する。利用者は
次に演算式「+」を押圧し、つづいて再びテンキーを用
いて「4」「5」「6」を順に入力する。その結果電卓
の表示部には、「123+456」と表示される。この
例の電卓にはドットマトリクス表示部が採用されてお
り、「+」もドットマトリクスを用いて表示されてい
る。上述の入力か完了したとき、カーソルは「6」の直
後にある。
[0004] The user first uses the numeric keypad to set "1".
"2" and "3" are sequentially input. The input is performed on a part called an "cursor", which is underlined to indicate the input position on the display. Each time a character is input, the cursor moves one digit to the right. Next, the user presses the arithmetic expression "+", and then again inputs "4", "5", and "6" using the numeric keypad again. As a result, “123 + 456” is displayed on the display unit of the calculator. The calculator of this example employs a dot matrix display unit, and "+" is also displayed using the dot matrix. When the above input is completed, the cursor is immediately after “6”.

【0005】次にこの数式を編集する場合のキー操作を
考える。たとえば、「123+456」の「+」を削除
する場合を考える。利用者はまず、「左シフトキー」
(カーソルを左側に1桁ずつ移動させるためのキー。図
8においては左向きの黒三角形で表わされる)を4回押
圧する。左シフトキーを1回押すごとにカーソルが左に
1桁移動するため、この操作の結果カーソルが「+」の
部分に移動する。
Next, consider a key operation for editing this mathematical expression. For example, consider the case where "+" of "123 + 456" is deleted. First, the user uses the "left shift key"
(Key for moving the cursor to the left by one digit, represented by a black triangle pointing left in FIG. 8) four times. Each time the left shift key is pressed once, the cursor moves one digit to the left. As a result of this operation, the cursor moves to the “+” portion.

【0006】次に利用者は、「削除[DEL]キー」を
1回押圧する。削除キーを1回押すと、カーソル位置の
文字が削除されると同時に、カーソルよりも右側の文字
列が順に1つずつ左側に移動される(左詰め)。したが
って上述の操作の結果、表示は「123456」とな
る。それと同時に、入力されるべき数式も「12345
6」に変更されたことになる。なお、このときカーソル
は削除処理が行なわれたときの位置、すなわち「+」削
除後の「4」の位置で点滅している。
Next, the user presses the "delete [DEL] key" once. When the delete key is pressed once, the character at the cursor position is deleted and, at the same time, the character strings on the right side of the cursor are moved one by one to the left (left-justified). Therefore, as a result of the above-described operation, the display becomes “123456”. At the same time, the formula to be entered is also "12345".
6 ". At this time, the cursor is blinking at the position where the deletion process was performed, that is, at the position of “4” after the deletion of “+”.

【0007】このようにして数式を編集して所望の数式
を電卓に表記させることにより、その数式に従った計算
を繰返えし行なうことが簡単にできる。
[0007] In this way, by editing a mathematical expression and writing the desired mathematical expression on the calculator, it is easy to repeat the calculation according to the mathematical expression.

【0008】[0008]

【発明が解決しようとする課題】しかし、上述の数式編
集装置には、編集操作の結果数式が誤ったものとなった
場合でも、この誤りを発見しにくいという問題点があ
る。たとえば図8に示される例の場合、もともとは
「+」を「−」に変えるつもりで「+」を削除したのに
も関わらず、「−」を適当な位置に挿入し忘れることが
ある。図8に示される例の場合には「+」の前後がとも
に3桁ずつの数値であるため、「+」を削除してその後
に何らの処理もしなかった場合には、これら2つの数値
が接続して「123456」という6桁の数値として解
釈されることになる。言うまでもなく、このままこの計
算を実行すると、計算は正常に実行されるが得られる答
は明らかに誤ったものとなる。
However, the above-described formula editing apparatus has a problem that even when a formula is incorrect as a result of an editing operation, it is difficult to find the error. For example, in the case of the example shown in FIG. 8, although "+" was originally deleted in order to change "+" to "-", "-" may be forgotten to be inserted at an appropriate position. In the case of the example shown in FIG. 8, since both before and after “+” are numerical values of three digits, if “+” is deleted and no processing is performed thereafter, these two numerical values are changed. It is interpreted as a 6-digit numerical value "123456" after connection. Needless to say, if this calculation is performed as it is, the calculation will be performed successfully, but the answer obtained will be obviously wrong.

【0009】上述のように2つの数値が、間に介在する
演算子を削除したために1つの数値として解釈されてし
まうことは多い。しかも、この場合文法上の誤りとして
検出されることはなく、計算は誤りを含んだ式のままで
正常に実行されてしまう。その結果、編集の結果数式が
誤っている場合でもそのまま演算が実行され、得られた
答が誤ったものであると気づかれず、正しいデータとし
て扱われてしまうおそれがあった。
As described above, two numerical values are often interpreted as one numerical value due to the elimination of an intervening operator. Moreover, in this case, the error is not detected as a grammatical error, and the calculation is normally executed with the expression including the error. As a result, even when the formula is incorrect as a result of editing, the calculation is executed as it is, and the obtained answer may not be noticed to be incorrect and may be treated as correct data.

【0010】それゆえにこの発明の目的は、削除処理の
結果、数式が誤って定義されたまま計算処理が行なわれ
ることが防止できる数式編集装置を提供することであ
る。
SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide a formula editing apparatus which can prevent a calculation process from being performed while a formula is incorrectly defined as a result of a deletion process.

【0011】[0011]

【課題を解決するための手段】この発明にかかる数式編
集装置は、複数のカテゴリに分類される数式要素の並び
として定義される数式を記憶することが可能な計算機に
おいて、数式を編集するための数式編集装置であって、
各々が、数式要素の1つを記憶可能な複数個の数式要素
記憶手段と、数式要素記憶手段の任意の1つを選択し
て、削除処理を含む複数種類の編集処理の1つを行なう
ことを指定するための処理指定手段と、処理指定手段に
より削除処理が指定されたことに応答して、選択された
数式要素記憶手段の内容を削除するための削除手段と、
処理指定手段により演算子に対して削除処理が指定され
たことに応答して、選択された数式要素記憶手段の前後
の数式要素記憶手段に記憶された数式要素が予め定める
カテゴリに一致して属することを検出するためのカテゴ
リ一致検出手段と、カテゴリ一致検出手段の出力に応答
して、選択された数式要素記憶手段に、数式要素に含ま
れない、数式要素分離位置を明示するための分離位置明
示情報を挿入するための分離位置明示情報挿入手段とを
含む。
According to the present invention, there is provided a mathematical expression editing apparatus for editing a mathematical expression in a computer capable of storing a mathematical expression defined as a sequence of mathematical elements classified into a plurality of categories. A mathematical formula editing device,
A plurality of formula element storage means each capable of storing one of the formula elements, and selecting one of the formula element storage means to perform one of a plurality of types of editing processing including deletion processing; And a deletion unit for deleting the content of the selected mathematical element storage unit in response to the deletion process being specified by the process specification unit,
In response to the operator specifying deletion processing for the operator, the formula elements stored in the formula element storage means before and after the selected formula element storage means match and belong to the predetermined category. Category match detecting means for detecting that a formula element is not included in a mathematical element in a selected mathematical element storage means in response to an output of the category match detecting means. Separation position explicit information insertion means for inserting explicit information.

【0012】[0012]

【作用】本発明にかかる数式編集装置において、数式を
構成する数式要素は、順に数式要素記憶手段に格納され
る。処理指定手段によってある数式要素記憶手段を選択
してそこに格納された数式要素を削除することが指定さ
れた場合、削除手段は、選択された数式要素記憶手段の
内容を削除する。カテゴリ一致検出手段は、処理指定手
段により演算子に対して削除処理が指定されたことに応
答して、選択された数式要素記憶手段の前後の数式要素
記憶手段に格納された数式要素が、ともに同一の特定の
カテゴリに属している場合にはそれを検出し、その情報
を分離位置明示情報挿入手段に与える。分離位置明示情
報挿入手段はこの情報に応答して、選択された数式要素
記憶手段の位置に、分離位置明示情報を挿入する。
In the formula editing apparatus according to the present invention, the formula elements constituting the formula are sequentially stored in the formula element storage means. When it is specified by the processing specifying means to select a certain mathematical element storage means and to delete the mathematical element stored therein, the deleting means deletes the contents of the selected mathematical element storage means. The category match detecting means responds to the processing designation means to specify the deletion processing for the operator, and the mathematical elements stored in the mathematical element storage means before and after the selected mathematical element storage means are both together. If it belongs to the same specific category, it is detected and the information is given to the separation position explicit information inserting means. In response to this information, the separating position explicit information inserting means inserts the separating position explicit information at the position of the selected mathematical element storage means.

【0013】[0013]

【実施例】図1は、本発明にかかる数式編集装置の一例
である数値エディタが備えられた関数電卓の平面図であ
り、図2は、この関数電卓のブロック図である。図2を
参照して、この関数電卓1は、計算器全体の制御を行な
うためのCPU(Central Processin
g Unit)11と、計算器を動作させるためのプロ
グラムや定数を格納するためのROM(Read−On
ly Memory)12と、計算器の制御用のデータ
や処理される数値などを記憶するためのRAM(Ran
dom Access Memory)13と、置数
や、計算結果や、設定される数式等を表示するための表
示器2と、CPU11によって制御され、表示器2の駆
動制御を行なうための表示駆動回路14と、利用者によ
るキー操作に応答して所定の信号をCPU11に与える
ためのキーボード3とを含む。
FIG. 1 is a plan view of a scientific calculator provided with a numerical editor, which is an example of a mathematical formula editing apparatus according to the present invention, and FIG. 2 is a block diagram of the scientific calculator. Referring to FIG. 2, this scientific calculator 1 has a CPU (Central Processin) for controlling the entire calculator.
g Unit) 11 and a ROM (Read-On) for storing programs and constants for operating the calculator.
LY Memory 12 and a RAM (Ran) for storing data for controlling the calculator and numerical values to be processed.
dom Access Memory) 13, a display 2 for displaying a set number, a calculation result, a mathematical expression to be set, and the like, a display drive circuit 14 controlled by the CPU 11 to perform drive control of the display 2, And a keyboard 3 for providing a predetermined signal to the CPU 11 in response to a key operation by a user.

【0014】図1を参照して、表示器2は、入力される
数式や計算結果を表示するための、セグメント表示器か
らなる数値表示部22と、利用者により選択された関数
の関数名(「sin」、「cos」など)を表示するた
めの、ドットマトリクス表示器からなる関数表示部23
と、通常動作、数式記憶動作など、関数電卓1の動作モ
ードを表示するためのモード表示部21とを含む。
Referring to FIG. 1, a display 2 includes a numerical display section 22 composed of a segment display for displaying an input mathematical expression and a calculation result, and a function name (a function name) of a function selected by a user. Function display unit 23 composed of a dot matrix display for displaying “sin”, “cos”, etc.)
And a mode display unit 21 for displaying an operation mode of the scientific calculator 1 such as a normal operation and a mathematical expression storage operation.

【0015】キーボード3は、0〜9および小数点を入
力するために用意されたテンキー部32と、所望の関数
や演算などを選択するために用意されたファンクション
キー部31と、カーソルを左側に移動させるときに用い
るための左シフトキー33と、カーソルを右側に移動さ
せるときに用いるための右シフトキー34と、関数電卓
1の電源をオフにするためのキー35と、関数電卓1の
電源をオンするためのキー36とを含む。
The keyboard 3 has a numeric keypad 32 prepared for inputting 0 to 9 and a decimal point, a function key unit 31 prepared for selecting a desired function or operation, and the like. Left shift key 33 for use when moving the cursor, right shift key 34 for use when moving the cursor to the right, key 35 for turning off the power of the scientific calculator 1, and turning on the power of the scientific calculator 1. And a key 36 for

【0016】ファンクションキー部31には、sinや
cosなどの関数の他に、数式を入力する際に用いられ
る左カッコキー31a、右カッコキー31b、その他一
般的な演算(「+」「−」「×」「÷」など)を表わす
演算式などが用意されている。
In the function key section 31, in addition to functions such as sin and cos, a left parenthesis key 31a, a right parenthesis key 31b used for inputting a mathematical expression, and other general operations ("+""-" Arithmetic expressions representing “×”, “」 ”, etc.) are provided.

【0017】本発明にかかる数値エディタは、ROM1
2に格納された数値エディタプログラムを、CPU11
が実行することにより実現される。CPU11は、表示
器2に表示された数式に基づいて、利用者がキーボード
3を利用して入力するデータに応答してRAM13を用
いて所定の処理を行ない、結果を表示器2に表示する。
数式を入力する際には、数式を構成する数字や関数、演
算子などの要素(以下これを「数式要素」と呼ぶ)が、
RAM13に用意された所定の記憶エリアに所定の形式
で数式を構成する並びの順番で格納される。CPU11
はこの記憶エリア内の数式要素の並びを、利用者の指示
に応じて変更することにより数式を編集する。
The numerical editor according to the present invention has a ROM 1
2 is loaded into the CPU 11
Is implemented. The CPU 11 performs predetermined processing using the RAM 13 in response to data entered by the user using the keyboard 3 based on the mathematical formula displayed on the display 2, and displays the result on the display 2.
When entering a formula, the elements that make up the formula, such as numbers, functions, and operators (hereinafter referred to as "formula elements"),
The formulas are stored in a predetermined storage area prepared in the RAM 13 in a predetermined format in the order in which the mathematical expressions are formed. CPU11
Edits a mathematical expression by changing the arrangement of mathematical expression elements in the storage area in accordance with a user's instruction.

【0018】図3は、上述の数式要素の並びを記憶する
ための記憶エリアの概略構成図である。図3を参照し
て、この記憶エリアは、各々が1つの数式要素を記憶す
るための、複数個の「ステップ」と呼ばれる、記憶エリ
アの最小単位4を含む。各ステップには、「1」「2」
「3」「+」などの数式要素が記憶されている。図3に
示される例の場合、この記憶エリアには「123+45
6」という数式が記憶されている。
FIG. 3 is a schematic configuration diagram of a storage area for storing the arrangement of the above-described formula elements. Referring to FIG. 3, this storage area includes a minimum unit 4 of storage area called a plurality of "steps" for storing one mathematical element. In each step, "1""2"
Numerical elements such as “3” and “+” are stored. In the case of the example shown in FIG. 3, "123 + 45" is stored in this storage area.
6 ”is stored.

【0019】CPU11はこの記憶エリアに格納された
数式要素の並びを変更することにより数式を編集するわ
けであるが、処理対象となっている数式要素の位置は、
データポインタDPと呼ばれる、現在の処理位置を示す
データによって表現される。ポインタDPはまた、表示
器2に表示されているデータのうち、現在カーソルが設
定されている位置に対応するデータを示している。
The CPU 11 edits a mathematical expression by changing the arrangement of mathematical elements stored in the storage area. The position of the mathematical element to be processed is
It is represented by data indicating a current processing position called a data pointer DP. The pointer DP also indicates data corresponding to the position where the cursor is currently set, among the data displayed on the display 2.

【0020】データポインタDPが図3に示される位置
にある場合、このポインタによって数式要素「+」が示
されていることになる。データポインタがこの位置にあ
る場合に削除[DEL]キーを押すことにより、数値エ
ディタはこの位置に格納されているデータ「+」を削除
し、それより下方にあるデータを順に1つずつ上方に移
動させる。このようにすることにより、削除された位置
に空白が生ずることが防止される。また、このとき記憶
エリアにおいて各データが上方に移動されたことに応答
して、表示器2に表示されるデータは、削除位置から順
に左詰めされる。
When the data pointer DP is at the position shown in FIG. 3, this pointer indicates the mathematical expression element "+". By pressing the delete [DEL] key when the data pointer is at this position, the numerical editor deletes the data "+" stored at this position and moves the data below it upward one by one. Move. By doing so, a blank is prevented from being generated at the deleted position. At this time, in response to each data being moved upward in the storage area, the data displayed on the display 2 is left-justified in order from the deletion position.

【0021】「+」を削除した結果、記憶エリアの格納
内容は図4のようになる。図4を参照して、記憶エリア
に格納されているデータは「123456」という1つ
の数値を格納しているのと同じ状態になる。このままで
は、従来の数値エディタと同様に誤った式のまま計算が
実行され、しかも誤りが気づかれないおそれがある。
As a result of deleting "+", the contents stored in the storage area are as shown in FIG. Referring to FIG. 4, the data stored in the storage area is in the same state as storing one numerical value “123456”. In this state, the calculation is executed with the wrong expression as in the conventional numerical editor, and the error may not be noticed.

【0022】そこで本発明にかかる数値エディタの場
合、図3に示されるようにデータポインタによって指定
された位置の前後のステップに格納された数式要素がと
もに数値であるか否かを調べ、その結果に応じて誤りを
予防するための処置をとることを特徴とする。すなわ
ち、図3に示される例の場合には、「+」の前後がとも
に数値データであるため、「+」を削除すると、図4に
示されるように2つの数値が接合してしまう。そこで、
そのような場合には図5に示されるように、データポイ
ンタDPによって指し示される位置に、「接合防止コー
ド」と呼ばれる、2つの数値を分離すべきことを明示す
るためのデータが挿入される。この接合防止コードは、
通常の数式要素として処理することはできないため、接
合防止コードを含んだまま計算を実行しようとするとエ
ラーとなり、数式の設定の誤りが容易に発見される。
Therefore, in the case of the numerical editor according to the present invention, as shown in FIG. 3, it is checked whether or not the mathematical elements stored in the steps before and after the position designated by the data pointer are both numerical values. And taking measures to prevent errors. That is, in the case of the example shown in FIG. 3, since both before and after “+” are numerical data, if “+” is deleted, two numerical values are joined as shown in FIG. Therefore,
In such a case, as shown in FIG. 5, at a position pointed to by the data pointer DP, data called "junction prevention code" for specifying that two numerical values should be separated is inserted. . This joining prevention code
Since it cannot be processed as a normal mathematical expression element, an error will occur if the calculation is performed with the join prevention code included, and an error in the mathematical expression setting will be easily found.

【0023】図6は、上述の処理において行なわれるキ
ー操作と表示器2に表示される表示例を示す図である。
図6の第1段目を参照して、テンキー部32を用いて
「1」「2」「3」を順に入力し、ファンクションキー
部31の「+」キーを押圧し、次に再びテンキー部32
を用いて「4」「5」「6」を順に入力する。これによ
り、表示器2には、図6の第1段の2列目に示されるよ
うな表示が行なわれる。注意すべきことは、図1に示さ
れる本発明にかかる数値エディタを備えた関数電卓の場
合、表示器2の数値表示部22にはマトリクス表示器が
用いられておらず、その結果数値表示部22には関数名
を表示することができないということである。そのた
め、関数表示部23のドットマトリクスを用いて関数名
が表示され、数値表示部22には数字のみが表示され
る。図6の場合には「+」が関数表示部23に表示さ
れ、数値表示部22には「456」が表示される。関数
表示部23に表示されている関数に先立って入力された
数字や、他の関数名などは、そのため表示器2にはこの
ままでは表示されない。すなわち、図4の第1段目のよ
うなキー操作をした結果、表示器2には「+456」と
いう表示のみがされる。もちろんこの場合、図1に示さ
れる左シフトキー33を押せば数式の「+」よりも左側
の部分が表示器2に表示され、右シフトキー34を押圧
すれば表示されている数式のさらに右側の部分が表示器
2に表示される。
FIG. 6 is a diagram showing a key operation performed in the above-described processing and a display example displayed on the display unit 2.
Referring to the first row of FIG. 6, "1", "2", and "3" are sequentially input using the numeric keypad 32, the "+" key of the function key unit 31 is pressed, and then the numeric keypad unit is again pressed. 32
, "4", "5", and "6" are sequentially input. As a result, the display as shown in the second column of the first row in FIG. It should be noted that, in the case of the scientific calculator having the numerical editor according to the present invention shown in FIG. 1, a matrix display is not used for the numerical display 22 of the display 2, and as a result, 22 means that the function name cannot be displayed. Therefore, the function name is displayed using the dot matrix of the function display unit 23, and only the numeral is displayed on the numerical value display unit 22. In the case of FIG. 6, "+" is displayed on the function display section 23, and "456" is displayed on the numerical value display section 22. The numbers and other function names input prior to the function displayed on the function display unit 23 are not displayed on the display 2 as they are. That is, as a result of performing the key operation as shown in the first row of FIG. 4, only “+456” is displayed on the display 2. Of course, in this case, if the left shift key 33 shown in FIG. 1 is pressed, the left part of the mathematical expression “+” is displayed on the display 2, and if the right shift key 34 is pressed, the further right part of the displayed mathematical expression is displayed. Is displayed on the display 2.

【0024】「+」を削除するために、図6の第2段目
に示されるように、左シフトキー33を1回押圧する。
この操作により表示器2において、カーソルは関数表示
部23の「+」の部分に移動する。この場合注意すべき
ことは、本発明にかかる数値エディタの場合、数値「4
56」を構成するすべてのデータが数値であって、「4
56」が一括して1つのデータを表しているということ
である。そのため本発明にかかる数値エディタの場合、
左シフトキー33を1回押圧するだけで、数字「45
6」のいずれかの部分にあったカーソルは「+」の部分
に移動できるように構成されている。もちろん、各数字
を別々のデータとして処理するようにしてもよく、その
場合には左シフトキーはより多く押圧する必要がある。
In order to delete "+", the left shift key 33 is pressed once, as shown in the second row of FIG.
With this operation, the cursor is moved to the “+” portion of the function display section 23 on the display 2. In this case, it should be noted that in the case of the numerical editor according to the present invention, the numerical value “4” is set.
56 are all numerical values and “4”
56 "collectively represents one data. Therefore, in the case of the numerical editor according to the present invention,
By pressing the left shift key 33 once, the number “45” is displayed.
The cursor located at any part of "6" can be moved to the part of "+". Of course, each number may be processed as separate data, in which case the left shift key needs to be pressed more.

【0025】続いて、「+」を削除するために、利用者
は削除[DEL]キーを押圧する。これにより「+」が
削除されるが、「+」の前後の数式要素が「3」および
「4」と、ともに数値であるため、削除された「+」の
部分に、2つの数値を分離すべきことを明示するための
接合防止コードが挿入される。さらにこの部分に「−」
などを入力すれば、この接合防止コードは入力された記
号で再び置き換えられることになる。
Subsequently, the user presses a delete [DEL] key to delete "+". As a result, “+” is deleted. However, since the mathematical elements before and after “+” are both “3” and “4”, both of which are numerical values, the two numerical values are separated into the deleted “+” part. A splice prevention code is inserted to indicate what to do. In addition, "-"
If the user inputs, for example, the joining prevention code is replaced with the entered symbol again.

【0026】接合防止コードが挿入されたままの状態で
実行キー[=]が押圧された場合を考える。接合防止コ
ードは数式要素に含まれないコードが用いられているた
め、この式が誤っていることは直ちに計算器は検知でき
る。そして表示器2に、演算子なしの状態で実行が指定
されたことを示すエラーメッセージ「Er1」が表示さ
れる。従来のように接合防止コードがなければ、「+」
を削除した結果2つの数値「123」「456」が接合
して「123456」と解釈され、そのまま実行されて
しまうのに比べ、この数値エディタを用いれば、そのよ
うな誤りが発生するおそれはない。
Consider a case where the execution key [=] is pressed while the joining prevention code is still inserted. Since the joining prevention code is a code that is not included in the formula element, the calculator can immediately detect that the formula is incorrect. Then, an error message “Er1” indicating that execution has been specified without an operator is displayed on the display 2. If there is no joint prevention code as before, "+"
By using this numerical editor, there is no possibility that such an error will occur, as compared with the case where two numerical values “123” and “456” are joined and interpreted as “123456” and executed as it is. .

【0027】上述の機能は、CPU11によって実行さ
れるプログラムによって実現される。以下、このプログ
ラムのうち、本発明が関連する部分の制御構造を説明す
る。
The above functions are realized by a program executed by the CPU 11. Hereinafter, a control structure of a part related to the present invention in the program will be described.

【0028】図7は、本発明にかかる数値エディタを備
えた関数電卓において、削除[DEL]キーを押圧した
ときの処理のフローチャートである。図7を参照して、
ステップS1において、現在のデータポインタDPによ
り指し示される位置のステップに格納されているデータ
が、そのデータが数値列であるかあるいはそれ以外の命
令データであるかに関わらず削除される。削除の結果、
現在のデータポインタDP以降のステップに格納されて
いるデータは順に上方に移動される。すなわち、数式を
構成する要素が順に上送りされ、間にデータの存在しな
いステップが発生することが防がれる。この処理によ
り、表示器2上に表示される数式要素は、現在カーソル
がある位置の1桁が削除され、それ以降のデータが順に
左詰めされる。
FIG. 7 is a flowchart of a process when the delete [DEL] key is pressed in the scientific electronic calculator having the numerical editor according to the present invention. Referring to FIG.
In step S1, the data stored in the step at the position indicated by the current data pointer DP is deleted irrespective of whether the data is a numerical sequence or other instruction data. As a result of the removal,
The data stored in the steps after the current data pointer DP are sequentially moved upward. That is, the elements constituting the formula are sequentially shifted upward, thereby preventing a step in which no data is present from occurring. As a result of this processing, one digit at the position where the cursor is currently located is deleted from the mathematical elements displayed on the display 2, and the data thereafter are sequentially left-justified.

【0029】ステップS2において、現在のデータポイ
ンタDPの指すステップに格納されているデータが数値
であるかどうかが判断される。この判断は、そのステッ
プに格納されているデータを調べることにより容易に行
なうことができる。注意すべきことは、ステップS2に
おいて調べられるデータは、ステップS1において削除
されたデータの直後のデータであるということである。
なぜならば、ステップS1における削除の結果、データ
ポインタDPの指すステップ以降のデータが、順に1つ
ずつ上送りされていたからである。ステップS2におけ
る判断の答がYESであれば制御はステップS3に進
み、さもなければそのまま処理は終了する。判断の答が
NOである場合に処理が終了するのは、現在のデータポ
インタDPの指す内容が数値以外であるため、その直前
のデータと接合して数式に誤りが発生するおそれがない
ためである。
In step S2, it is determined whether the data stored in the step pointed to by the current data pointer DP is a numerical value. This determination can be made easily by examining the data stored in the step. It should be noted that the data examined in step S2 is the data immediately after the data deleted in step S1.
This is because, as a result of the deletion in step S1, the data after the step indicated by the data pointer DP has been sequentially shifted up one by one. If the answer to the determination in step S2 is YES, control proceeds to step S3, otherwise the process ends. If the answer to the determination is NO, the process ends because the content pointed to by the current data pointer DP is other than a numerical value, and there is no possibility that an error will occur in the formula by joining with the immediately preceding data. is there.

【0030】ステップS3においては、データポインタ
DPの内容が1減算される。制御はステップS4に進
む。
In step S3, the content of the data pointer DP is decremented by one. The control proceeds to step S4.

【0031】ステップS4において、データポインタD
Pによって指し示されるステップに格納されたデータが
数値であるか否かが判断される。判断の答がYESであ
れば制御はステップS5に進み、さもなければ制御はス
テップS7に進む。
In step S4, the data pointer D
It is determined whether the data stored in the step pointed to by P is a numerical value. If the answer is YES, control proceeds to step S5; otherwise, control proceeds to step S7.

【0032】ステップS7においては、削除されたデー
タの直後のデータは数値であったが、削除されたデータ
の直前のデータが数値以外であったということである。
したがって削除の結果削除されたデータの前後のデータ
が接合し他のデータに変わってしまうというおそれはな
い。そのためデータポインタDPの内容に1を加算して
データポインタDPの位置を元の位置に戻し、処理はそ
のまま終了する。
In step S7, the data immediately after the deleted data was a numerical value, but the data immediately before the deleted data was other than a numerical value.
Therefore, there is no danger that the data before and after the data deleted as a result of the deletion will be joined and changed to other data. Therefore, 1 is added to the contents of the data pointer DP to return the position of the data pointer DP to the original position, and the process ends as it is.

【0033】ステップS5に処理が進んだ場合、削除さ
れたデータの前後とも数値であるということであるか
ら、削除処理の結果前後の数値が接合して1つの数値と
して取り扱われてしまうということである。このままで
は演算処理の結果に誤りが発生するため、この2つの数
値が接合するのを防止するために、データが削除された
位置を明示するための接合防止コードをこの位置に挿入
する必要がある。ステップS5においては、その目的の
ためにまずデータポインタDPの内容に1加算され、デ
ータポインタDPが、削除されたデータが格納されてい
たステップの位置に戻される。制御はステップS6に進
む。
When the process proceeds to step S5, it means that both the values before and after the deleted data are numerical values, so that the numerical values before and after the deletion process are joined and treated as one numerical value. is there. In this case, an error occurs in the result of the arithmetic processing. In order to prevent the two numbers from joining, it is necessary to insert a joining prevention code for specifying the position where the data is deleted at this position. . In step S5, 1 is added to the content of the data pointer DP for that purpose, and the data pointer DP is returned to the position of the step where the deleted data was stored. The control proceeds to step S6.

【0034】ステップS6においては、データポインタ
DPが指し示すステップの位置に、接合防止コードが挿
入される。そして処理は終了する。
In step S6, a join prevention code is inserted at the position of the step indicated by the data pointer DP. Then, the process ends.

【0035】ステップS6においてデータが削除された
位置に挿入される接合防止コードは、数式要素として使
用されるデータ以外のものである。そのため、接合防止
コードが数式内に含まれたまま計算を実行したとして
も、接合防止コードを検出した時点で直ちに数式に誤り
が含まれていることを発見することができる。誤った数
式のまま演算を実行し、誤った答を得てしまうおそれが
ない。
The joint prevention code inserted at the position where the data is deleted in step S6 is other than the data used as the mathematical formula element. Therefore, even if the calculation is executed while the splicing prevention code is included in the formula, it is possible to discover immediately that the formula contains an error when the splicing prevention code is detected. There is no danger of performing an operation with an incorrect expression and obtaining an incorrect answer.

【0036】以上、この発明が図面を参照して詳細に説
明されたが、本発明はこれに限定されるわけではない。
上述の実施例以外にも様々に変形を加えて実施すること
が可能である。
Although the present invention has been described in detail with reference to the drawings, the present invention is not limited to this.
Various modifications can be made in addition to the above-described embodiment.

【0037】[0037]

【発明の効果】以上のようにこの発明によれば、数式の
ある演算子が削除された場合、その前後の数式要素がと
もに同一の、特定のカテゴリに属している場合にはそれ
が検出される。そしてその場合、削除された演算子の位
置に、分離位置を明示するための分離位置明示情報が挿
入される。したがって、ある演算子を削除した結果その
前後の2つの数式要素が結合して1個の数式要素と誤認
されるおそれがある場合、この2つが互いに分離される
べきものであることを容易に確認することができる。挿
入される情報は数式要素に含まれないため、この数式に
従って計算を実行した場合でも数式に誤りがあることが
容易に検出される。
As described above, according to the present invention, when an operator having a formula is deleted, if the formula elements before and after the formula belong to the same specific category, it is detected. You. In this case, separation position specifying information for specifying the separation position is inserted at the position of the deleted operator. Therefore, if there is a possibility that two mathematical elements before and after the deletion of a certain operator may be combined to be mistaken as one mathematical element, it is easy to confirm that these two elements should be separated from each other. can do. Since the information to be inserted is not included in the mathematical formula element, it is easy to detect an error in the mathematical formula even when the calculation is performed in accordance with the mathematical formula.

【0038】その結果、削除処理により数式が誤って定
義されたまま計算処理の行なわれることが防止できる数
値エディタを提供することができる。
As a result, it is possible to provide a numerical value editor capable of preventing calculation processing from being performed while a mathematical expression is incorrectly defined by deletion processing.

【図面の簡単な説明】[Brief description of the drawings]

【図1】この発明にかかる数値エディタが備えられた関
数電卓の平面図である。
FIG. 1 is a plan view of a scientific calculator provided with a numerical editor according to the present invention.

【図2】この発明にかかる数値エディタを備えた関数電
卓のブロック図である。
FIG. 2 is a block diagram of a scientific calculator provided with a numerical editor according to the present invention.

【図3】数式要素を記憶するための記憶エリアの模式図
である。
FIG. 3 is a schematic diagram of a storage area for storing mathematical elements.

【図4】演算子「+」が削除された後の、数式要素の記
憶エリアを示す模式図である。
FIG. 4 is a schematic diagram showing a storage area of a mathematical expression element after an operator “+” is deleted.

【図5】接合防止コードが挿入された記憶エリアの模式
図である。
FIG. 5 is a schematic diagram of a storage area into which a joining prevention code is inserted.

【図6】本発明にかかる数値エディタに従って編集処理
する場合のキー操作および表示例を示す図である。
FIG. 6 is a diagram showing a key operation and a display example when editing processing is performed according to a numerical editor according to the present invention.

【図7】本発明にかかる数値エディタにおいて、削除処
理が選択されたときに行なわれるプログラムのフローチ
ャートである。
FIG. 7 is a flowchart of a program executed when deletion processing is selected in the numerical editor according to the present invention.

【図8】従来の数値エディタに従って編集処理をした場
合のキー操作および表示エリアを示す図である。
FIG. 8 is a diagram showing a key operation and a display area when editing processing is performed according to a conventional numerical editor.

【符号の説明】[Explanation of symbols]

1 関数電卓 2 表示器 3 キーボード 11 CPU 12 ROM 13 RAM 14 表示駆動回路 DESCRIPTION OF SYMBOLS 1 Scientific calculator 2 Display 3 Keyboard 11 CPU 12 ROM 13 RAM 14 Display drive circuit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のカテゴリに分類される数式要素の
並びとして定義される数式を記憶することが可能な計算
機において、前記数式を編集するための数式編集装置で
あって、 各々が、前記数式要素の1つを記憶可能な複数個の数式
要素記憶手段と、 前記数式要素記憶手段の任意の1つを選択して、削除処
理を含む複数種類の編集処理の1つを行なうことを指定
するための処理指定手段と、 前記処理指定手段により前記削除処理が指定されたこと
に応答して、前記選択された数式要素記憶手段の前後の
数式要素記憶手段に記憶された数式要素が予め定めるカ
テゴリに一致して属することを検出するためのカテゴリ
一致検出手段と、 前記処理指定手段により演算子に対して前記削除処理が
指定されたことに応答して、前記選択された数式要素記
憶手段の内容を削除するための削除手段と、 前記カテゴリ一致検出手段の出力に応答して、前記選択
された数式要素記憶手段に、前記数式要素に含まれな
い、数式要素分離位置を明示するための分離位置明示情
報を挿入するための分離位置明示情報挿入手段とを含む
数式編集装置。
1. A mathematical formula editing apparatus for editing a mathematical formula, wherein the mathematical formula is defined as a sequence of mathematical formula elements classified into a plurality of categories. A plurality of mathematical element storage means capable of storing one of the elements, and an arbitrary one of the mathematical element storage means is selected to designate one of a plurality of types of editing processing including deletion processing to be performed. In response to the designation of the deletion processing by the processing designating means, the mathematical element stored in the mathematical element storing means before and after the selected mathematical element storing means is a predetermined category. And a category match detecting means for detecting belonging to the selected formula element in response to the operator specifying the deletion processing by the processing specifying means. Deletion means for deleting the contents of the storage means; and in response to the output of the category match detection means, the selected formula element storage means specifies a formula element separation position which is not included in the formula element. Formula editing apparatus including separation position explicit information inserting means for inserting separation position explicit information for use.
JP6696191A 1991-03-29 1991-03-29 Formula editing device Expired - Fee Related JP2750958B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6696191A JP2750958B2 (en) 1991-03-29 1991-03-29 Formula editing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6696191A JP2750958B2 (en) 1991-03-29 1991-03-29 Formula editing device

Publications (2)

Publication Number Publication Date
JPH04302351A JPH04302351A (en) 1992-10-26
JP2750958B2 true JP2750958B2 (en) 1998-05-18

Family

ID=13331128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6696191A Expired - Fee Related JP2750958B2 (en) 1991-03-29 1991-03-29 Formula editing device

Country Status (1)

Country Link
JP (1) JP2750958B2 (en)

Also Published As

Publication number Publication date
JPH04302351A (en) 1992-10-26

Similar Documents

Publication Publication Date Title
JP4356847B2 (en) Field definition information generation method, line and field definition information generation device
US7515993B2 (en) Robot control apparatus
US9104658B2 (en) Electronic dictionary and recording medium to record dictionary information display control program
CN101276324B (en) Function calculator having help display function and hlep displaying method thereof
JPH06203024A (en) Document processor
JP2750958B2 (en) Formula editing device
Bonfield et al. The Staden Package Manual
JPH08137648A (en) Operation device for image input output device
JPS58103035A (en) Tab position display
JPH09147027A (en) Change output device
JPH0660136A (en) Drawing edit device
JP3411934B2 (en) Program variable data processing device
JP3016248B2 (en) Document display device
JPS62271048A (en) Index output device
JP2578862B2 (en) Keystroke warning correction method
JPH067399Y2 (en) Edit data output device
JP3371434B2 (en) Layout editing device
JPS62271015A (en) Document editing device
JPH02133822A (en) Data processor
JPS60168263A (en) Document processing device
JP2864418B2 (en) Document processing device
JPH01282673A (en) Document processor
JPH05181661A (en) General purpose menu system for each user
JPH01194060A (en) Device for transferring file attribution data
JPS62145317A (en) Character input device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980120

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080227

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090227

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100227

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees