JP7206704B2 - Information processing method, information processing device, and program - Google Patents

Information processing method, information processing device, and program Download PDF

Info

Publication number
JP7206704B2
JP7206704B2 JP2018160574A JP2018160574A JP7206704B2 JP 7206704 B2 JP7206704 B2 JP 7206704B2 JP 2018160574 A JP2018160574 A JP 2018160574A JP 2018160574 A JP2018160574 A JP 2018160574A JP 7206704 B2 JP7206704 B2 JP 7206704B2
Authority
JP
Japan
Prior art keywords
list
instruction
command
information processing
editing
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.)
Active
Application number
JP2018160574A
Other languages
Japanese (ja)
Other versions
JP2020035147A (en
JP2020035147A5 (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.)
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 JP2018160574A priority Critical patent/JP7206704B2/en
Publication of JP2020035147A publication Critical patent/JP2020035147A/en
Publication of JP2020035147A5 publication Critical patent/JP2020035147A5/ja
Application granted granted Critical
Publication of JP7206704B2 publication Critical patent/JP7206704B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、情報処理方法、情報処理装置、およびプログラムに関する。 The present invention relates to an information processing method, an information processing apparatus, and a program.

近年の電卓は高度な機能を有し、例えば、グラフの描画、連立方程式の計算、変数を用いた演算等の可能な関数電卓が知られている。テキスト情報や計算結果のグラフ等を表示するためのディスプレイを持つものもある。そこで、例えばプログラミングを教育するために関数電卓を利用することが考えられている。 Calculators in recent years have advanced functions. For example, scientific calculators capable of drawing graphs, calculating simultaneous equations, and performing operations using variables are known. Some have displays for displaying text information, graphs of calculation results, and the like. Therefore, the use of scientific calculators has been considered, for example, in order to teach programming.

この種の関数電卓は、デフォルトの計算モードに加えて、プログラムを記述することの可能なモードを備える。以下、このモードを『アルゴリズムモード』と称して説明する。ユーザは簡単な操作により、計算モードからアルゴリズムモードに移ることができる。 This type of scientific calculator has a mode in which programs can be written in addition to the default calculation mode. Hereinafter, this mode will be referred to as "algorithm mode". The user can switch from calculation mode to algorithm mode by a simple operation.

アルゴリズムモードでは、変数に値をセットしたり、簡単な制御構造を記述できるコンパクトなプログラムを作成することができる。以下、この種のプログラムを『スクリプト』と称して説明する。スクリプトは命令としての『コマンド』の集合であり、コマンドはそれぞれ特有の処理を実行する。例えば、ディスプレイ上にアバターを表示したり、移動させたりするコマンドがある。コマンドを組み合わせてスクリプトを作成すれば、ディスプレイ上に図形を描画することもできる。 In algorithm mode, you can set values to variables and create compact programs that can describe simple control structures. Hereinafter, this kind of program will be referred to as a "script". A script is a set of "commands" as instructions, and each command performs a specific process. For example, there are commands for displaying and moving avatars on the display. You can also draw graphics on the display by combining commands to create a script.

ここで、アバターとは、ディスプレイに表示される画面に設定される座標系内の、コマンドに応じて定められる座標値に対応する位置に表示される表示体のことである。アバターは、動物などのキャラクターの画像であってもよいし、矢印やドットなどの抽象的な画像であってもよい。 Here, an avatar is a display object displayed at a position corresponding to a coordinate value determined according to a command within a coordinate system set on a screen displayed on a display. The avatar may be a character image such as an animal, or an abstract image such as an arrow or dot.

https://www.youtube.com/watch?v=eORDWe7vxdU("Scratch - Why does my sprite get stuck on the edge")(2017年12月14日検索)https://www.youtube.com/watch?v=eORDWe7vxdU ("Scratch - Why does my sprite get stuck on the edge") (searched December 14, 2017)

アルゴリズムモードは、いわゆるビジュアルツール(Visual tools)といわれるプログラミング環境の一つであり、スクリプトでアバターを動かしていろいろな図形を描画することができる。現状では、ユーザがスクリプトを作成し、マシンが図形を描く、という時系列であるが、これを逆にして、ユーザが図形を描き、マシンがその図形に合わせたスクリプトを作成する、という機能は知られていない。描いた図形から作成されたスクリプトと自作のスクリプトとを比べることができれば、学習効果が大幅に高まることを期待できる。特に、初心者にとっては学習意欲を高めるうえでも非常に有益であるといえる。 Algorithm mode is one of the so-called visual tools programming environments, and can draw various figures by moving avatars with scripts. Currently, the user creates a script and the machine draws a figure, but the function is reversed, where the user draws a figure and the machine creates a script that matches the figure. unknown. If it is possible to compare the script created from the drawn figures with the self-made script, it is expected that the learning effect will be greatly enhanced. In particular, it can be said that it is very useful for beginners to increase their willingness to learn.

本発明は、プログラミングの学習効果を高めることができる情報処理方法、情報処理装置、およびプログラムを提供することを目的とする。 SUMMARY OF THE INVENTION An object of the present invention is to provide an information processing method, an information processing apparatus, and a program that can enhance the learning effect of programming.

本発明に係る情報処理装置は、表示部に表示する1つ又は複数の図形又は表示体を含む実行結果を編集する第1編集操作を受け付け、当該第1編集操作により編集された当該実行結果をもたらす、少なくとも文字により構成される命令リストを自動で生成し、前記表示部に表示する第1処理を実行する制御手段を備え、前記制御手段は、前記第1処理において、前記実行結果をもたらす前記命令リストを、当該命令リストとは異なりかつ当該命令リストと同じ実行結果をもたらす別の命令リストへ書き換えられると判別した場合、前記命令リストを書き換えて前記別の命令リストを生成し、前記命令リストと前記別の命令リストとの何れかの命令リストを生成するかに関わる条件を設定するユーザ操作を受け付け、設定された当該条件を満たす何れかの命令リストを生成するAn information processing apparatus according to the present invention accepts a first editing operation for editing an execution result including one or more figures or display objects to be displayed on a display unit, and edits the execution result edited by the first editing operation. automatically generating a command list composed of at least characters and displaying it on the display unit, wherein the control means provides the execution result in the first process. when it is determined that the instruction list can be rewritten to another instruction list that is different from the instruction list and that brings about the same execution result as the instruction list, the instruction list is rewritten to generate the another instruction list, and A user operation for setting a condition regarding whether to generate an instruction list of the list or the other instruction list is accepted, and any instruction list that satisfies the set condition is generated .

図1は、本発明の実施形態に係る表示制御方法が適用された電子機器の外観の一例を示す正面図である。FIG. 1 is a front view showing an example of the appearance of an electronic device to which a display control method according to an embodiment of the invention is applied. 図2は、スクリプト編集画面の一例を示す図である。FIG. 2 is a diagram showing an example of a script editing screen. 図3は、スクリプト実行画面の一例を示す図である。FIG. 3 is a diagram showing an example of a script execution screen. 図4は、電子機器10の一例を示す機能ブロック図である。FIG. 4 is a functional block diagram showing an example of the electronic device 10. As shown in FIG. 図5は、スクリプト実行エンジン22aに含まれるサブルーチンの一例を示す図である。FIG. 5 is a diagram showing an example of a subroutine included in the script execution engine 22a. 図6は、スクリプト実行画面上でのユーザ操作の一例を示す図である。FIG. 6 is a diagram illustrating an example of user operation on the script execution screen. 図7は、スクリプト実行画面に描画されるオブジェクトの一例を示す図である。FIG. 7 is a diagram showing an example of an object drawn on the script execution screen. 図8は、実施形態に係わる電子機器10の処理手順の一例を示すフローチャートである。FIG. 8 is a flow chart showing an example of the processing procedure of the electronic device 10 according to the embodiment. 図9は、実行モードの選択に際してディスプレイ12に表示されるプロンプト画面の一例を示す図である。FIG. 9 is a diagram showing an example of a prompt screen displayed on the display 12 when selecting an execution mode. 図10は、Edit->Runモード、およびRun->Editモードについて説明するための図である。FIG. 10 is a diagram for explaining Edit->Run mode and Run->Edit mode. 図11は、Run->Editモードにおける処理手順の一例を示すフローチャートである。FIG. 11 is a flow chart showing an example of the processing procedure in the Run->Edit mode. 図12は、優先順位の設定に際してディスプレイ12に表示されるプロンプト画面の一例を示す図である。FIG. 12 is a diagram showing an example of a prompt screen displayed on the display 12 when setting priorities. 図13は、図12の『1:Turn』を優先して作成されたスクリプトの一例を示す図である。FIG. 13 is a diagram showing an example of a script created giving priority to "1: Turn" in FIG. 図14は、図12の『2:Direction』を優先して作成されたスクリプトの一例を示す図である。FIG. 14 is a diagram showing an example of a script created by prioritizing "2: Direction" in FIG. 図15は、図12の『3:Go to x,y』を優先して作成されたスクリプトの一例を示す図である。FIG. 15 is a diagram showing an example of a script created giving priority to "3: Go to x, y" in FIG. 図16は、スクリプトの作成条件の指定に際してディスプレイ12に表示されるプロンプト画面の一例を示す図である。FIG. 16 is a diagram showing an example of a prompt screen displayed on the display 12 when script creation conditions are designated. 図17は、図13のスクリプトにRepeat命令を適用して作成されたスクリプトの一例を示す図である。FIG. 17 is a diagram showing an example of a script created by applying a Repeat instruction to the script of FIG. 図18は、スクリプトの自動作成に係わる処理手順の一例を示すフローチャートである。FIG. 18 is a flow chart showing an example of a processing procedure related to automatic creation of a script. 図19は、この実施形態におけるユーザの操作手順の概略を説明するためのフローチャートである。FIG. 19 is a flow chart for explaining an outline of the user's operation procedure in this embodiment. 図20は、図形描画に係わる例題の一つを示す図である。FIG. 20 is a diagram showing one example related to figure drawing. 図21は、ユーザにより入力される図形の一例を示す図である。FIG. 21 is a diagram showing an example of a figure input by the user. 図22は、位置指定の優先度『1:Turn』、Repeatコマンド『不使用』の場合のスクリプトの一例を示す図である。FIG. 22 is a diagram showing an example of a script when the position specification priority is "1: Turn" and the Repeat command is "not used". 図23は、位置指定の優先度『2:Direction』、Repeatコマンド『不使用』の場合のスクリプトの一例を示す図である。FIG. 23 is a diagram showing an example of a script when the position specification priority is "2: Direction" and the Repeat command is "not used". 図24は、位置指定の優先度『3:Go to』、Repeatコマンド『不使用』または『使用』の場合のスクリプトの一例を示す図である。FIG. 24 is a diagram showing an example of a script when the position designation priority is "3: Go to" and the Repeat command is "not used" or "used". 図25は、位置指定の優先度『1:Turn』、Repeatコマンド『使用』の場合のスクリプトの一例を示す図である。FIG. 25 is a diagram showing an example of a script in the case of a position designation priority of "1: Turn" and a Repeat command of "use". 図26は、位置指定の優先度『2:Direction』、Repeatコマンド『使用』の場合のスクリプトの一例を示す図である。FIG. 26 is a diagram showing an example of a script in the case of position specification priority "2: Direction" and Repeat command "use".

以下に、本発明の実施形態に係る表示制御方法が適用された電子機器を、図面を参照して説明する。
図1は、本発明の実施形態に係る表示制御方法が適用された電子機器の外観の一例を示す正面図である。図1は、電子機器10を関数電卓として実施した場合を示す。なお関数電卓に限定されず、電子機器10は、タブレット端末、スマートフォン、携帯電話機、タッチパネル式PDA(Personal Digital Assistants)、電子ブック、携帯ゲーム機等として構成することもできる。物理的なキー(ボタン)を持たない、例えばタブレット端末のような電子機器(図示せず)は、関数電卓のキーと同様なソフトウェアキーボードを表示し、このソフトウェアキーボードに対するキー操作に応じて処理を実行する。
Electronic devices to which a display control method according to an embodiment of the present invention is applied will be described below with reference to the drawings.
FIG. 1 is a front view showing an example of the appearance of an electronic device to which a display control method according to an embodiment of the invention is applied. FIG. 1 shows a case where the electronic device 10 is implemented as a scientific calculator. The electronic device 10 is not limited to a scientific calculator, and can be configured as a tablet terminal, a smart phone, a mobile phone, a touch panel type PDA (Personal Digital Assistants), an electronic book, a portable game machine, or the like. An electronic device (not shown) such as a tablet terminal that does not have physical keys (buttons) displays a software keyboard similar to the keys of a scientific calculator, and performs processing according to key operations on this software keyboard. Run.

図1において、電子機器10は、本体正面にキー入力部11、およびディスプレイ12を備える。キー入力部11は、数値、数式、およびコマンドを入力したり、計算やスクリプトの実行を指示したりするための数値・演算記号キー群111、各種の関数を入力したりメモリ機能を立ち上げたりするための関数機能キー群112、計算モードやアルゴリズムモードといった各種動作モードのメニュー画面を表示させたり、これら動作モードの設定を指示したりするための設定キー群113、各種の機能を1回のキー操作で立ち上げるためのファンクションキー群114、ディスプレイ12に表示されたカーソルの移動操作やデータ項目の選択操作などを行うためのカーソルキー115を含む。 In FIG. 1, an electronic device 10 has a key input section 11 and a display 12 on the front of the main body. The key input unit 11 is a group of numeric/operation symbol keys 111 for inputting numerical values, formulas, and commands, and for instructing execution of calculations and scripts, various functions, and memory functions. function key group 112 for performing functions, setting key group 113 for displaying menu screens of various operation modes such as calculation mode and algorithm mode, and instructing the setting of these operation modes, and various functions can be performed once. It includes a function key group 114 for activation by key operation, and a cursor key 115 for moving a cursor displayed on the display 12 and selecting a data item.

数値・演算記号キー群111としては、[0]~[9](数値)キー、[+][-][×][÷](四則記号)キー、[=](実行:EXE)キー、[AC](クリア)キーなどが配列される。
関数機能キー群112としては、[sin](サイン)キー、[cos](コサイン)キー、[tan](タンジェント)キーなどが配列される。
設定キー群113としては、[OPTN](オプション)キー、[CALC](キーなどが配列される。
ファンクションキー群114としては、[SHIFT]キー、~[ALPHA]キーなどが配列される。
The numerical value/operation symbol key group 111 includes [0] to [9] (numerical value) keys, [+] [-] [x] [÷] (four arithmetic symbols) keys, [=] (execution: EXE) key, An [AC] (clear) key and the like are arranged.
As the function key group 112, a [sin] (sine) key, a [cos] (cosine) key, a [tan] (tangent) key, etc. are arranged.
As the setting key group 113, an [OPTN] (option) key, a [CALC] (key, etc.) are arranged.
As the function key group 114, a [SHIFT] key, ~ [ALPHA] key, etc. are arranged.

なお、数値・演算記号キー群111、関数機能キー群112、設定キー群113、ファンクションキー群114のキーは、[SHIFT]キーが操作された後に続けて操作されることで、そのキートップに記載されたキー機能ではなく、そのキーの上方に記載されたキーとして機能できるようになっている。例えば、[SHIFT]キー操作後に[DEL]キーが操作(以下、[SHIFT]+[DEL]キーと記す。)されると、[UNDO](操作取消)キーとなる。 Note that the keys of the numeric/arithmetic symbol key group 111, the function key group 112, the setting key group 113, and the function key group 114 are displayed on the key tops by being operated continuously after the [SHIFT] key is operated. It is designed to function as the key described above that key, rather than the key function described. For example, when the [DEL] key is operated after the [SHIFT] key is operated (hereinafter referred to as [SHIFT]+[DEL] key), it becomes the [UNDO] (cancel operation) key.

電子機器10の動作モードは、例えば設定キー群113における『CALC』キーが押下されるたびに、計算モードとアルゴリズムモードとで交互に切り替わる。すなわち、電子機器10は、少なくとも、計算モードとアルゴリズムモードの2種類の動作モードを備える。もちろん、3つ以上のモードを備えていてもよく、その場合には『CALC』キーを押下するたびに順次、モードを切り替えるようにすればよい。 The operation mode of the electronic device 10 is alternately switched between the calculation mode and the algorithm mode each time the "CALC" key in the setting key group 113 is pressed, for example. That is, the electronic device 10 has at least two operation modes, a calculation mode and an algorithm mode. Of course, three or more modes may be provided, in which case the mode may be switched in sequence each time the 'CALC' key is pressed.

ディスプレイ12は、例えばドットマトリクス型の液晶表示ユニットである。電子機器10がタブレット端末であれば、ディスプレイ12は、タッチパネルを重ねて設けた液晶表示ユニットである。ディスプレイ12は、スクリプト編集画面と、スクリプト実行画面との少なくとも2つの画面を、ユーザ操作に応じて切り替え表示する。 The display 12 is, for example, a dot-matrix liquid crystal display unit. If the electronic device 10 is a tablet terminal, the display 12 is a liquid crystal display unit in which touch panels are stacked. The display 12 switches and displays at least two screens, a script edit screen and a script execution screen, according to user operations.

図2に示されるように、スクリプト編集画面は、命令リストとしてのスクリプトを、表示画面内の、例えば4行のスクリプト表示領域に縦スクロール可能に表示する。各行がコマンドに対応する。スクリプト編集画面上でスクリプトを編集することも可能である。 As shown in FIG. 2, the script editing screen displays a script as an instruction list in a vertically scrollable script display area of, for example, four lines within the display screen. Each line corresponds to a command. It is also possible to edit the script on the script editing screen.

図3は、スクリプト実行画面の一例を示す図で、アバターAが座標(x、y)=(5,0)に表示されていることを示す。ちなみに図3は図2のスクリプトの実行結果を示しており、アバターAは(0,-1)→(5,-1)→(5,0)の順に移動し、その移動軌跡が図3に直線で示される。実施形態では、スクリプト実行画面上で描画されるアバターの移動軌跡を、オブジェクトと称する。 FIG. 3 is a diagram showing an example of the script execution screen, showing that avatar A is displayed at coordinates (x, y)=(5, 0). By the way, FIG. 3 shows the execution result of the script in FIG. indicated by a straight line. In the embodiment, the movement trajectory of the avatar drawn on the script execution screen is called an object.

図4は、電子機器10の一例を示す機能ブロック図である。電子機器10は、キー入力部11およびディスプレイ12に加えて、CPU(Central Processing Unit)21、メモリ22、および記録媒体読取部24を備える。つまり電子機器10は、プロセッサとメモリとを有する、コンピュータである。 FIG. 4 is a functional block diagram showing an example of the electronic device 10. As shown in FIG. The electronic device 10 includes a CPU (Central Processing Unit) 21 , a memory 22 , and a recording medium reading section 24 in addition to a key input section 11 and a display 12 . That is, the electronic device 10 is a computer having a processor and memory.

CPU21は、メモリ22に書き込まれているプログラムに従って各部の動作を制御し、キー入力部11からのキー入力信号に応じた各種の処理を実行する。プログラムは、メモリ22に予め記録されていてもよいし、あるいはメモリカード等の外部記録媒体23から記録媒体読取部24を介してメモリ22に読み込まれて記憶されたものであってもよい。 The CPU 21 controls the operation of each section according to the program written in the memory 22 and executes various processes according to the key input signal from the key input section 11 . The program may be pre-recorded in the memory 22 or may be read from an external recording medium 23 such as a memory card via the recording medium reading section 24 and stored in the memory 22 .

メモリ22は、書き換え不可の領域に加えて、書込可能データエリア22bを有する。書込可能データエリア22bは、例えば、キー入力部11によりキー入力されたキーコードのデータ、数式のデータ、表データ、グラフデータ、あるいはスクリプトのテキストデータ等を記憶するためのエリアである
例えば、メモリ22の書き換え不可の領域に、プログラムとしてのスクリプト実行エンジン22aが記録される。スクリプト実行エンジン22aは、アルゴリズムモードにおけるスクリプトの編集、コンパイル、実行等の、スクリプトの作成から実行に係わる機能を制御するプログラムである。
The memory 22 has a writable data area 22b in addition to the non-rewritable area. The writable data area 22b is an area for storing, for example, key code data, formula data, table data, graph data, script text data, or the like key-inputted by the key input unit 11. For example, A script execution engine 22 a as a program is recorded in a non-rewritable area of the memory 22 . The script execution engine 22a is a program that controls functions related to script creation to execution, such as script editing, compilation, and execution in the algorithm mode.

電子機器10は、プログラムに記述された命令に従ってCPU21が各部の動作を制御し、ソフトウェアとハードウェアとが協働して動作することにより、以下に説明する機能を実現する。 The electronic device 10 implements the functions described below by the CPU 21 controlling the operation of each unit according to the instructions written in the program, and the software and hardware operating in cooperation.

図5は、スクリプト実行エンジン22aに含まれるサブルーチンの一例を示す図である。スクリプト実行エンジン22aは、オブジェクト編集受付ルーチン22a1、スクリプト作成ルーチン22a2、表示制御ルーチン22a3、スクリプト編集受付ルーチン22a4、および作成条件設定ルーチン22a5を備える。 FIG. 5 is a diagram showing an example of a subroutine included in the script execution engine 22a. The script execution engine 22a includes an object editing reception routine 22a1, a script creation routine 22a2, a display control routine 22a3, a script editing reception routine 22a4, and a creation condition setting routine 22a5.

オブジェクト編集受付ルーチン22a1は、スクリプト実行画面に表示されるオブジェクトを編集するためのユーザ操作を受け付ける。図6に示されるように、スクリプト実行画面上でアバターを移動させてゆくと、その移動軌跡がオブジェクトとして描画される。図6の白抜き矢印は、その位置で何らかのユーザ操作(カーソルキー115の押下など)がなされることを示す。 The object edit acceptance routine 22a1 accepts a user operation for editing an object displayed on the script execution screen. As shown in FIG. 6, when the avatar is moved on the script execution screen, the locus of movement is drawn as an object. A white arrow in FIG. 6 indicates that some user operation (such as pressing the cursor key 115) is performed at that position.

図6を用いて、オブジェクト編集受付ルーチン22a1が実行する処理を、具体的に説明する。初期状態で、アバターの位置座標は原点(0,0)にあったとする。この状態から、「描画開始」を指示するペンダウン操作(例えば「+」ボタンの押下)を行った後、カーソルキー115の右ボタンを操作して例えば座標(30,0)にまでアバターを移動させ、実行キー(例えば「=」ボタン)を押下する。そうするとアバターの軌跡が確定し、(0,0)と(30,0)を結ぶ1本の線が画面上に描画される。 The processing executed by the object editing reception routine 22a1 will be specifically described with reference to FIG. Assume that the position coordinates of the avatar are at the origin (0, 0) in the initial state. From this state, after performing a pen-down operation (for example, pressing the "+" button) to instruct "start drawing", the right button of the cursor key 115 is operated to move the avatar to, for example, coordinates (30, 0). , press the execution key (for example, the “=” button). Then, the trajectory of the avatar is fixed, and one line connecting (0, 0) and (30, 0) is drawn on the screen.

続いて、カーソルキー115の上ボタンを操作して例えば座標(30,10)にまでアバターを移動させ、実行キー「=」を押下する。そうすると(30,0)と(30,10)を結ぶ2本目の線が画面上に描画される。さらに、カーソルキー115の右ボタンを操作して例えば座標(60,10)にまでアバターを移動させ、実行キー「=」を押下すると、(30,10)と(60,10)を結ぶ3本目の線が画面上に描画される。最後に、「描画終了」を指示するペンアップ操作(例えば「-」ボタンの押下)により、線の描画が終了する。このような手順により、図6に示されるようなかぎ型の図形を描画することができる。 Subsequently, the upper button of the cursor key 115 is operated to move the avatar to coordinates (30, 10), for example, and the execution key "=" is pressed. Then, a second line connecting (30, 0) and (30, 10) is drawn on the screen. Further, if the right button of the cursor key 115 is operated to move the avatar to coordinates (60, 10), for example, and the execution key "=" is pressed, the third line connecting (30, 10) and (60, 10) is displayed. lines are drawn on the screen. Finally, the drawing of the line is finished by a pen-up operation (for example, pressing the "-" button) to instruct "finish drawing". With such a procedure, a hook-shaped figure as shown in FIG. 6 can be drawn.

オブジェクトの位置や形状は、スクリプト実行画面において、カーソルキー115を上下左右に押下して自由に編集することが可能である。例えば、ペンダウン「+」→カーソルキー115の上ボタンで(0,20)まで移動→実行キー「=」→カーソルキー115の右ボタンで(20,20)まで移動→実行キー「=」→カーソルキー115の下ボタンで(20,0)まで移動→実行キー「=」→カーソルキー115の左ボタンで(0,0)まで移動→実行キー「=」→ペンアップ「-」の手順で、図7に示されるような正方形を描くことも可能である。 The position and shape of the object can be freely edited by pressing the cursor key 115 up, down, left, or right on the script execution screen. For example, pen down "+" → move to (0, 20) with the upper button of the cursor key 115 → execute key "=" → move to (20, 20) with the right button of the cursor key 115 → execute key "=" → cursor Move to (20, 0) with the lower button of the key 115 → Execution key "=" → Move to (0, 0) with the left button of the cursor key 115 → Execution key "=" → Pen up "-". It is also possible to draw a square as shown in FIG.

ここで、アバターの初期位置である原点(0,0)および実行キー「=」を押下した各座標値が、図18を用いて後述するスクリプトの自動作成に係わる処理における、スタート値(x1,y1)またはエンド値(x2,y2)として用いられる。なお、ディスプレイ12がタッチパネルであれば、描画したい図形の頂点に対応するパネル上の位置に指先を接触させる操作(タッチ)や、パネルに指先を接触させたまま移動させる操作(タッチ&スライド)により、図形を描画することも可能である。 Here, the origin (0, 0), which is the initial position of the avatar, and each coordinate value at which the execution key “=” is pressed are the start values (x1, y1) or end value (x2, y2). If the display 12 is a touch panel, an operation (touch) of touching the fingertip to a position on the panel corresponding to the vertex of the figure to be drawn, or an operation (touch & slide) of moving the fingertip while touching the panel, can be performed. , it is also possible to draw figures.

スクリプト作成ルーチン22a2は、スクリプト実行画面において編集されたオブジェクトに対応するスクリプトを、作成条件設定ルーチン22a5により設定された作成条件に従って作成する。 The script creation routine 22a2 creates a script corresponding to the object edited on the script execution screen according to the creation conditions set by the creation condition setting routine 22a5.

表示制御ルーチン22a3は、スクリプト作成ルーチン22a2により作成されたスクリプトを、スクリプト編集画面に表示する。 The display control routine 22a3 displays the script created by the script creating routine 22a2 on the script editing screen.

スクリプト編集受付ルーチン22a4は、スクリプト編集画面に表示されるスクリプトを編集するためのユーザ操作を受け付ける。『CALC』キーの押下により電子機器10がアルゴリズムモードになると、スクリプト編集受付ルーチン22a4は、数値・演算記号キー群111から、コマンドの入力を受け付ける。例えば、ディスプレイ12に表示されているアバターAの表示位置を或る移動量で移動させるコマンドがある。ユーザは、数値・演算記号キー群111を操作して、引数としての移動量とともにコマンドを入力し、スクリプトを作成する。 The script edit acceptance routine 22a4 accepts a user operation for editing the script displayed on the script edit screen. When the electronic device 10 enters the algorithm mode by pressing the 'CALC' key, the script editing acceptance routine 22 a 4 accepts input of commands from the numerical/arithmetic symbol key group 111 . For example, there is a command to move the display position of avatar A displayed on the display 12 by a certain amount of movement. The user operates the numerical value/operation symbol key group 111 to input a command together with a movement amount as an argument to create a script.

作成条件設定ルーチン22a5は、スクリプトの作成条件を指定するためのユーザ操作を受け付ける。そして、作成条件設定ルーチン22a5は、指定された作成条件に基づいて、スクリプト作成ルーチン22a2にスクリプトを作成させる。次に、上記構成における作用を説明する。 The creation condition setting routine 22a5 accepts a user operation for specifying script creation conditions. Then, the creation condition setting routine 22a5 causes the script creation routine 22a2 to create a script based on the designated creation conditions. Next, the operation of the above configuration will be described.

図8は、実施形態に係わる電子機器10の処理手順の一例を示すフローチャートである。アルゴリズムモードに入ると、初期画面を表示したのち、電子機器10は、ユーザによる実行モードの選択を受け付ける(ステップS31)。ここでは、例えば図9に示されるようなプロンプトがディスプレイ12に表示される。ユーザはカーソルキー115を操作して、Edit->Runモード(数値1に対応)、またはRun->Editモード(数値2に対応)のいずれかを指定することができる。 FIG. 8 is a flow chart showing an example of the processing procedure of the electronic device 10 according to the embodiment. When entering the algorithm mode, after displaying the initial screen, the electronic device 10 accepts selection of the execution mode by the user (step S31). Here, for example, a prompt as shown in FIG. 9 is displayed on the display 12 . The user can operate the cursor keys 115 to specify either Edit->Run mode (corresponding to numerical value 1) or Run->Edit mode (corresponding to numerical value 2).

図10を参照して、これらの2つのモードについて説明する。Edit->Runモードは、ディスプレイ12に表示されるスクリプトを編集するためのモードであり、例えば、コマンドに与えられる引数を変更するなどの操作を行うことができる。当該スクリプトを実行した結果として画面に表示される図形は、基本的には編集できないようになっている。Run->Editモードは、ディスプレイ12の画面に表示される図形を編集可能とするモードであり、図形の編集が完了した後に実行ボタン(例えばEXEボタン)が押下されると、その図形に対応するスクリプトが自動で生成される。ここで、編集済のスクリプトのデータは、メモリ22におけるそれぞれのモードからアクセス可能な記憶領域(共通データエリア)に記憶されている。 These two modes are described with reference to FIG. The Edit->Run mode is a mode for editing scripts displayed on the display 12, and can perform operations such as changing arguments given to commands, for example. The graphics displayed on the screen as a result of executing the script are basically not editable. The Run->Edit mode is a mode in which a figure displayed on the screen of the display 12 can be edited. When an execution button (for example, an EXE button) is pressed after editing of the figure is completed, the corresponding figure is displayed. A script is automatically generated. Here, the edited script data is stored in a storage area (common data area) accessible from each mode in the memory 22 .

図8のフローチャートに戻って説明を続ける。ステップS31においてEdit->Runモードが指定(1)されると、電子機器10は、メモリ22の共通データエリアに記憶されたスクリプトを読み出し、ディスプレイ12に表示する(ステップS32)。 Returning to the flow chart of FIG. 8, the description continues. When the Edit->Run mode is designated (1) in step S31, the electronic device 10 reads the script stored in the common data area of the memory 22 and displays it on the display 12 (step S32).

次に、電子機器10は、編集開始のユーザ操作(ステップS33)、スクリプト実行のユーザ操作(ステップS37)、およびアルゴリズムモード終了のユーザ操作(ステップS39)を待ち受け、いずれの操作も無ければ(No)、ステップS33~ステップS39のループが繰り返される。 Next, the electronic device 10 waits for a user operation to start editing (step S33), a user operation to execute a script (step S37), and a user operation to end the algorithm mode (step S39). ), and the loop of steps S33 to S39 is repeated.

ステップS33で、編集開始のユーザ操作があれば(Yes)、ユーザによるスクリプトの編集操作が受け付けられる(ステップS34)。編集終了のユーザ操作が有れば(ステップS35でYes)、最新の編集内容がメモリ22の共通データエリアに反映され、記憶される(ステップS36)。そして、スクリプトの実行のユーザ操作があれば(ステップS37でYes)、電子機器10は共通データエリアのスクリプトを読み出し、実行する(ステップS38)。 If there is a user operation to start editing in step S33 (Yes), the script editing operation by the user is accepted (step S34). If there is a user operation to end editing (Yes in step S35), the latest edited content is reflected and stored in the common data area of memory 22 (step S36). Then, if there is a user operation to execute a script (Yes in step S37), the electronic device 10 reads and executes the script in the common data area (step S38).

一方、図8のフローチャートのステップS31においてRun->Editモードが指定(2)されると、図11のフローチャートに示される処理手順が開始される。このモードにおいて、電子機器10は、最初にRun->Editモードにおける初期画面を表示する(ステップS51)。初期画面は、例えば図10に示されるように、横方向(x軸)および縦方向(y軸)の各座標軸を備える。初期座標としての原点にx印を表示しても良い。 On the other hand, when the Run->Edit mode is specified (2) in step S31 of the flowchart of FIG. 8, the processing procedure shown in the flowchart of FIG. 11 is started. In this mode, the electronic device 10 first displays an initial screen in the Run->Edit mode (step S51). The initial screen has horizontal (x-axis) and vertical (y-axis) coordinate axes, as shown in FIG. 10, for example. An x mark may be displayed at the origin as the initial coordinates.

次に、電子機器10は、スクリプト自動生成に係わる優先順位の設定を待ち受け(ステップS52)、ユーザ操作が有れば(Yes)、優先順位設定のユーザ操作を受け付ける(ステップS53)。優先順位の設定は、例えば図12および図16に示されるようなプロンプトを用いてユーザに促される。 Next, the electronic device 10 waits for priority setting related to automatic script generation (step S52), and if there is a user operation (Yes), accepts the user operation for priority setting (step S53). The setting of priorities is prompted to the user using prompts such as those shown in FIGS. 12 and 16, for example.

図12は、ディスプレイ12に表示されるアバターAの位置を指定するための、3つの条件(Priority-1)を示す。これらの条件のうちいずれを優先するかを、ユーザは、カーソルキー115を押下するなどの操作で指定する。 FIG. 12 shows three conditions (Priority-1) for designating the position of avatar A displayed on display 12 . The user designates which of these conditions is to be prioritized by an operation such as pressing the cursor key 115 .

『1:Turn』は、アバターの位置を、ディスプレイ12の座標系における現在の絶対角度に対する相対角度、および現在位置からの移動量で指定する、という条件である。この条件が指定されると、電子機器10は、図13に示されるように、回転を指示する命令(Turnコマンド)と、移動を指示する命令(Moveコマンド)との組み合わせでアバターを移動させるようなスクリプトを自動生成する。 "1: Turn" is a condition that the position of the avatar is specified by the angle relative to the current absolute angle in the coordinate system of the display 12 and the amount of movement from the current position. When this condition is specified, the electronic device 10, as shown in FIG. 13, causes the avatar to move by combining a command to instruct rotation (Turn command) and a command to instruct movement (Move command). automatically generate a script.

『2:Direction』は、アバターの位置を、ディスプレイ12の座標系における絶対角度、および現在位置からの移動量で指定する、という条件である。この条件が指定されると、電子機器10は、図14に示されるように、向きを指定する命令(Directionコマンド)と、移動を指示する命令(Moveコマンド)との組み合わせでアバターを移動させるようなスクリプトを自動生成する。 "2: Direction" is a condition that the position of the avatar is specified by the absolute angle in the coordinate system of the display 12 and the amount of movement from the current position. When this condition is specified, the electronic device 10, as shown in FIG. 14, causes the avatar to move by combining a direction designation command (Direction command) and a movement command (Move command). automatically generate a script.

『3:Go to x,y』は、アバターの位置を、ディスプレイ12の座標系における座標値で直接指定する、という条件である。この条件が指定されると、電子機器10は、図15に示されるように、アバターの座標を指定する命令(Go toコマンド)でアバターを移動させるようなスクリプトを自動生成する。 “3: Go to x, y” is a condition that the position of the avatar is directly designated by coordinate values in the coordinate system of the display 12 . When this condition is specified, the electronic device 10 automatically generates a script for moving the avatar with a command (Go to command) specifying the coordinates of the avatar, as shown in FIG.

図16は、スクリプトの作成に係わる2つ目の優先度(Priority-2)を選択するためのプロンプト画面の一例を示す。図16に示される画面において、ユーザは、『1:Sequence』または『2:Repeat』のいずれかを、カーソルキー115を押下するなどの操作で指定する。 FIG. 16 shows an example of a prompt screen for selecting the second priority (Priority-2) related to script creation. On the screen shown in FIG. 16, the user designates either “1: Sequence” or “2: Repeat” by an operation such as pressing the cursor key 115 .

『1:Sequence』は、順次型のアルゴリズムを優先してスクリプトを作成する、という条件である。この条件が指定されると、電子機器10は、Repeat命令を考慮せず、図13のようなシーケンス型のスクリプトを生成する。 "1: Sequence" is a condition that the script is created with priority given to the sequential algorithm. When this condition is specified, electronic device 10 generates a sequence type script as shown in FIG. 13 without considering the Repeat command.

『2:Repeat』は、ループ型のアルゴリズムを優先してスクリプトを作成する、という条件である。この条件が指定されると、電子機器10は、Repeat命令を考慮し、この命令をできる限り使用してコンパクトなスクリプトを生成する。例えば図13のスクリプトにRepeat命令を適用すれば、『Move 20 pixels』と『Turn90 degree』の4回の繰り返しが一つのRepeat構文でまとめられ、図17に示されるようなスクリプトが作成される。 "2: Repeat" is a condition that the script is created with priority given to the loop type algorithm. Given this condition, the electronic device 10 takes into account the Repeat instruction and uses this instruction as much as possible to generate a compact script. For example, if the Repeat command is applied to the script in FIG. 13, four repetitions of "Move 20 pixels" and "Turn 90 degree" are combined into one Repeat syntax, and a script as shown in FIG. 17 is created.

図11のフローチャートに戻って説明を続ける。次のステップにおいて、電子機器10は、図形描画に係わるユーザ操作を待ち受ける(ステップS54)。ユーザ操作が無ければ(No)、処理手順はステップS59にジャンプしてアルゴリズムモード終了のユーザ操作の有無を判定し、当該ユーザ操作が有れば(Yes)終了する(図8のEnd)。ステップS59で(No)であれば、処理手順はステップS52に戻る。 Returning to the flow chart of FIG. 11, the description continues. In the next step, the electronic device 10 waits for a user operation related to figure drawing (step S54). If there is no user operation (No), the processing procedure jumps to step S59 to determine whether or not there is a user operation to end the algorithm mode. If (No) in step S59, the processing procedure returns to step S52.

ステップS54において、図形描画に係わるユーザ操作が有れば(Yes)、電子機器10は、このユーザ操作を受け付ける(ステップS55)。 In step S54, if there is a user operation related to figure drawing (Yes), the electronic device 10 accepts this user operation (step S55).

そして、図形を描画するモードを終了するユーザ操作が有れば(ステップS56でYes)、電子機器10は、指定された優先順位および指定された図形に基づいて、スクリプトを自動生成する(ステップS57)。次に、電子機器10は、作成したスクリプトをディスプレイ12に表示したのち(ステップS58)、アルゴリズムモード終了のユーザ操作を待つ状態となる。 Then, if there is a user operation to end the mode for drawing a figure (Yes in step S56), the electronic device 10 automatically generates a script based on the specified priority and the specified figure (step S57). ). Next, after displaying the created script on the display 12 (step S58), the electronic device 10 waits for a user operation to terminate the algorithm mode.

図18は、スクリプトの自動作成に係わる処理手順の一例を示すフローチャートである。ここで、初期状態において、アバターの座標は原点(0,0)であり、絶対角度は「0°」であるとする。図18において、電子機器10は、Run->Editモードにおいて描画された図形(例えば図7)の各点の、スタート値(x1,y1)およびエンド値(x2,y2)をキャッシュメモリに格納し(ステップS1,S2)、Priority-1での優先順位をチェックする(ステップS3)。 FIG. 18 is a flow chart showing an example of a processing procedure related to automatic creation of a script. Here, in the initial state, it is assumed that the coordinates of the avatar are the origin (0, 0) and the absolute angle is "0°". In FIG. 18, the electronic device 10 stores the start value (x1, y1) and the end value (x2, y2) of each point of the figure (for example, FIG. 7) drawn in the Run->Edit mode in the cache memory. (Steps S1 and S2), the priority in Priority-1 is checked (Step S3).

ここで、図6を用いて説明したように、オブジェクトを描画する際、アバターの初期位置は原点(0,0)であり、アバターを移動させる毎に実行キー「=」を押下する操作を複数回繰り返すことで、当該オブジェクトの複数の頂点が順次指定される。このとき、描画される当該オブジェクトの複数の頂点の中の隣接する2つの頂点のうち、時系列で先に指定した座標値をスタート値、後に指定した座標値をエンド値という。したがって、スタート値とエンド値の組が複数存在する場合がある。 Here, as described with reference to FIG. 6, when drawing an object, the initial position of the avatar is the origin (0, 0), and each time the avatar is moved, the operation of pressing the execution key “=” is performed multiple times. By repeating this multiple times, a plurality of vertices of the object are sequentially specified. At this time, among two adjacent vertices among a plurality of vertices of the object to be drawn, the coordinate value specified first in chronological order is called the start value, and the coordinate value specified later is called the end value. Therefore, there may be multiple sets of start and end values.

例えば、図6においては、(0,0)と(30,0)との組、(30,0)と(30,10)との組、および、(30,10)と(60,10)との組がスタート値(x1,y1)とエンド値(x2,y2)との組である。また、図7においては、(0,0)と(20,0)との組、(20,0)と(20,20)との組、(20,20)と(0,20)との組、および、(0,20)と(0,0)との組がスタート値(x1,y1)とエンド値(x2,y2)との組である。 For example, in FIG. 6, the pair (0,0) and (30,0), the pair (30,0) and (30,10), and the pair (30,10) and (60,10) is a set of a start value (x1, y1) and an end value (x2, y2). Also, in FIG. 7, the set of (0,0) and (20,0), the set of (20,0) and (20,20), the set of (20,20) and (0,20) and the pair of (0,20) and (0,0) are the pair of start value (x1,y1) and end value (x2,y2).

図18において、『1:Turn』が指定されていれば、電子機器10は、上記キャッシュされたスタート値、エンド値に基づいてTurnコマンド、Moveコマンドのそれぞれの引数を計算し、これらのコマンドを順に配置してスクリプトブロックを生成する(ステップS4)。 In FIG. 18, if "1: Turn" is specified, the electronic device 10 calculates the respective arguments of the Turn command and Move command based on the cached start value and end value, and executes these commands. The script blocks are generated by arranging them in order (step S4).

スタート値(0,0)からエンド値(20,0)へのアバターの移動軌跡の場合、ディスプレイ12の座標系における現在の絶対角度は「0°」であるので、当該絶対角度に対する相対角度は「0°」である。また、現在位置からの移動量は「20」である。したがって、アバターの回転は不要であり、移動だけすればよいので、図13の2行目に示すように「Move 20 pixels」だけが、コマンドとして生成される。 In the case of the avatar movement trajectory from the start value (0,0) to the end value (20,0), the current absolute angle in the coordinate system of the display 12 is "0°", so the relative angle to the absolute angle is It is "0°". Also, the amount of movement from the current position is "20". Therefore, the avatar does not need to be rotated, only moved, so only "Move 20 pixels" is generated as a command as shown in the second line of FIG.

『2:Direction』が指定されていれば、電子機器10は、上記キャッシュされたスタート値、エンド値に基づいてDirectionコマンド、Moveコマンドのそれぞれの引数を計算し、これらのコマンドを順に配置してスクリプトブロックを生成する(ステップS5)。 If "2: Direction" is specified, the electronic device 10 calculates arguments for each of the Direction command and Move command based on the cached start value and end value, and arranges these commands in order. A script block is generated (step S5).

スタート値(0,0)からエンド値(20,0)へのアバターの移動軌跡の場合、ディスプレイ12の座標系における絶対角度は「0°」である。また、現在位置からの移動量は「20」である。したがって、アバターの回転は不要であり、移動だけすればよいので、図13の2行目に示すように「Move 20 pixels」だけが、コマンドとして生成される。 For the avatar movement trajectory from the start value (0,0) to the end value (20,0), the absolute angle in the coordinate system of the display 12 is "0°". Also, the amount of movement from the current position is "20". Therefore, the avatar does not need to be rotated, only moved, so only "Move 20 pixels" is generated as a command as shown in the second line of FIG.

『3:Go to』が指定されていれば、電子機器10は、上記キャッシュされたスタート値、エンド値に基づいてGo toコマンドの引数(座標値)を計算し、スクリプトブロックを生成する(ステップS6)。 If "3: Go to" is specified, the electronic device 10 calculates arguments (coordinate values) of the Go to command based on the cached start value and end value, and generates a script block (step S6).

スタート値(0,0)からエンド値(20,0)へのアバターの移動軌跡の場合、スタート値の座標にかかわらず、現在位置からエンド値(20,0)へ直接移動するコマンドとして、「Go to x=20,y=0」が生成される。 In the case of the trajectory of avatar movement from the start value (0,0) to the end value (20,0), regardless of the coordinates of the start value, the command to move directly from the current position to the end value (20,0) is: Go to x=20, y=0" is generated.

ステップS1~ステップS6までの処理は、点の終端に至るまで繰り返される(ステップS7)。終端に至ると(ステップS7でYes)、電子機器10は、Priority-2での優先順位をチェックする(ステップS8)。『Sequence』が指定されていれば、電子機器10は、上記生成されたブロックを順に配列してスクリプトを作成し、メモリ22に記憶したのち、処理手順は図11のステップS58に移行する。 The processing from step S1 to step S6 is repeated until the end of the point is reached (step S7). When reaching the end (Yes in step S7), the electronic device 10 checks the priority in Priority-2 (step S8). If "Sequence" is specified, electronic device 10 creates a script by arranging the generated blocks in order, stores the script in memory 22, and then proceeds to step S58 in FIG.

『Repeat』が指定されていれば、電子機器10は、上記生成されたブロックのうち連続するブロックが有れば、それらを『Repeat』コマンドに置き換えてスクリプトを作成する。作成されたスクリプトはメモリ22に記憶され、処理手順は図11のステップS58に移行する。 If "Repeat" is specified, electronic device 10 creates a script by replacing them with "Repeat" commands if there are continuous blocks among the generated blocks. The created script is stored in memory 22, and the processing procedure proceeds to step S58 in FIG.

図19は、この実施形態におけるユーザの操作手順の概略を説明するためのフローチャートである。ユーザは、実行画面(例えば図7)で目的の図形を描画し(ステップS21)、Edit画面(例えば図2)で、その図形に対応して生成されたアルゴリズム(スクリプト)を確認する(ステップS22)。そして、位置指定の優先度(『1:Turn』か、『2:Direction』か、『3:Go to』か)、および、コマンドの実行順序の制御形態の指定(Repeatコマンドを用いるかそうでないか)の設定を変更する。そうすると、同じ図形について、変更後の設定内容に応じて、変更前とは異なる記述の新たなスクリプトが生成され、ユーザは再度、Edit画面に戻って新たなスクリプトを確認することができる(ステップS23)。 FIG. 19 is a flow chart for explaining an outline of the user's operation procedure in this embodiment. The user draws a target graphic on the execution screen (eg, FIG. 7) (step S21), and confirms the algorithm (script) generated corresponding to the graphic on the Edit screen (eg, FIG. 2) (step S22). ). Then, the priority of position specification ("1: Turn", "2: Direction", or "3: Go to"), and the specification of the control form of the execution order of commands (whether a Repeat command is used or not). or ). Then, for the same figure, a new script with a different description from before the change is generated according to the setting contents after the change, and the user can return to the Edit screen and check the new script (step S23). ).

例えば、図20に示されるような図形を描く問題が与えられたとする。ユーザはカーソルキー115を操作して、実行画面上で図21のような図形を描く。この図形を描くためのスクリプトは複数有るが、電子機器10は、予め設定された優先順位を満たすスクリプトを自動生成し、Edit画面に表示する。この場合、設定条件に応じて自動生成されるスクリプトは、それぞれ図22~図26に示すようになる。 For example, assume that a problem of drawing a figure as shown in FIG. 20 is given. The user operates the cursor keys 115 to draw a figure as shown in FIG. 21 on the execution screen. Although there are a plurality of scripts for drawing this figure, the electronic device 10 automatically generates a script that satisfies preset priorities and displays it on the Edit screen. In this case, the scripts automatically generated according to the setting conditions are as shown in FIGS. 22 to 26, respectively.

図22は、位置指定の優先度『1:Turn』、Repeatコマンド『不使用』の場合のスクリプトの一例を示す図である。
図23は、位置指定の優先度『2:Direction』、Repeatコマンド『不使用』の場合のスクリプトの一例を示す図である。図22に比べてTurn命令が排除され、Direction命令が用いられていることが分かる。
FIG. 22 is a diagram showing an example of a script when the position specification priority is "1: Turn" and the Repeat command is "not used".
FIG. 23 is a diagram showing an example of a script when the position specification priority is "2: Direction" and the Repeat command is "not used". As compared to FIG. 22, it can be seen that the Turn instruction is eliminated and the Direction instruction is used.

図24は、位置指定の優先度『3:Go to』、Repeatコマンド『不使用』または『使用』の場合のスクリプトの一例を示す図である。Go to命令により座標の移動が指示されていることが分かる。 FIG. 24 is a diagram showing an example of a script when the position designation priority is "3: Go to" and the Repeat command is "not used" or "used". It can be seen that the Go to instruction instructs movement of coordinates.

図25は、位置指定の優先度『1:Turn』、Repeatコマンド『使用』の場合のスクリプトの一例を示す図である。図22と比較すると、同様の命令からなるブロックがRepeatステートメントでまとめられ、効率的なスクリプトになっていることが分かる。 FIG. 25 is a diagram showing an example of a script in the case of a position designation priority of "1: Turn" and a Repeat command of "use". Comparing with FIG. 22, it can be seen that blocks of similar instructions are grouped by Repeat statements to form an efficient script.

図26は、位置指定の優先度『2:Direction』、Repeatコマンド『使用』の場合のスクリプトの一例を示す図である。こちらも図23と比較すると、Repeatステートメントにより効率的なスクリプトになっていることが分かる。 FIG. 26 is a diagram showing an example of a script in the case of position specification priority "2: Direction" and Repeat command "use". Comparing this with FIG. 23 also reveals that the Repeat statement makes the script more efficient.

以上説明したように、実施形態によれば、ユーザ操作により作成された図形からスクリプトが作成される。これにより、ユーザは、結果のイメージがあってもコマンドの並べ方がイメージできない場合、スクリプトの他の組み方があるのかどうかを確認したい場合、あるいは、さらに簡単なスクリプトな組み方で作成できないか、などを手軽に確認することができる。また、実行画面からEdit画面でスクリプトを作成することで、コマンドの並べ方を容易に理解することが可能となる。さらに、図形からスクリプトへの変換の優先順位を予め設定しておくことで、複数の形態のスクリプトを作成することが可能となる。これにより、複数のパターンのコマンドの並び方を確認でき、スクリプトの考え方を学べる効果がある。 As described above, according to the embodiment, a script is created from a figure created by a user's operation. As a result, the user can ask if there is an image of the result but cannot imagine how the commands are arranged, if there is another way to compose the script, or if there is a simpler way of compiling the script, etc. You can check it easily. Also, by creating a script on the Edit screen from the Execution screen, it is possible to easily understand how commands are arranged. Furthermore, by setting the priority of conversion from a figure to a script in advance, it becomes possible to create a script of a plurality of forms. As a result, it is possible to check how the commands of multiple patterns are arranged, and it is effective in learning the concept of the script.

これらのことから、プログラミングの学習効果を高めることができる情報処理方法、情報処理装置、およびプログラムを提供することが可能となる。 For these reasons, it is possible to provide an information processing method, an information processing apparatus, and a program that can enhance the learning effect of programming.

本発明は、前記各実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。さらに、前記各実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組合せにより種々の発明が抽出され得る。例えば、各実施形態に示される全構成要件から幾つかの構成要件が削除されたり、幾つかの構成要件が異なる形態にして組み合わされても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果が得られる場合には、この構成要件が削除されたり組み合わされた構成が発明として抽出され得るものである。 The present invention is not limited to the above embodiments, and can be modified in various ways without departing from the scope of the present invention. Furthermore, each of the above-described embodiments includes inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent elements are deleted from all the constituent elements shown in each embodiment, or some constituent elements are combined in different forms, the problems described in the column of problems to be solved by the invention can be solved and the effect described in the column of the effects of the invention can be obtained, a configuration in which these constituent elements are deleted or combined can be extracted as an invention.

以下に、本願出願の当初の特許請求の範囲に記載された発明を付記する。 The invention described in the original claims of the present application is appended below.

[1]
情報処理装置の制御手段により実行される方法であって、
実行内容を編集する第1編集操作を受け付け、当該第1編集操作により編集された当該実行内容に対応する命令リストを生成し、表示部に表示する第1処理を実行する、
情報処理方法。
[1]
A method executed by control means of an information processing device, comprising:
receiving a first editing operation for editing execution content, generating a command list corresponding to the execution content edited by the first editing operation, and executing a first process for displaying on a display unit;
Information processing methods.

[2]
命令リストを編集する第2編集操作を受け付け、当該第2編集操作により編集された当該命令リストの実行内容を表示部に表示する第2処理を、さらに実行し、
前記第1処理で生成された前記命令リストを記憶部へ記憶し、
前記第2処理において、前記記憶部へ記憶された前記命令リストを読み出し、読み出した当該命令リストを編集する操作を前記第2編集操作として受け付ける、
請求項1に記載の情報処理方法。
[2]
receiving a second editing operation of editing the command list, and further executing a second process of displaying the execution content of the command list edited by the second editing operation on the display unit;
storing the instruction list generated in the first process in a storage unit;
In the second process, an operation of reading the command list stored in the storage unit and editing the read command list is accepted as the second editing operation;
The information processing method according to claim 1.

[3]
前記第1処理において、前記命令リストを生成する際の条件を設定し、設定された当該条件を満たす前記命令リストを1つ以上生成する、
請求項1または請求項2に記載の情報処理方法。
[3]
In the first process, setting a condition for generating the instruction list, and generating one or more instruction lists that satisfy the set condition;
The information processing method according to claim 1 or 2.

[4]
前記第1処理において、
前記1つ以上の命令リストを生成する際に、少なくとも1つの命令を含む命令の組を繰り返し実行することを指示する命令を使用するか否かと、
前記1つ以上の命令リストを生成する際に、前記実行内容として前記表示部に表示される表示体の向きを指定するために、当該表示体の回転を指示する命令と、当該表示体の角度値を指定する命令との、いずれの命令を使用するかと、
前記1つ以上の命令リストを生成する際に、前記実行内容として前記表示部に表示される前記表示体の位置を指定するために、当該表示体の表示位置を指定する命令と、表示体の移動を指示する命令との、いずれの命令を使用するかと、
のいずれか少なくとも1つを、前記条件として設定する、
請求項3に記載の情報処理方法。
[4]
In the first process,
whether to use instructions to repeatedly execute a set of instructions including at least one instruction in generating the one or more instruction lists;
A command for instructing rotation of the display body and an angle of the display body in order to specify the orientation of the display body displayed on the display unit as the execution content when generating the one or more command lists Using any instruction with the instruction that specifies the value,
In order to specify the position of the display body displayed on the display unit as the execution content when generating the one or more command lists, a command for designating the display position of the display body; using which commands to direct movement,
Set at least one of as the condition,
The information processing method according to claim 3.

[5]
実行内容を編集する第1編集操作を受け付け、当該第1編集操作により編集された当該実行内容に対応する命令リストを生成し、表示部に表示する第1処理を実行する、
制御手段を備える情報処理装置。
[5]
receiving a first editing operation for editing execution content, generating a command list corresponding to the execution content edited by the first editing operation, and executing a first process for displaying on a display unit;
An information processing device comprising control means.

[6]
情報処理装置のコンピュータによって、
実行内容を編集する第1編集操作を受け付けさせ、当該第1編集操作により編集された当該実行内容に対応する命令リストを生成させ、表示部に表示する第1処理を実行させる、
プログラム。
[6]
By the computer of the information processing device,
receiving a first editing operation for editing execution content, generating a command list corresponding to the execution content edited by the first editing operation, and executing a first process for displaying on a display unit;
program.

10…電子機器、11…キー入力部、12…ディスプレイ、21…CPU、22…メモリ、22a…スクリプト実行エンジン、22a1…オブジェクト編集受付ルーチン、22a2…スクリプト作成ルーチン、22a3…表示制御ルーチン、22a4…スクリプト編集受付ルーチン、22a5…作成条件設定ルーチン、22b…書込可能データエリア、23…外部記録媒体、24…記録媒体読取部、111…数値・演算記号キー群、112…関数機能キー群、113…設定キー群、114…ファンクションキー群、115…カーソルキー。 DESCRIPTION OF SYMBOLS 10... Electronic equipment 11... Key input part 12... Display 21... CPU 22... Memory 22a... Script execution engine 22a1... Object edit acceptance routine 22a2... Script creation routine 22a3... Display control routine 22a4... Script editing acceptance routine 22a5 Creation condition setting routine 22b Writable data area 23 External recording medium 24 Recording medium reading unit 111 Numeric value/operation symbol key group 112 Function function key group 113 A group of setting keys, 114 a group of function keys, and 115 a cursor key.

Claims (11)

表示部に表示する1つ又は複数の図形又は表示体を含む実行結果を編集する第1編集操作を受け付け、当該第1編集操作により編集された当該実行結果をもたらす、少なくとも文字により構成される命令リストを自動で生成し、前記表示部に表示する第1処理を実行する制御手段を備え
前記制御手段は、前記第1処理において、
前記実行結果をもたらす前記命令リストを、当該命令リストとは異なりかつ当該命令リストと同じ実行結果をもたらす別の命令リストへ書き換えられると判別した場合、前記命令リストを書き換えて前記別の命令リストを生成し、
前記命令リストと前記別の命令リストとの何れかの命令リストを生成するかに関わる条件を設定するユーザ操作を受け付け、設定された当該条件を満たす何れかの命令リストを生成する、情報処理装置。
A command composed of at least characters, which receives a first editing operation for editing an execution result including one or more graphics or display objects to be displayed on a display unit, and brings about the execution result edited by the first editing operation. A control means for automatically generating a list and executing a first process for displaying it on the display unit ,
The control means, in the first process,
When it is determined that the instruction list that brings about the execution result can be rewritten to another instruction list that is different from the instruction list and that brings the same execution result as the instruction list, the instruction list is rewritten to replace the other instruction list with the instruction list. generate and
An information processing apparatus that receives a user operation for setting a condition related to whether to generate one of the instruction list and the other instruction list, and generates any instruction list that satisfies the set condition. .
前記制御手段は、少なくとも文字により構成される命令リストを編集する第2編集操作を受け付け、当該第2編集操作により編集された当該命令リストに基づく実行結果である図形、又は表示体の軌跡を前記表示部に表示する第2処理を実行する、The control means accepts a second editing operation for editing a command list composed of at least characters, and changes the trajectory of a graphic or a display body as an execution result based on the command list edited by the second editing operation. perform a second process of displaying on the display unit;
請求項1に記載の情報処理装置。The information processing device according to claim 1 .
前記制御手段は、前記第1処理で生成された前記命令リストを記憶部へ記憶し、前記第2処理において、前記記憶部へ記憶した前記命令リストを読み出し、読み出した当該命令リストを編集する操作を前記第2編集操作として受け付ける、The control means stores the command list generated in the first process in a storage unit, reads the command list stored in the storage unit in the second process, and edits the read command list. as the second editing operation,
請求項2に記載の情報処理装置。The information processing apparatus according to claim 2.
前記第2処理で生成された前記命令リストを前記記憶部へ記憶し、
前記第1処理において、前記記憶部へ記憶された前記命令リストを読み出し、読み出した当該命令リストに基づく前記実行結果を編集する操作を前記第1編集操作として受け付ける、
請求項3に記載の情報処理装置。
storing the instruction list generated in the second process in the storage unit;
In the first process, an operation of reading the command list stored in the storage unit and editing the execution result based on the read command list is accepted as the first editing operation.
The information processing apparatus according to claim 3.
前記条件は、
前記何れかの命令リストを生成する際に、少なくとも1つの命令を含む命令の組を繰り返し実行することを指示する命令を使用するか否か、
前記何れかの命令リストを生成する際に、前記実行結果として前記表示部に表示される表示体の向きを指定するために、当該表示体の回転を指示する命令と、当該表示体の角度値を指定する命令との、いずれの命令を使用するか、又は、
前記何れかの命令リストを生成する際に、前記実行結果として前記表示部に表示される前記表示体の位置を指定するために、当該表示体の表示位置を指定する命令と、表示体の移動を指示する命令との、いずれの命令を使用するか、である、
請求項1乃至のいずれか一項に記載の情報処理装置。
Said conditions are:
whether to use an instruction to repeatedly execute a set of instructions including at least one instruction when generating any of the instruction lists;
A command for instructing rotation of the display body and an angle value of the display body in order to specify the orientation of the display body displayed on the display unit as the execution result when generating any of the command lists using any instruction with the instruction that specifies the
In order to specify the position of the display body displayed on the display unit as the execution result when generating any of the command lists, a command for designating the display position of the display body and movement of the display body Which instruction to use with the instruction that indicates
The information processing apparatus according to any one of claims 1 to 4.
情報処理装置の制御手段により実行される方法であって、
表示部に表示する1つ又は複数の図形又は表示体を含む実行結果を編集する第1編集操作を受け付け、当該第1編集操作により編集された当該実行結果に対応する、少なくとも文字により構成される命令リストを自動で生成し、前記表示部に表示する第1処理を実行する情報処理方法であって
前記情報処理装置の前記制御手段は、前記第1処理において、
前記実行結果をもたらす前記命令リストを、当該命令リストとは異なりかつ当該命令リストと同じ実行結果をもたらす別の命令リストへ書き換えられると判別した場合、前記命令リストを書き換えて前記別の命令リストを生成し、
前記命令リストと前記別の命令リストとの何れかの命令リストを生成するかに関わる条件を設定するユーザ操作を受け付け、設定された当該条件を満たす何れかの命令リストを生成する、
情報処理方法。
A method executed by control means of an information processing device, comprising:
Receiving a first editing operation for editing an execution result including one or more graphics or display objects to be displayed on the display unit, and consisting of at least characters corresponding to the execution result edited by the first editing operation An information processing method for executing a first process of automatically generating a command list and displaying it on the display unit,
The control means of the information processing device, in the first process,
When it is determined that the instruction list that brings about the execution result can be rewritten to another instruction list that is different from the instruction list and that brings the same execution result as the instruction list, the instruction list is rewritten to replace the other instruction list with the instruction list. generate and
Receiving a user operation for setting conditions related to whether to generate one of the instruction list and the other instruction list, and generating any instruction list that satisfies the set condition;
Information processing methods.
前記情報処理装置の前記制御手段は、少なくとも文字により構成される命令リストを編集する第2編集操作を受け付け、当該第2編集操作により編集された当該命令リストに基づく実行結果である図形、又は表示体の軌跡を前記表示部に表示する第2処理を実行する、The control means of the information processing apparatus accepts a second editing operation for editing a command list composed of at least characters, and executes a figure or display based on the command list edited by the second editing operation. performing a second process of displaying the trajectory of the body on the display unit;
請求項6記載の情報処理方法。The information processing method according to claim 6.
前記情報処理装置の前記制御手段は、前記第1処理で生成された前記命令リストを記憶部へ記憶し、前記第2処理において、前記記憶部へ記憶した前記命令リストを読み出し、読み出した当該命令リストを編集する操作を前記第2編集操作として受け付ける、The control means of the information processing apparatus stores the command list generated in the first process in a storage unit, reads the command list stored in the storage unit in the second process, and receiving an operation to edit the list as the second editing operation;
請求項7記載の情報処理方法。The information processing method according to claim 7.
情報処理装置のコンピュータによって、By the computer of the information processing device,
表示部に表示する1つ又は複数の図形又は表示体を含む実行結果を編集する第1編集操作を受け付けさせ、当該第1編集操作により編集された当該実行結果に対応する、少なくとも文字により構成される命令リストを自動で生成させ、前記表示部に表示する第1処理を実行させるプログラムであって、Receives a first editing operation for editing an execution result including one or more graphics or display objects to be displayed on a display unit, and comprises at least characters corresponding to the execution result edited by the first editing operation. A program for executing a first process for automatically generating an instruction list to be displayed on the display unit,
前記第1処理において、In the first process,
前記実行結果をもたらす前記命令リストを、当該命令リストとは異なりかつ当該命令リストと同じ実行結果をもたらす別の命令リストへ書き換えられると判別した場合、前記命令リストを書き換えて前記別の命令リストを生成し、When it is determined that the instruction list that brings about the execution result can be rewritten to another instruction list that is different from the instruction list and that brings the same execution result as the instruction list, the instruction list is rewritten to replace the other instruction list with the instruction list. generate and
前記命令リストと前記別の命令リストとの何れかの命令リストを生成するかに関わる条件を設定するユーザ操作を受け付け、設定された当該条件を満たす何れかの命令リストを生成する、Receiving a user operation for setting conditions related to whether to generate one of the instruction list and the other instruction list, and generating any instruction list that satisfies the set condition;
プログラム。program.
前記情報処理装置の前記コンピュータによって、By the computer of the information processing device,
少なくとも文字により構成される命令リストを編集する第2編集操作を受け付け、当該第2編集操作により編集された当該命令リストに基づく実行結果である図形、又は表示体の軌跡を前記表示部に表示する第2処理を実行させる、 Receiving a second editing operation for editing a command list composed of at least characters, and displaying on the display unit a figure or a trajectory of a display object, which is an execution result based on the command list edited by the second editing operation. causing a second process to be performed;
請求項9記載のプログラム。10. A program according to claim 9.
前記情報処理装置の前記コンピュータによって、By the computer of the information processing device,
前記第1処理で生成された前記命令リストを記憶部へ記憶し、前記第2処理において、前記記憶部へ記憶した前記命令リストを読み出し、読み出した当該命令リストを編集する操作を前記第2編集操作として受け付けさせる、The operation of storing the command list generated in the first process in a storage unit, reading the command list stored in the storage unit in the second process, and editing the read command list is the second editing operation. be accepted as an operation,
請求項10記載のプログラム。11. A program according to claim 10.
JP2018160574A 2018-08-29 2018-08-29 Information processing method, information processing device, and program Active JP7206704B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018160574A JP7206704B2 (en) 2018-08-29 2018-08-29 Information processing method, information processing device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018160574A JP7206704B2 (en) 2018-08-29 2018-08-29 Information processing method, information processing device, and program

Publications (3)

Publication Number Publication Date
JP2020035147A JP2020035147A (en) 2020-03-05
JP2020035147A5 JP2020035147A5 (en) 2021-09-24
JP7206704B2 true JP7206704B2 (en) 2023-01-18

Family

ID=69668155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018160574A Active JP7206704B2 (en) 2018-08-29 2018-08-29 Information processing method, information processing device, and program

Country Status (1)

Country Link
JP (1) JP7206704B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02216588A (en) * 1989-02-17 1990-08-29 Hitachi Ltd Interactive script animation generating method

Also Published As

Publication number Publication date
JP2020035147A (en) 2020-03-05

Similar Documents

Publication Publication Date Title
JP4798268B2 (en) Electronic equipment and programs
US10061498B2 (en) Graph display device, graph display method and computer-readable medium recording control program
JPH02123468A (en) Plotting of computer-aided plotting system
JP4743602B2 (en) Image processing apparatus, image processing program, game apparatus, and game program
JP4922797B2 (en) Information processing apparatus and program thereof
JP7020127B2 (en) Programming support equipment, programming support methods, and programs
JP7206704B2 (en) Information processing method, information processing device, and program
JP5747688B2 (en) Computer apparatus and program
WO2013073023A1 (en) Sequence program creation device
JP5304849B2 (en) Electronic equipment and programs
JP2021135936A (en) Information processing apparatus, information processing method, server device, and program
JP5786542B2 (en) Formula input device and program
JP7331901B2 (en) Electronics, Display Methods, and Programs
JP7388483B2 (en) Display control device, display control method, and program
JP7226486B2 (en) ELECTRONIC DEVICE, MOVEMENT PATH COMPARING METHOD, AND PROGRAM
JP7215054B2 (en) PROGRAMMING DISPLAY, PROGRAMMING DISPLAY METHOD, AND PROGRAM
JP5742870B2 (en) Electronic equipment and programs
Kin Investigating the design and development of multitouch applications
JP2000132697A (en) Graph display device and storage medium
RU2519286C2 (en) Contactless computer control method (versions)
JP7024421B2 (en) Electronic devices, display control methods, and programs
CN112396874A (en) Program design teaching device
JP2020071601A (en) Display processing device, display processing method, and program
JP5510253B2 (en) Graphic display device and program
JP5962696B2 (en) Graphic display device and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210806

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210806

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220610

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220621

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220808

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20221206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221219

R150 Certificate of patent or registration of utility model

Ref document number: 7206704

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150