JP2003150563A - Calculator and calculation processing program - Google Patents

Calculator and calculation processing program

Info

Publication number
JP2003150563A
JP2003150563A JP2001350876A JP2001350876A JP2003150563A JP 2003150563 A JP2003150563 A JP 2003150563A JP 2001350876 A JP2001350876 A JP 2001350876A JP 2001350876 A JP2001350876 A JP 2001350876A JP 2003150563 A JP2003150563 A JP 2003150563A
Authority
JP
Japan
Prior art keywords
formula
expression
input
display
calculation
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
Application number
JP2001350876A
Other languages
Japanese (ja)
Inventor
Hiroyuki Shibusawa
博之 澁澤
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2001350876A priority Critical patent/JP2003150563A/en
Publication of JP2003150563A publication Critical patent/JP2003150563A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a calculator capable of successively displaying or redisplaying a halfway expression by an easily understandable operation without requiring a special halfway result memory, and without making a complicated halfway result calculation. SOLUTION: '10×2+4×3' is taken out by processing in S1402. After executing processing of S1403 and S1404 in this taken-out expression part, a result of a calculation part is inputted to an original expression part (S1405), and next, '=' is added to a numeric expression memory, and this expression part is inputted (stored) (S1406). By processing in this S1406, the numeric expression memory becomes a state of storing a series of expression '(5+5)×2+(2+2)×3=10×2+4×3=20+12' by adding an '='-added expression part '20+12' to '(5+5)×2+(2+2)×3=10×2+4×3'. A halfway expression is displayed in S1409, and thus, '=20+12' is displayed on a display part.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、所定の手順に従っ
た途中の段階の計算式である途中式を表示する機能を備
えた計算機及び計算処理プログラムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer and a calculation processing program having a function of displaying an intermediate formula which is a formula at an intermediate stage according to a predetermined procedure.

【0002】[0002]

【従来の技術】従来より、電卓(電子式卓上計算機)等
における途中式の表示機能に関しては種々の提案がなさ
れている。例えば、分数を約分するときに、小さな数か
ら順に約分しつつ表示する分数電卓や、書式の優先度順
に途中の段階の計算式(以下、途中式という。)を表示
するもの等がある。また、途中式を再表示できるものも
提案されている。
2. Description of the Related Art Conventionally, various proposals have been made regarding a display function of an intermediate type in a calculator (electronic desk calculator) or the like. For example, when fractions are reduced, there are fractional calculators that are displayed while reducing numbers in order, and those that display calculation formulas at intermediate stages (hereinafter referred to as intermediate formulas) in order of format priority. . There is also proposed a method that can redisplay the intermediate formula.

【0003】これら従来の提案では、途中式を表示ある
いは再表示するために、その都度毎回計算するか、若
しくは、特別に途中式エリアを設け、このエリアに途
中式を記憶させるとともに、必要に応じて途中式を読み
出すようにしている。
In these conventional proposals, in order to display or redisplay the intermediate formula, the intermediate formula is calculated each time, or a special intermediate formula area is provided and the intermediate formula is stored in this area, and if necessary, it is stored. The intermediate formula is read out.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、の方
式では、途中式を表示させる都度、最初の式から計算を
再実行するか、又は最終結果から逆方向に計算を行う必
要がある。このため、複数回に及ぶ計算や最終結果から
逆方向への計算を伴うことにより、計算処理が複雑とな
り、表示までに時間を要してしまう。
However, in the method (1), each time an intermediate expression is displayed, it is necessary to re-execute the calculation from the first expression or perform the calculation in the reverse direction from the final result. For this reason, the calculation process becomes complicated due to a plurality of calculations and calculation in the reverse direction from the final result, and it takes time to display.

【0005】また、の方式では、全ての途中式を記憶
させるための、メモリエリアを別途用意する必要があ
る。しかし、電卓はメモリエリアに制限があり、途中式
表示機能を従来機種に追加する場合にも、自ずとメモリ
に関して制限を受ける。例えば、数式入力エリアが10
0文字の電卓に本機能を追加する場合、途中式を表示す
るために、半分を途中式エリアにする必要があり、数式
入力エリアが半分となって電卓の機能ダウン及び商品価
値の低下を招く結果となる。
Further, in the method (1), it is necessary to separately prepare a memory area for storing all the intermediate expressions. However, the calculator has a limited memory area, and even when the intermediate display function is added to the conventional model, the calculator is naturally limited in terms of memory. For example, the formula input area is 10
When adding this function to a calculator with 0 characters, half of the formula has to be used as an intermediate formula area in order to display an intermediate formula, and the mathematical expression input area becomes half, causing the calculator to malfunction and the product value to decline. Will result.

【0006】本発明は、このような従来の課題に鑑みて
なされたものであり、特別な途中結果メモリを必要とせ
ず、複雑な途中結果計算も行うことなく、わかりやすい
操作で途中式を順に表示、あるいは再表示させることが
可能な計算機を提供することを目的とするものである。
The present invention has been made in view of such a conventional problem, and does not require a special intermediate result memory, does not perform complicated intermediate result calculation, and sequentially displays intermediate formulas by an easy-to-understand operation. Or to provide a computer that can be re-displayed.

【0007】[0007]

【課題を解決するための手段】前記課題を解決するため
に請求項1記載の発明にあっては、所定の手順に従って
複数の段階を経て式を計算する計算機であって、式を入
力する入力手段と、この入力手段により入力された入力
式を記憶する数式記憶手段と、前記所定の手順に従った
途中の段階の計算式である途中式の出力を指示する指示
手段と、この指示手段による指示に応じて、前記所定の
手順に従い前記入力式の途中式を計算し、この計算した
途中式を前記入力式に連続させて、当該入力式を記憶す
る前記数式記憶手段に記憶させる途中式追加手段と、こ
の途中式追加手段により前記数式記憶手段に記憶された
途中式及び前記入力式を表示する表示手段とを備える。
In order to solve the above-mentioned problems, the invention according to claim 1 is a computer for calculating an expression through a plurality of steps according to a predetermined procedure, and an input for inputting the expression. Means, a mathematical expression storage means for storing the input expression inputted by the input means, an instructing means for instructing the output of an intermediate expression which is a calculation expression at an intermediate step according to the predetermined procedure, and the instructing means. According to the instruction, the intermediate formula of the input formula is calculated according to the predetermined procedure, the calculated intermediate formula is made to be continuous with the input formula, and the intermediate formula is stored in the mathematical formula storage means for storing the input formula. And means for displaying the intermediate formula and the input formula stored in the mathematical formula storage unit by the intermediate formula adding unit.

【0008】すなわち、途中式追加手段は、指示手段に
よる指示があると、所定の手順に従い入力式の途中式を
計算し、この計算した途中式を数式記憶手段に記憶させ
る。また、表示手段がこの数式記憶手段に記憶された途
中式を表示する。したがって、指示手段による指示がる
都度、入力式から計算を再実行したり、最終結果から逆
方向に計算を行う必要はなく、計算されて記憶手段に記
憶されている途中式を読み出せば、途中式の表示を行う
ことができる。よって、計算処理が複雑となったり、表
示までに時間を要してしまうことなく、指示手段による
指示に即応した途中式の表示を行うことができる。しか
も、計算された途中式は入力式に連続させて、当該入力
式を記憶する数式記憶手段に記憶させることから、途中
式を記憶させるためのメモリエリアを別途用意する必要
はない。
That is, the intermediate formula adding means calculates the intermediate formula of the input formula in accordance with a predetermined procedure when the instructing means gives an instruction, and stores the calculated intermediate formula in the mathematical formula storing means. Further, the display means displays the intermediate equation stored in the equation storage means. Therefore, it is not necessary to re-execute the calculation from the input expression or to perform the calculation in the reverse direction from the final result each time the instruction means instructs, and if the intermediate expression calculated and stored in the storage means is read, An intermediate expression can be displayed. Therefore, it is possible to display an intermediate formula that immediately responds to the instruction by the instruction means without complicating the calculation process and requiring a long time before the display. Moreover, since the calculated intermediate formula is connected to the input formula and stored in the formula storage means for storing the input formula, it is not necessary to separately prepare a memory area for storing the intermediate formula.

【0009】また、請求項2記載の発明にあっては、前
記指示手段は、計算機本体の表面部に設けられた所定の
キーである。したがって、所定のキーを操作する簡単な
操作により、途中式を表示させることができる。
In the invention according to claim 2, the instructing means is a predetermined key provided on the surface of the computer main body. Therefore, the intermediate formula can be displayed by a simple operation of operating a predetermined key.

【0010】また、請求項3記載の発明にあっては、前
記入力式及び途中式のうち、前記表示手段で表示される
部分を指定する表示位置指定手段を更に備え、前記表示
手段は、前記表示位置指定手段により指定された式部分
を表示する。したがって、表示手段の表示面積が限られ
ていても、表示位置指定手段による指定により、所望の
途中式を表示させることができる。
Further, in the invention according to claim 3, there is further provided a display position designating means for designating a portion displayed by the display means among the input expression and the intermediate expression, and the display means is the above-mentioned The expression portion designated by the display position designation means is displayed. Therefore, even if the display area of the display means is limited, the desired intermediate formula can be displayed by the designation by the display position designation means.

【0011】また、請求項4記載の発明にあっては、前
記途中式を修正する修正手段を更に備え、前記記憶手段
は、前記修正手段により修正された前記途中式を前記入
力式として記憶し、前記途中式追加手段は、この入力式
の途中式を計算し、この計算した途中式を前記入力式に
連続させて、当該入力式を記憶する前記数式記憶手段に
記憶させ、前記表示手段は、この途中式追加手段により
前記数式記憶手段に記憶された途中式及び前記入力式を
表示する。したがって、表示された途中式を修正する
と、この修正した式が入力式となって、この入力式に対
する途中式を表示させることができる。よって、新たに
式を入力する煩雑な操作を伴わずに、部分的に異なる式
の入力を容易に行うことができる。
Further, in the invention according to claim 4, further comprising a correction means for correcting the intermediate expression, and the storage means stores the intermediate expression corrected by the correction means as the input expression. , The intermediate formula adding means calculates an intermediate formula of the input formula, makes the calculated intermediate formula continuous to the input formula, and stores the intermediate formula in the mathematical formula storing means for storing the input formula. The intermediate expression and the input expression stored in the mathematical expression storage means are displayed by the intermediate expression adding means. Therefore, when the displayed intermediate formula is modified, the modified formula becomes an input formula, and the intermediate formula for this input formula can be displayed. Therefore, it is possible to easily input a partially different expression without a complicated operation of newly inputting an expression.

【0012】また、請求項5記載の発明にあっては、所
定の手順に従って複数の段階を経て式を計算する処理を
コンピュータに実行させるプログラムであって、入力手
段により入力された入力式を数式記憶手段に記憶させる
記憶処理と、指示手段による指示に応じて、前記所定の
手順に従い前記入力式の途中式を計算する計算処理と、
この計算処理により計算した途中式を前記入力式に連続
させて、当該入力式を記憶する前記数式記憶手段に記憶
させる途中式追加処理と、この途中式追加処理により前
記数式記憶手段に記憶された途中式及び前記入力式を表
示手段に表示させる表示処理とをコンピュータに実行さ
せる。したがって、コンピュータが請求項5に記載する
プログラムに従って処理を実行することで、請求項1に
記載する発明と同様の効果を得ることが可能となる。
According to the invention of claim 5, the program is a program for causing a computer to execute a process of calculating an expression through a plurality of steps according to a predetermined procedure, wherein the input expression input by the input means is expressed by a mathematical expression. Storage processing for storing in the storage means, and calculation processing for calculating an intermediate expression of the input expression according to the predetermined procedure according to an instruction from the instruction means,
The intermediate formula calculated by this calculation process is connected to the input formula and stored in the mathematical formula storage means for storing the input formula, and the intermediate formula addition process stores it in the mathematical formula storage means. The computer is caused to execute a display process for displaying the intermediate formula and the input formula on the display means. Therefore, when the computer executes the process according to the program described in claim 5, it is possible to obtain the same effect as that of the invention described in claim 1.

【0013】[0013]

【発明の実施の形態】以下、本発明の実施の形態を図に
従って説明する。図1に示すように、本実施の形態に係
る電卓1は、平面視矩形状の本体2を有している。本体
2の表面部には、LCDから成る表示部3、電源&リセ
ットキー4、前後カーソルキー5、6、ステップキー
7、1文字消去キー8、分数の計算時に使用される複数
の分数計算用キー9、仮想線で囲んで示した複数のキー
で構成される数字・演算キー10、商のけたキー11及
びあまりキー12が設けられている。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. As shown in FIG. 1, a calculator 1 according to the present embodiment has a main body 2 that is rectangular in plan view. On the surface of the main body 2, a display unit 3 composed of an LCD, a power / reset key 4, front and rear cursor keys 5, 6, a step key 7, a one-character delete key 8, and a plurality of fraction calculation used when calculating fractions A key 9, a numerical / arithmetic key 10 composed of a plurality of keys surrounded by phantom lines, a quotient digit key 11 and an extra key 12 are provided.

【0014】図2は、電卓1の回路構成の概略を示すブ
ロック図である。CPU13には、バスラインを介して
前記表示部3、前記キー4〜12を備える入力部14、
ROM15、及びRAM16が接続されている。ROM
15には、後述するフローチャートに示す途中結果表示
計算プログラムが格納されている。RAM16には、キ
ー操作により入力部14に入力された数式(入力式)を
記憶する数式メモリ161、計算時のワークエリアとし
て使用される計算用メモリ162が設けられている。さ
らに、RAM16には、カーソル位置、表示位置、途中
結果No、状態(入力/途中表示/結果表示)、及び修
正フラグ(ON/OFF)を記憶するフラグ領域163
が設けられている。
FIG. 2 is a block diagram showing a schematic circuit configuration of the calculator 1. The CPU 13 includes an input unit 14 including the display unit 3 and the keys 4 to 12 via a bus line,
The ROM 15 and the RAM 16 are connected. ROM
A midway result display calculation program shown in a flowchart described later is stored in 15. The RAM 16 is provided with a formula memory 161 for storing a formula (input formula) input to the input unit 14 by a key operation, and a calculation memory 162 used as a work area for calculation. Further, the RAM 16 has a flag area 163 for storing a cursor position, a display position, an intermediate result number, a state (input / intermediate display / result display), and a correction flag (ON / OFF).
Is provided.

【0015】以上の構成に係る本実施の形態において、
CPU13は電源&リセットキー4が操作されて電源オ
ンとなると、ROM15に格納されている途中結果表示
計算プログラムに基づき、図3に示すフローチャートに
従って処理を実行する。すなわち、フラグを状態=入力
にし(ステップS1)、引き続き数式メモリ初期設定処
理を実行する(ステップS2)。
In the present embodiment having the above configuration,
When the power supply & reset key 4 is operated and the power is turned on, the CPU 13 executes the processing according to the flowchart shown in FIG. 3 based on the intermediate result display calculation program stored in the ROM 15. That is, the flag is set to state = input (step S1), and the formula memory initial setting process is subsequently executed (step S2).

【0016】この数式メモリ初期設定処理(ステップS
2)は、図4に示すフローチャートに従って実行され、
先ず数式メモリ161をクリアして、残存している前回
の入力式や途中式を消去する(ステップS201)。次
に、カーソル位置=1にして、数式メモリ161上のカ
ーソル位置を初期位置である“1”に設定する(ステッ
プS202)。また、途中結果の表示回数を示す表示N
oに“0”を設定し(ステップS203)、表示部8に
おける入力文字の表示位置として最初の位置を示す表示
位置=1を設定する(ステップS204)。さらに、初
期表示処理を実行して、カーソルを表示部8の1桁目に
表示させる(ステップS205)。
This formula memory initial setting process (step S
2) is executed according to the flowchart shown in FIG.
First, the formula memory 161 is cleared to erase the remaining previous input formula or intermediate formula (step S201). Next, the cursor position is set to 1 and the cursor position on the formula memory 161 is set to "1" which is the initial position (step S202). In addition, a display N indicating the number of times the intermediate result is displayed
"0" is set to o (step S203), and the display position indicating the first position as the display position of the input character on the display unit = 1 is set (step S204). Further, the initial display process is executed to display the cursor at the first digit of the display unit 8 (step S205).

【0017】このようにして、計算メモリ初期設定処理
が終了すると、図3のフローおいて、ステップS2から
ステップS3に進み、いずれかの数字・演算キー10
(但し、=キーを除く)が操作されたか否かを判断する
(ステップS3)。(=キーを除く)いずれかの数字・
演算キー10が操作されたならば、フラグが状態=結果
表示となっているか否かを判断する(ステップS4)。
When the calculation memory initial setting process is completed in this way, the process proceeds from step S2 to step S3 in the flow chart of FIG.
It is determined whether or not (however, the = key is excluded) is operated (step S3). Any number (excluding = key)
When the operation key 10 is operated, it is determined whether or not the flag is status = result display (step S4).

【0018】このとき、状態=結果表示となっている場
合には、後述するステップS18で説明するように、入
力された式の計算最終結果が表示部8に表示された状態
にある。したがって、この場合は前回の入力式の計算結
果が表示された後、ユーザがキー操作により次の新たな
式を入力し始めたのであるから、ステップS4からステ
ップS5に進み、前述した数式メモリ初期設定処理を実
行した後、ステップS6に進む。また、ステップS4で
の判断で、状態=結果表示ではない場合には、即時にス
テップS6に進む。
At this time, when the state = result display, the final calculation result of the input formula is displayed on the display unit 8, as will be described later in step S18. Therefore, in this case, after the calculation result of the previous input expression is displayed, the user has begun to input the next new expression by the key operation. Therefore, the process proceeds from step S4 to step S5, and the above-mentioned formula memory initial After executing the setting process, the process proceeds to step S6. If the state is not the result display in the determination in step S4, the process immediately proceeds to step S6.

【0019】このステップS6では、数式メモリ161
上のカーソル位置にキー操作に対応する数字、演算を入
力し、表示部8上のカーソル位置である表示カーソル位
置、及び数式メモリ161上のカーソル位置である数式
メモリカーソル位置を更新するとともに、数式メモリ1
61の記憶内容を更新する。
In step S6, the formula memory 161
A number corresponding to a key operation and an operation are input to the upper cursor position to update the display cursor position, which is the cursor position on the display unit 8, and the formula memory cursor position, which is the cursor position on the formula memory 161, and Memory 1
The stored contents of 61 are updated.

【0020】次に、数式メモリカーソル位置は、数式メ
モリ161に記憶されている数式の途中位置であるか否
かを判断する(ステップS7)。途中位置である場合に
は、修正フラグをONにした後(ステップS8)、表示
処理を実行し(ステップS9)、途中位置でなく先端位
置である場合には、即時に表示処理を実行する(ステッ
プS9)。この表示処理では、数式メモリ161に記憶
されている計算式を表示部8に表示させるとともに、式
メモリカーソル位置が示す位置にカーソルを表示させ
る。
Next, it is determined whether or not the formula memory cursor position is an intermediate position of the formula stored in the formula memory 161 (step S7). If it is in the middle position, the correction flag is turned ON (step S8), and then the display process is executed (step S9). If it is not the middle position but the leading end position, the display process is immediately executed ( Step S9). In this display processing, the calculation formula stored in the formula memory 161 is displayed on the display unit 8 and the cursor is displayed at the position indicated by the formula memory cursor position.

【0021】他方、ステップS3での判断の結果、数字
・演算キーが操作されていない場合には、ステップキー
7が操作されたか否かを判断する(ステップS10)。
ステップキー7が操作されたならば、途中結果No=0
であるか否かを判断する(ステップS11)。ここで、
途中結果No=0であれば、ユーザが式を入力した後、
初めてステップキー7を操作した場合である。この場合
には、即時にステップS14に進んで途中計算表示処理
を実行する。
On the other hand, if the result of determination in step S3 is that the number / calculation key has not been operated, it is determined whether or not the step key 7 has been operated (step S10).
If the step key 7 is operated, the interim result No = 0
It is determined whether or not (step S11). here,
If the intermediate result No = 0, after the user inputs the formula,
This is the case when the step key 7 is operated for the first time. In this case, the process immediately proceeds to step S14 to execute the intermediate calculation display process.

【0022】また、ステップS11での判断の結果、途
中結果No≠0であれば、ユーザが式を入力した後、少
なくとも1度はステップキー7を操作した後、再度ステ
ップキー7を操作した場合であって、後述するように表
示部8に入力式の途中式が表示されている状態にある。
この場合には、修正フラグがONとなっているか否かを
判断し(ステップS12)、修正フラグがOFFとなっ
ている場合には、ステップS14進んで途中計算表示処
理を実行する。
If the intermediate result No.noteq.0 as a result of the judgment in step S11, the user operates the step key 7 at least once after inputting the formula, and then operates the step key 7 again. In addition, as will be described later, the display section 8 is in the state of displaying an intermediate expression of the input expression.
In this case, it is determined whether or not the correction flag is ON (step S12). If the correction flag is OFF, the process proceeds to step S14 and the midway calculation display process is executed.

【0023】この途中計算表示処理(ステップS14)
は、図5に示すフローチャートに従って実行され、先
ず、表示位置を末尾位置+1にする(ステップS140
1)。つまり、数式メモリ161上において、次に表示
部8に表示させる文字の位置を、現在表示部8に表示さ
れている式の末尾の次に設定する。すなわち、図5に付
記した例1は、数式メモリ161に入力式「(5+5)
×2+(2+2)×3」が入力された後、1回目のステ
ップキー7の操作がなされることにより、入力式に続い
て途中式「=10×2+4×3」が数式メモリ161に
記憶されている状態を示している。この状態で2回目の
ステップキー7の操作がなされると、ステップS140
1での処理により、「=10×2+4×3」の末尾位置
の次(「3」の次)が表示位置として設定される。
This midway calculation display processing (step S14)
Is executed according to the flowchart shown in FIG. 5, and the display position is first set to the end position + 1 (step S140).
1). That is, the position of the character to be displayed next on the display unit 8 in the formula memory 161 is set next to the end of the formula currently displayed on the display unit 8. That is, in the example 1 attached to FIG. 5, the expression “(5 + 5)” is input to the expression memory 161.
After inputting “× 2 + (2 + 2) × 3”, the step key 7 is operated for the first time, so that the intermediate formula “= 10 × 2 + 4 × 3” is stored in the formula memory 161 following the input formula. It shows the state. When the second step key 7 is operated in this state, step S140 is performed.
By the process of 1, the display position is set next to the end position of “= 10 × 2 + 4 × 3” (next to “3”).

【0024】次に、数式メモリ161の末尾の式部分を
取り出す(ステップS1402)。このステップS14
02での処理により、例1において末尾の式部分である
「10×2+4×3」が取り出されることとなる。引き
続き、この取り出した式部分において、最も優先度の高
い計算部分を指定する(ステップS1403)。このス
テップS1403での処理により、「10×2+4×
3」において最も優先度の高い「10×2」と「4×
3」が指定される。さらに、この指定した計算部分毎に
計算を行い(ステップS1404)、これにより、「1
0×2」の計算結果「20」と「4×3」の計算結果
「12」とが算出される。
Next, the last formula part of the formula memory 161 is taken out (step S1402). This step S14
By the processing in 02, “10 × 2 + 4 × 3”, which is the last expression part in the example 1, is extracted. Subsequently, in the extracted formula part, the calculation part having the highest priority is designated (step S1403). By the processing in step S1403, “10 × 2 + 4 ×
3 ”, which has the highest priority of“ 10 × 2 ”and“ 4 × ”
3 ”is designated. Further, the calculation is performed for each of the designated calculation parts (step S1404), whereby "1" is calculated.
The calculation result “20” of “0 × 2” and the calculation result “12” of “4 × 3” are calculated.

【0025】次に、元の式部分(「10×2」、「4×
3」)に計算部分(「20」、「12」)の結果を入れ
ることにより(ステップS1405)、「20+12」
が生成され、次いで数式メモリ161に「=」付けて、
この式部分を入力(記憶)させる(ステップS140
6)。したがって、このステップS1406での処理に
より、数式メモリ161には、その時点までの入力式と
途中式「(5+5)×2+(2+2)×3=10×2+
4×3」に、「=」を付けた式部分「20+12」が付
加された一連の式「(5+5)×2+(2+2)×3=
10×2+4×3=20+12」が記憶された状態とな
る。
Next, the original expression parts (“10 × 2”, “4 ×”)
By putting the result of the calculation part ("20", "12") into (3 ") (step S1405)," 20 + 12 "
Is generated, and then "=" is added to the formula memory 161, and
This expression part is input (stored) (step S140).
6). Therefore, by the processing in step S1406, the expression memory 161 stores the input expression up to that point and the intermediate expression “(5 + 5) × 2 + (2 + 2) × 3 = 10 × 2 +.
A series of formulas ((5 + 5) × 2 + (2 + 2) × 3 =, in which the formula part “20 + 12” with “=” added to 4 × 3 ”is added.
10 × 2 + 4 × 3 = 20 + 12 ”is stored.

【0026】引き続き、フラグを状態=途中結果にし
(ステップS1407)、途中結果Noを「1」増加さ
せる(ステップS1408)。したがって、このステッ
プS1408の処理により、例1の場合「途中結果No
=1」から「途中結果No=2」に変化する。さらに、
途中結果表示処理を行って(ステップS1409)、今
回のステップキー7の操作に対応する途中式を表示させ
る。これにより、表示部8には「=20+12」が表示
されることとなる。
Subsequently, the flag is set to state = interim result (step S1407), and the interim result No is increased by “1” (step S1408). Therefore, as a result of the processing of step S1408, in the case of example 1,
= 1 ”to“ interim result No = 2 ”. further,
An intermediate result display process is performed (step S1409) to display an intermediate formula corresponding to the operation of the step key 7 this time. As a result, “= 20 + 12” is displayed on the display unit 8.

【0027】また、図3のフローチャートにおいて、ス
テップS10での判断の結果、ステップキー7が操作さ
れていない場合には、=キーが操作されたか否かを判断
する(ステップS15)。=キーが操作されたならば、
数式メモリ161の末尾の式部分を取り出して(ステッ
プS16)、計算処理を実行する(ステップS17)。
また、フラグを状態=結果表示にするとともに(ステッ
プS18)、途中結果Noに初期値“0”をセットする
(ステップS19)。さらに、結果表示処理を行って、
前述のステップS17での計算処理結果を表示部8に表
示させる(ステップS20)。
Further, in the flowchart of FIG. 3, if the result of the determination in step S10 is that the step key 7 has not been operated, it is determined whether or not the = key has been operated (step S15). If the = key is operated,
The formula part at the end of the formula memory 161 is taken out (step S16), and the calculation process is executed (step S17).
Further, the flag is set to the state = result display (step S18), and the initial result “0” is set to the intermediate result No (step S19). Furthermore, by performing result display processing,
The calculation processing result in step S17 is displayed on the display unit 8 (step S20).

【0028】また、ステップS15での判断の結果、=
キーが操作されていない場合には、カーソルキー5、6
が操作されたか否かを判断し(ステップS21)、操作
されていない場合には、他の処理に移行する。カーソル
キー5、6が操作された場合には、フラグを状態=入力
にするとともに(ステップS22)、表示部8に表示さ
れているカーソル位置を、前後カーソルキー5、6によ
る指定方向に1変更する(ステップS23)。次に、カ
ーソルが表示範囲外にきたか否かを判断し(ステップS
24)、表示範囲外にきた場合には、表示部8にカーソ
ルを表示するように表示位置を変更する(ステップS2
5)。したがって、このステップS25での処理により
カーソルキー5、6の操作に応じて、数式メモリ161
に記憶されている一連の式における任意の部分を表示部
8にスクロール表示させることができる。よって、表示
部3の表示面積が限られていても、カーソルキー5、6
の操作により、所望の途中式を表示させることができ
る。なお、表示内である場合には、表示部8における表
示上のカーソル位置を単に移動させる(ステップS2
6)。
Further, as a result of the judgment in step S15,
If no key is operated, the cursor keys 5 and 6
It is determined whether or not is operated (step S21), and if not operated, the process proceeds to another process. When the cursor keys 5 and 6 are operated, the flag is set to state = input (step S22), and the cursor position displayed on the display unit 8 is changed by 1 in the direction designated by the front and rear cursor keys 5 and 6. Yes (step S23). Next, it is determined whether or not the cursor is out of the display range (step S
24) If it is outside the display range, the display position is changed so that the cursor is displayed on the display unit 8 (step S2).
5). Therefore, according to the operation of the cursor keys 5 and 6 by the processing in step S25, the formula memory 161
Any part of the series of expressions stored in can be scroll-displayed on the display unit 8. Therefore, even if the display area of the display unit 3 is limited, the cursor keys 5 and 6
The desired intermediate formula can be displayed by the operation of. If it is within the display, the cursor position on the display of the display unit 8 is simply moved (step S2).
6).

【0029】他方、ステップS12の判断がYESある
場合は、途中結果No≠0であって、かつ、修正フラグ
=ONとなっている場合である。かかる場合とは、式が
入力された後、少なくとも1度はステップキー7が操作
されて前述のように途中式が表示され、かつ、カーソル
キー5、6の操作に伴って、前述のステップS7で数式
メモリカーソル位置が数式メモリ161に記憶されてい
る数式の途中位置であると判断されて、修正フラグがO
Nにされた場合である。
On the other hand, if the determination in step S12 is YES, it means that the intermediate result No.noteq.0 and the correction flag = ON. In this case, after the expression is input, the step key 7 is operated at least once to display the intermediate expression as described above, and the operation of the cursor keys 5 and 6 causes the step S7 to be executed. Is determined to be the middle position of the formula stored in the formula memory 161, and the correction flag is set to O.
This is when N is set.

【0030】また、このようにカーソルキー5、6が操
作されると、前述のステップ22に示したように、状態
=入力となるので、ステップS4の判断はNOとなっ
て、ステップS4からステップS6に進み、カーソル位
置に数字が入力される。したがって、図5に示した例1
の式「(5+5)×2+(2+2)×3=10×2+4
×3=20+12」において、途中式「10×2+4×
3」の「2」の部分にカーソルを合致させた後、「2」
を図示しない削除キーで削除し数値・演算キー10でキ
ー「3」を操作すると、図4に付記した例2に示すよう
に、数式メモリ161内の例1の式は、「(5+5)×
2+(2+2)×3=10×3+4×3=20+12」
と変化する。
Further, when the cursor keys 5 and 6 are operated in this manner, the state is input as shown in the above-mentioned step 22, so that the determination in step S4 is NO and the steps from step S4 to step S4 are executed. In step S6, a number is input at the cursor position. Therefore, the example 1 shown in FIG.
Expression “(5 + 5) × 2 + (2 + 2) × 3 = 10 × 2 + 4
In the case of × 3 = 20 + 12, the intermediate expression “10 × 2 + 4 ×”
After matching the cursor to the "2" part of "3", press "2"
When the key “3” is operated with the delete key (not shown) and the numerical value / arithmetic key 10 is operated, the expression of the example 1 in the expression memory 161 becomes “(5 + 5) ×
2+ (2 + 2) × 3 = 10 × 3 + 4 × 3 = 20 + 12 ”
And changes.

【0031】そして、この状態によりステップS12の
判断がYESとなると、ステップS13に進んでカーソ
ル位置の式部分を新たな入力式に設定する処理実行す
る。この処理は、図4に示したフローチャートに従って
実行され、数式メモリ161途中のカーソルのある式部
分を取り出す(ステップS1301)。したがって、こ
のステップS1301での処理により、図4に付記した
式「(5+5)×2+(2+2)×3=10×3+4×
3=20+12」において、カーソルのある式部分「1
0×3+4×3」が取り出される。次に、この取り出し
た式部分を数式メモリ161にセットし(ステップS1
302)、しかる後に、前述したステップS203〜S
205の処理を実行する。
If the determination in step S12 is YES in this state, the process proceeds to step S13 and the process of setting the expression portion at the cursor position to a new input expression is executed. This processing is executed according to the flowchart shown in FIG. 4, and the formula portion with the cursor in the middle of the formula memory 161 is taken out (step S1301). Therefore, by the processing in step S1301, the expression “(5 + 5) × 2 + (2 + 2) × 3 = 10 × 3 + 4 × added to FIG.
3 = 20 + 12 ”, the expression part“ 1
0x3 + 4x3 "is taken out. Next, the extracted formula part is set in the formula memory 161 (step S1).
302), and then the above-mentioned steps S203 to S
The processing of 205 is executed.

【0032】そして、以上の処理が図3のフローチャー
トにおけるステップS13で実行されると、引き続きス
テップS14で前述の図5に示した途中結果表示処理が
実行される。したがって、数値・演算キー10によりあ
る式を入力し、ステップキー7を操作してその途中式を
表示させた後、カーソルキー5、6をによりカーソルを
途中式の所望部分に位置させて、その数値等を訂正し、
再度ステップキー7を操作すると、訂正された数値等を
有する途中式が入力式となって、当該入力式の途中式が
表示されることとなる。よって、新たに式を入力する煩
雑な操作を伴わずに、部分的に異なる式の入力を容易に
行うことができる。
When the above processing is executed in step S13 in the flowchart of FIG. 3, the intermediate result display processing shown in FIG. 5 is executed in step S14. Therefore, after inputting an expression with the numerical value / arithmetic key 10 and operating the step key 7 to display the intermediate expression, the cursor keys 5 and 6 are used to position the cursor at a desired portion of the intermediate expression, Correct the numbers,
When the step key 7 is operated again, the intermediate formula having the corrected numerical value or the like becomes the input formula, and the intermediate formula of the input formula is displayed. Therefore, it is possible to easily input a partially different expression without a complicated operation of newly inputting an expression.

【0033】なお、図5に例3として示したように、途
中計算表示処理は分数の約分にも適用することができ
る。すなわち、例3は、数式メモリ161に入力式「1
2/30」が入力された後、1回目のステップキー7の
操作がなされることにより、入力式に続いて途中式「=
6/15」が数式メモリ161に記憶されている状態を
示している。この状態で2回目のステップキー7の操作
がなされると、ステップS1401での処理により、
「=6/15」の末尾位置の次が表示位置として設定さ
れる。
Note that, as shown as Example 3 in FIG. 5, the intermediate calculation display processing can be applied to the divisor of the fraction. That is, in the example 3, the input expression “1
After the input of “2/30”, the step key 7 is operated for the first time, so that the intermediate expression “=
6/15 ”is stored in the formula memory 161. When the second step key 7 is operated in this state, the processing in step S1401 causes
The display position is set next to the end position of “= 6/15”.

【0034】次に、数式メモリ161の末尾の式部分を
取り出す(ステップS1402)。このステップS14
02での処理により、例3において「6/15」が取り
出されることとなる。引き続き、この取り出した式部分
において、最も優先度の高い計算部分を指定する(ステ
ップS1403)。このステップS1403での処理に
より、「6/15」が指定される。さらに、この指定し
た計算部分毎に計算(約分)を行い(ステップS140
4)、「6/15」の計算(約分)結果「2/5」が算
出される。
Next, the last expression portion of the expression memory 161 is taken out (step S1402). This step S14
By the processing in 02, “6/15” will be extracted in Example 3. Subsequently, in the extracted formula part, the calculation part having the highest priority is designated (step S1403). By the process in step S1403, "6/15" is designated. Further, calculation (reduction) is performed for each designated calculation portion (step S140).
4), the calculation (approximately) result of “6/15”, “2/5” is calculated.

【0035】次に、元の式部分に計算部分の結果を入れ
ることにより(ステップS1405)、「2/5」がそ
のまま残存し、次いで数式メモリ161に「=」付け
て、この式部分を入力(記憶)させる(ステップS14
06)。したがって、このステップS1406での処理
により、数式メモリ161には、その時点までの入力式
と途中式「12/30=6/15」に「=」を付けた式
部分「2/5」が付加された一連の式「12/30=6
/15=2/5」が記憶された状態となる。
Next, by inserting the result of the calculation part into the original formula part (step S1405), "2/5" remains as it is, and then "=" is added to the formula memory 161 to input this formula part. (Memorize) (step S14
06). Therefore, by the processing in this step S1406, the expression part “2/5” in which “=” is added to the input expression up to that point and the intermediate expression “12/30 = 6/15” is added to the expression memory 161. A series of formulas "12/30 = 6"
/ 15 = 2/5 "is stored.

【0036】引き続き、フラグを状態=途中結果にし
(ステップS1407)、途中結果Noを「1」増加さ
せる(ステップS1408)。したがって、このステッ
プS1408の処理により、例3の場合「途中結果No
=2」となる。さらに、途中結果表示処理を行って(ス
テップS1409)、今回のステップキー7の操作に対
応する途中式を表示させる。これにより、表示部8には
「=2/5」が表示されることとなる。
Subsequently, the flag is set to state = interim result (step S1407), and the interim result No is increased by “1” (step S1408). Therefore, as a result of the processing in step S1408, in the case of the example 3, “interim result No
= 2 ”. Further, an intermediate result display process is performed (step S1409) to display the intermediate formula corresponding to the operation of the step key 7 this time. As a result, “= 2/5” is displayed on the display unit 8.

【0037】[0037]

【発明の効果】以上説明したように本発明によれば、指
示手段による指示に応じて、所定の手順に従い入力式の
途中式を計算し、この計算した途中式を数式記憶手段に
記憶させることから、入力式から計算を再実行したり、
最終結果から逆方向に計算を行う必要はなく、計算され
て記憶手段に記憶されている途中式を読み出せば、途中
式の表示を行うことができる。したがって、計算処理が
複雑となったり、表示までに時間を要してしまうことな
く、指示手段による指示に即応した途中式の表示を行う
ことができる。しかも、計算された途中式は入力式に連
続させて、当該入力式を記憶する数式記憶手段に記憶さ
せることから、途中式を記憶させるためのメモリエリア
を別途用意する必要はない。
As described above, according to the present invention, the intermediate formula of the input formula is calculated according to a predetermined procedure in accordance with the instruction from the indicating means, and the calculated intermediate formula is stored in the mathematical formula storage means. To re-execute the calculation from the input formula,
It is not necessary to perform the calculation in the reverse direction from the final result, and the intermediate formula can be displayed by reading the intermediate formula calculated and stored in the storage means. Therefore, the intermediate process can be displayed promptly in response to the instruction by the instructing means without complicating the calculation process and requiring a long time before the display. Moreover, since the calculated intermediate formula is connected to the input formula and stored in the formula storage means for storing the input formula, it is not necessary to separately prepare a memory area for storing the intermediate formula.

【0038】よって、特別な途中結果メモリを必要とせ
ず、複雑な途中結果計算も行うことなく、わかりやすい
操作で途中式を順に表示、あるいは再表示させることが
可能となる。
Therefore, it is possible to sequentially display or redisplay intermediate formulas by an easy-to-understand operation without requiring a special intermediate result memory and performing complicated intermediate result calculation.

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

【図1】本発明の一実施の形態にかかる電卓の平面図で
ある。
FIG. 1 is a plan view of a calculator according to an embodiment of the present invention.

【図2】同電卓の回路構成の概略を示すブロック図であ
る。
FIG. 2 is a block diagram showing an outline of a circuit configuration of the calculator.

【図3】本発明の一実施の形態における処理手順を示す
フローチャートである。
FIG. 3 is a flowchart showing a processing procedure according to the embodiment of the present invention.

【図4】数式メモリ初期設定とカーソル位置の式部分を
新たな入力式に設定する処理の詳細を示すフローチャー
トである。
FIG. 4 is a flowchart showing details of a process of initializing the formula memory and setting a formula part of a cursor position to a new input formula.

【図5】途中計算表示処理の詳細を示すフローチャート
である。
FIG. 5 is a flowchart showing details of midway calculation display processing.

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

1 電卓 2 本体 3 表示部 5 前カーソルキー 6 後カーソルキー 7 ステップキー 8 表示部 10 数値・演算キー 13 CPU 14 入力部 15 ROM 16 RAM 161 数式メモリ 1 calculator 2 body 3 Display 5 Previous cursor key 6 Rear cursor key 7 step keys 8 Display 10 Numerical value / Calculation key 13 CPU 14 Input section 15 ROM 16 RAM 161 Formula memory

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 所定の手順に従って複数の段階を経て式
を計算する計算機であって、 式を入力する入力手段と、 この入力手段により入力された入力式を記憶する数式記
憶手段と、 前記所定の手順に従った途中の段階の計算式である途中
式の出力を指示する指 示手段と、この指示手段による指示に応じて、前記所定
の手順に従い前記入力式の途中式を計算し、この計算し
た途中式を前記入力式に連続させて、当該入力式を記憶
する前記数式記憶手段に記憶させる途中式追加手段と、 この途中式追加手段により前記数式記憶手段に記憶され
た途中式及び前記入力式を表示する表示手段とを備える
ことを特徴とする計算機。
1. A computer for calculating an expression through a plurality of steps according to a predetermined procedure, the input means inputting the expression, the mathematical expression storage means for storing the input expression input by the input means, and the predetermined expression. Instructing means for instructing the output of an intermediate expression which is a calculation expression at an intermediate stage according to the procedure of 1., and calculating the intermediate expression of the input expression according to the predetermined procedure according to the instruction by the instructing means. The intermediate formula adding means for connecting the intermediate formula to the input formula and storing it in the mathematical formula storing means for storing the input formula, and the intermediate formula and the input stored in the mathematical formula storing means by the intermediate formula adding device. A computer comprising a display unit for displaying an expression.
【請求項2】 前記指示手段は、計算機本体の表面部に
設けられた所定のキーであることを特徴とする請求項1
記載の計算機。
2. The instructing means is a predetermined key provided on the surface of the computer body.
The calculator shown.
【請求項3】 前記入力式及び途中式のうち、前記表示
手段で表示される部分を指定する表示位置指定手段を更
に備え、 前記表示手段は、前記表示位置指定手段により指定され
た式部分を表示することを特徴とする請求項1記載の計
算機。
3. A display position designating means for designating a part to be displayed on the display means out of the input formula and the intermediate formula, wherein the display means displays the formula part designated by the display position designating means. The computer according to claim 1, which is displayed.
【請求項4】 前記途中式を修正する修正手段を更に備
え、 前記記憶手段は、前記修正手段により修正された前記途
中式を前記入力式として記憶し、 前記途中式追加手段は、この入力式の途中式を計算し、
この計算した途中式を前記入力式に連続させて、当該入
力式を記憶する前記数式記憶手段に記憶させ、 前記表示手段は、この途中式追加手段により前記数式記
憶手段に記憶された途中式及び前記入力式を表示するこ
とを特徴とする請求項1記載の計算機。
4. The correction means for correcting the intermediate expression is further provided, wherein the storage means stores the intermediate expression corrected by the correction means as the input expression, and the intermediate expression adding means includes the input expression. Calculate the intermediate formula of
The calculated intermediate formula is continued to the input formula and is stored in the mathematical formula storage unit that stores the input formula, and the display unit stores the intermediate formula stored in the mathematical formula storage unit by the intermediate formula adding unit. The computer according to claim 1, wherein the input formula is displayed.
【請求項5】 所定の手順に従って複数の段階を経て式
を計算する処理をコンピュータに実行させるプログラム
であって、 入力手段により入力された入力式を数式記憶手段に記憶
させる記憶処理と、 指示手段による指示に応じて、前記所定の手順に従い前
記入力式の途中式を計算する計算処理と、 この計算処理により計算した途中式を前記入力式に連続
させて、当該入力式を記憶する前記数式記憶手段に記憶
させる途中式追加処理と、 この途中式追加処理により前記数式記憶手段に記憶され
た途中式及び前記入力式を表示手段に表示させる表示処
理とをコンピュータに実行させることを特徴とする計算
処理プログラム。
5. A program for causing a computer to execute a process of calculating an expression through a plurality of steps according to a predetermined procedure, the storage process storing an input expression input by the input means in the mathematical expression storage means, and an instruction means. According to the instruction by the calculation process, the intermediate formula of the input formula is calculated according to the predetermined procedure, and the intermediate formula calculated by the calculation process is continued to the input formula, and the formula storage for storing the input formula is performed. A calculation for causing a computer to execute an intermediate formula addition process to be stored in the means, and a display process for displaying the intermediate formula and the input formula stored in the mathematical formula storage device on the display device by the intermediate formula addition process. Processing program.
JP2001350876A 2001-11-16 2001-11-16 Calculator and calculation processing program Pending JP2003150563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001350876A JP2003150563A (en) 2001-11-16 2001-11-16 Calculator and calculation processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001350876A JP2003150563A (en) 2001-11-16 2001-11-16 Calculator and calculation processing program

Publications (1)

Publication Number Publication Date
JP2003150563A true JP2003150563A (en) 2003-05-23

Family

ID=19163280

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001350876A Pending JP2003150563A (en) 2001-11-16 2001-11-16 Calculator and calculation processing program

Country Status (1)

Country Link
JP (1) JP2003150563A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242176A (en) * 2004-02-27 2005-09-08 Joho Kaken:Kk Computer for learning, description display method of computer for learning, description display program of computer for learning and computation system for learning
US8725783B2 (en) 2010-03-15 2014-05-13 Casio Computer Co., Ltd. Mathematical expression calculation apparatus and computer-readable medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242176A (en) * 2004-02-27 2005-09-08 Joho Kaken:Kk Computer for learning, description display method of computer for learning, description display program of computer for learning and computation system for learning
US8725783B2 (en) 2010-03-15 2014-05-13 Casio Computer Co., Ltd. Mathematical expression calculation apparatus and computer-readable medium

Similar Documents

Publication Publication Date Title
JP5012877B2 (en) Electronic computer and program
JP5482000B2 (en) Formula input device and program
JP2003150563A (en) Calculator and calculation processing program
JP7176603B2 (en) Computing device, computing method, and program
USRE46215E1 (en) Computing machine with an inequality computation function
JP6635132B2 (en) Tax calculator, tax calculation method and tax calculation program
JP3252493B2 (en) Electronic calculator and its calculation processing method
JP4935332B2 (en) Fraction input display device and fraction input display program
JP2009282769A (en) Electronic calculator
JP4775244B2 (en) Formula processing apparatus and formula processing program
JPH08180024A (en) Desk-top electronic calculator
JP7416138B2 (en) Calculator, setting support method and program
JP7136289B2 (en) Display control device, display control method, and display control program
US11366587B2 (en) Electronic device, electronic device control method, and recording medium
US11698882B2 (en) Electronic apparatus, control method of electronic apparatus, and control program of electronic apparatus
JP2651166B2 (en) Information processing method
JP5505531B2 (en) Electronic calculator
JP3082940B2 (en) Character processing apparatus and method
JPH07319822A (en) Minicomputer with checking function
JP2023045848A (en) Calculator and calculation program
JP2526181Y2 (en) Small electronic calculator
JP4463318B2 (en) Electronic device, control program, and computer-readable recording medium
JPH021627Y2 (en)
JPH09231176A (en) Electronic computer
JP2009187492A (en) Electronic equipment provided with arithmetic function and arithmetic processing program