JP2020170221A - Program for converting program, information processing apparatus and information processing method - Google Patents

Program for converting program, information processing apparatus and information processing method Download PDF

Info

Publication number
JP2020170221A
JP2020170221A JP2019069742A JP2019069742A JP2020170221A JP 2020170221 A JP2020170221 A JP 2020170221A JP 2019069742 A JP2019069742 A JP 2019069742A JP 2019069742 A JP2019069742 A JP 2019069742A JP 2020170221 A JP2020170221 A JP 2020170221A
Authority
JP
Japan
Prior art keywords
program
list
cpu
line
lines
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.)
Granted
Application number
JP2019069742A
Other languages
Japanese (ja)
Other versions
JP7306026B2 (en
Inventor
田中 利明
Toshiaki Tanaka
利明 田中
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 JP2019069742A priority Critical patent/JP7306026B2/en
Publication of JP2020170221A publication Critical patent/JP2020170221A/en
Application granted granted Critical
Publication of JP7306026B2 publication Critical patent/JP7306026B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

To make it possible to understand a correspondence before and after conversion of a program.SOLUTION: A program causes a computer to acquire a first program, convert the first program into a second program that is described in a program language different from a program language used in the first program and achieves the same function as the function of the first program, add corresponding reference numerals in lines that functionally corresponding to each other in the first program and the second program, and create data for causing a display apparatus to display a first program list of the first program and a second list of the second program with the reference numerals.SELECTED DRAWING: Figure 6

Description

本発明は、プログラムを変換するためのプログラム、情報処理装置、及び、情報処理方法に関する。 The present invention relates to a program for converting a program, an information processing device, and an information processing method.

コンピュータプログラムの内容を他の形式に書き換えるシステムが知られている。例えば特許文献1には、あるプログラミング言語で作成されたプログラムの内容を、視覚的に理解しやすいブロックで表現された形式に変換するシステムが開示されている。 Systems are known that rewrite the contents of computer programs into other formats. For example, Patent Document 1 discloses a system that converts the contents of a program created in a certain programming language into a format expressed by blocks that are visually easy to understand.

特開2018−190400号公報JP-A-2018-190400

プログラムの形式などを変換するときに、変換前後の対応関係が分かると便利である。 When converting the program format, it is convenient to know the correspondence before and after the conversion.

本発明は、プログラムの変換において、変換前後の対応関係が分かるようにすることを目的とする。 An object of the present invention is to make it possible to understand the correspondence before and after conversion in program conversion.

本発明の一態様によれば、プログラムは、第1プログラムを取得することと、前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することとをコンピュータに実行させる。 According to one aspect of the present invention, the program acquires the first program and describes the first program in a programming language different from the programming language used in the first program, and the first program. Converting to a second program having the same function as the above, and adding a corresponding code to a line functionally corresponding to each other of the first program and the second program, and adding the code. The computer is made to create data for displaying the first program list of the first program and the second program list of the second program with the reference numerals on the display device.

本発明によれば、プログラムの変換において、変換前後の対応関係が分かるようになる。 According to the present invention, in the conversion of a program, the correspondence before and after the conversion can be understood.

図1は、一実施形態に係るシステムの構成例の概略を示すブロック図である。FIG. 1 is a block diagram showing an outline of a configuration example of a system according to an embodiment. 図2Aは、一実施形態に係る電卓の構成例の概略を示すブロック図である。FIG. 2A is a block diagram showing an outline of a configuration example of a calculator according to an embodiment. 図2Bは、一実施形態に係るスマートフォンの構成例の概略を示すブロック図である。FIG. 2B is a block diagram showing an outline of a configuration example of a smartphone according to an embodiment. 図2Cは、一実施形態に係るサーバの構成例の概略を示すブロック図である。FIG. 2C is a block diagram showing an outline of a configuration example of a server according to an embodiment. 図3は、電卓の動作の一例の概略を示すフローチャートである。FIG. 3 is a flowchart showing an outline of an example of the operation of the calculator. 図4は、スマートフォンの動作の一例の概略を示すフローチャートである。FIG. 4 is a flowchart showing an outline of an example of the operation of the smartphone. 図5は、サーバの動作の一例の概略を示すフローチャートである。FIG. 5 is a flowchart showing an outline of an example of server operation. 図6は、サーバで行われる変換処理の一例の概略を示すフローチャートである。FIG. 6 is a flowchart showing an outline of an example of conversion processing performed on the server. 図7Aは、説明のための第1プログラムの一例を示す図である。FIG. 7A is a diagram showing an example of a first program for explanation. 図7Bは、説明のための第2プログラムの一例を示す図である。FIG. 7B is a diagram showing an example of a second program for explanation. 図8Aは、第1プログラムを実行した際の電卓による表示の一例を示す図である。FIG. 8A is a diagram showing an example of display by a calculator when the first program is executed. 図8Bは、第1プログラムを実行した際の電卓による表示の一例を示す図である。FIG. 8B is a diagram showing an example of display by a calculator when the first program is executed. 図9は、第1プログラムリストと第2プログラムリストとのスマートフォンによる表示の一例を示す図である。FIG. 9 is a diagram showing an example of display of the first program list and the second program list by a smartphone. 図10は、サーバで行われる選択処理の一例の概略を示すフローチャートである。FIG. 10 is a flowchart showing an outline of an example of selection processing performed on the server. 図11は、スマートフォンによる表示の一例を示す図であり、選択処理の結果を示す図である。FIG. 11 is a diagram showing an example of display by a smartphone, and is a diagram showing the result of selection processing. 図12は、サーバで行われる配置変更処理の一例の概略を示すフローチャートである。FIG. 12 is a flowchart showing an outline of an example of the arrangement change process performed on the server. 図13は、スマートフォンによる表示の一例を示す図であり、配置変更処理の結果を示す図である。FIG. 13 is a diagram showing an example of display by a smartphone, and is a diagram showing the result of the arrangement change processing. 図14Aは、第2の実施形態に係るサーバで行われる変換処理の一例の概略を示すフローチャートである。FIG. 14A is a flowchart showing an outline of an example of conversion processing performed by the server according to the second embodiment. 図14Bは、第2の実施形態に係るサーバで行われる変換処理の一例の概略を示すフローチャートである。FIG. 14B is a flowchart showing an outline of an example of conversion processing performed by the server according to the second embodiment.

[第1の実施形態]
第1の実施形態について図面を参照して説明する。
[First Embodiment]
The first embodiment will be described with reference to the drawings.

〈システム構成〉
本実施形態に係るシステム10の構成例の概略を図1に示す。システム10は、電卓(プログラム入力機器)100と、スマートフォン(通信機器)200と、サーバ(情報処理装置)300とを含む。スマートフォン200とサーバ300とは、例えばインターネットなどといったネットワーク400を介して接続されている。
<System configuration>
FIG. 1 shows an outline of a configuration example of the system 10 according to the present embodiment. The system 10 includes a calculator (program input device) 100, a smartphone (communication device) 200, and a server (information processing device) 300. The smartphone 200 and the server 300 are connected to each other via a network 400 such as the Internet.

本実施形態に係る電卓100は、四則演算、各種関数演算などを行うことができる関数電卓である。さらに、電卓100は、プログラムを作成し、実行する機能を有する。 The calculator 100 according to the present embodiment is a scientific calculator capable of performing four arithmetic operations, various function operations, and the like. Further, the calculator 100 has a function of creating and executing a program.

スマートフォン200は、電卓100と連携して各種機能を発揮する。スマートフォン200は、電卓に入力された演算式、プログラム等に基づいて、様々な表示や演算を行う。電卓100で作成したプログラムは、スマートフォン200に送信され得る。スマートフォン200は、取得したプログラムをサーバ300に送信できる。 The smartphone 200 exerts various functions in cooperation with the calculator 100. The smartphone 200 performs various displays and calculations based on the calculation formulas, programs, and the like input to the calculator. The program created by the calculator 100 can be transmitted to the smartphone 200. The smartphone 200 can transmit the acquired program to the server 300.

サーバ300は、電卓100と関連するスマートフォン200の動作に関する各種演算を行う。例えば、本実施形態では、サーバ300は、スマートフォン200から取得した電卓100で作成されたプログラムを、他のプログラミング言語で作成されたプログラムに変換することができる。これに限らないが、サーバ300は、例えば関数電卓用のプログラムから例えばScratchといった教育現場で用いられているプログラムへとプログラムの変換を行う。サーバ300は、変換したプログラムをスマートフォン200に返信する。スマートフォン200は、サーバから取得した変換後のプログラムと、電卓100から取得した変換前のプログラムとを並べて表示することができる。本実施形態では、サーバ300は、変換前後のプログラムの対応関係を明確にするために、各々のプログラムに、互いに対応する行を示す符号を付す。 The server 300 performs various calculations related to the operation of the smartphone 200 related to the calculator 100. For example, in the present embodiment, the server 300 can convert the program created by the calculator 100 acquired from the smartphone 200 into a program created in another programming language. Although not limited to this, the server 300 converts the program from, for example, a program for a scientific calculator to a program used in an educational field such as Scratch. The server 300 returns the converted program to the smartphone 200. The smartphone 200 can display the converted program acquired from the server and the converted program acquired from the calculator 100 side by side. In the present embodiment, the server 300 assigns each program a code indicating a line corresponding to each other in order to clarify the correspondence between the programs before and after the conversion.

(電卓の構成)
電卓100は、図2Aに示すように、バスライン190を介して互いに接続されたCentral Processing Unit(CPU、プロセッサ)112と、Read Only Memory(ROM)114と、Random Access Memory(RAM)116と、フラッシュメモリ118と、2次元コードエンコーダ122と、入力キー132と、液晶ディスプレイ134とを備える。CPU112は、各種信号処理等を行う。ROM114は、各種プログラム等を記録している。RAM116は、CPU112の主記憶装置として機能する。フラッシュメモリ118は、ユーザが作成したプログラムなどを記憶することができる。2次元コードエンコーダ122は、例えばユーザが作成したプログラムの情報を表す2次元コードを作成する。作成された2次元コードは、液晶ディスプレイ134に表示される。入力キー132は、数字キー、演算キー、機能キーなど、複数のキーを含む。液晶ディスプレイ134は、ユーザによる入力結果や、演算結果を表示する。
(Calculator configuration)
As shown in FIG. 2A, the calculator 100 includes a Central Processing Unit (CPU, processor) 112, a Read Only Memory (ROM) 114, a Random Access Memory (RAM) 116, which are connected to each other via a bus line 190. It includes a flash memory 118, a two-dimensional code encoder 122, an input key 132, and a liquid crystal display 134. The CPU 112 performs various signal processing and the like. The ROM 114 records various programs and the like. The RAM 116 functions as the main storage device of the CPU 112. The flash memory 118 can store a program created by the user and the like. The two-dimensional code encoder 122 creates, for example, a two-dimensional code representing information of a program created by a user. The created two-dimensional code is displayed on the liquid crystal display 134. The input key 132 includes a plurality of keys such as a number key, an arithmetic key, and a function key. The liquid crystal display 134 displays an input result by the user and a calculation result.

(スマートフォンの構成)
スマートフォン200は、図2Bに示すように、バスライン290を介して互いに接続されたCPU(プロセッサ)212と、ROM214と、RAM216と、フラッシュメモリ218と、タッチパネル222と、液晶ディスプレイ224と、カメラ232と、通信装置234とを備える。CPU212は、各種信号処理等を行う。CPUと共に、Application Specific Integrated Circuit(ASIC)、Field Programmable Gate Array(FPGA)、又はGraphics Processing Unit(GPU)等の各種集積回路が用いられてもよい。ROM214は、起動プログラム等を記録している。RAM216は、CPU212の主記憶装置として機能する。フラッシュメモリ218には、CPU212で用いられるプログラム、パラメータ等各種情報が記録されている。また、フラッシュメモリ218には、取得したデータや作成したデータなど、各種のデータも記録される。タッチパネル222は、スマートフォンへの入力を受け付ける入力装置として機能する。表示装置である液晶ディスプレイ224は、各種情報を表示する。カメラ232は、各種画像を撮像する。スマートフォン200は、例えば電卓100の液晶ディスプレイ134に表示された2次元コードの画像を取得することで、電卓100で作成されたプログラムの情報を取得することができる。通信装置234は、スマートフォン200の外部の機器と通信を行う際に用いられる。通信装置234は、例えばインターネットといったネットワーク400に接続する。
(Smartphone configuration)
As shown in FIG. 2B, the smartphone 200 includes a CPU (processor) 212, a ROM 214, a RAM 216, a flash memory 218, a touch panel 222, a liquid crystal display 224, and a camera 232 connected to each other via a bus line 290. And a communication device 234. The CPU 212 performs various signal processing and the like. Various integrated circuits such as Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA), or Graphics Processing Unit (GPU) may be used together with the CPU. ROM 214 records a boot program and the like. The RAM 216 functions as the main storage device of the CPU 212. Various information such as programs and parameters used by the CPU 212 are recorded in the flash memory 218. In addition, various data such as acquired data and created data are also recorded in the flash memory 218. The touch panel 222 functions as an input device that receives input to the smartphone. The liquid crystal display 224, which is a display device, displays various information. The camera 232 captures various images. The smartphone 200 can acquire the information of the program created by the calculator 100, for example, by acquiring the image of the two-dimensional code displayed on the liquid crystal display 134 of the calculator 100. The communication device 234 is used when communicating with an external device of the smartphone 200. The communication device 234 connects to a network 400 such as the Internet.

(サーバの構成)
サーバ300は、図2Cに示すように、バスライン390を介して互いに接続された、CPU(プロセッサ)312と、ROM314と、RAM316と、ハードディスク(記憶装置)318と、通信装置334とを備える情報処理装置である。CPU312は、各種信号処理等を行う。ROM314は、CPU312の動作に用いられる情報を記録している。RAM316は、CPU312の主記憶装置として機能する。ハードディスク318には、CPU312で用いられるプログラム、パラメータ、及びCPU312の演算結果など、各種情報が記録される。
(Server configuration)
As shown in FIG. 2C, the server 300 includes information including a CPU (processor) 312, a ROM 314, a RAM 316, a hard disk (storage device) 318, and a communication device 334 connected to each other via a bus line 390. It is a processing device. The CPU 312 performs various signal processing and the like. The ROM 314 records information used for the operation of the CPU 312. The RAM 316 functions as the main storage device of the CPU 312. Various information such as programs and parameters used by the CPU 312 and calculation results of the CPU 312 are recorded on the hard disk 318.

〈システムの動作〉
(電卓の動作)
電卓100の動作の一例の概要について、図3を参照して説明する。
<System operation>
(Calculator operation)
An outline of an example of the operation of the calculator 100 will be described with reference to FIG.

ステップS101において、電卓100のCPU112は、現在設定されている動作モードがアルゴリズムモードであるか否かを判定する。アルゴリズムモードでないとき、処理はステップS102に進む。 In step S101, the CPU 112 of the calculator 100 determines whether or not the currently set operation mode is the algorithm mode. When not in the algorithm mode, the process proceeds to step S102.

ステップS102において、CPU112は、アルゴリズムモード以外の選択されているモードに関する処理を行う。例えば、一般的な電卓として、数字キー及び演算キーを用いた入力に応じて、演算を行い、その結果を液晶ディスプレイ134に表示する処理を行う。その後、処理はステップS101に戻る。 In step S102, the CPU 112 performs a process relating to the selected mode other than the algorithm mode. For example, as a general calculator, a process of performing an operation in response to an input using a number key and an operation key and displaying the result on a liquid crystal display 134 is performed. After that, the process returns to step S101.

ステップS101において、アルゴリズムモードが選択されていると判定されたとき、処理はステップS103に進む。ステップS103において、CPU112は、実行キー以外の入力キー132への入力があったか否かを判定する。入力キー132への入力がなかったとき、処理はステップS105に進む。一方、入力キー132への入力があったとき、処理はステップS104に進む。ステップS104において、CPU112は、入力キー132への入力に応じた処理を行う。この処理によって、ユーザは、プログラムを作成することができる。その後、処理はステップS105に進む。 When it is determined in step S101 that the algorithm mode is selected, the process proceeds to step S103. In step S103, the CPU 112 determines whether or not there has been an input to an input key 132 other than the execution key. When there is no input to the input key 132, the process proceeds to step S105. On the other hand, when there is an input to the input key 132, the process proceeds to step S104. In step S104, the CPU 112 performs processing according to the input to the input key 132. By this process, the user can create a program. After that, the process proceeds to step S105.

ステップS105において、CPU112は、実行キーが押されたか否かを判定する。実行キーが押されていないとき、処理はステップS107に進む。一方、実行キーが押されたとき、処理はステップS106に進む。ステップS106において、CPU112は、実行処理を行う。実行処理では、ユーザによって入力されたプログラムが実行される。電卓100は、プログラムに従って動作し、入力を要求したり、結果を表示したりする。その後、処理はステップS107に進む。 In step S105, the CPU 112 determines whether or not the execution key has been pressed. When the execute key is not pressed, the process proceeds to step S107. On the other hand, when the execute key is pressed, the process proceeds to step S106. In step S106, the CPU 112 performs an execution process. In the execution process, the program input by the user is executed. The calculator 100 operates according to a program, requests input, and displays a result. After that, the process proceeds to step S107.

ステップS107において、CPU112は、プログラムを送信することが要求されたか否かを判定する。プログラムの送信が要求されていないとき、処理はステップS109に進む。一方、プログラムの送信が要求されたとき、処理はステップS108に進む。ステップS108において、CPU112は、プログラム送信処理を行う。プログラム送信処理では、CPU112は、2次元コードエンコーダ122に、作成されたプログラムに関する情報を含む2次元コードを作成させる。CPU112は、作成された2次元コードを液晶ディスプレイ134に表示させる。この2次元コードは、プログラムの内容に加えて、電卓100の機種に関する情報など、他の情報も含み得る。その後、処理はステップS109に進む。 In step S107, the CPU 112 determines whether or not the program is requested to be transmitted. When the transmission of the program is not requested, the process proceeds to step S109. On the other hand, when the transmission of the program is requested, the process proceeds to step S108. In step S108, the CPU 112 performs a program transmission process. In the program transmission process, the CPU 112 causes the two-dimensional code encoder 122 to create a two-dimensional code including information about the created program. The CPU 112 displays the created two-dimensional code on the liquid crystal display 134. This two-dimensional code may include other information such as information about the model of the calculator 100 in addition to the contents of the program. After that, the process proceeds to step S109.

ステップS109において、CPU112は、動作モードがアルゴリズムモードから他のモードに変更されたか否かを判定する。変更されていないとき、処理はステップS103に戻る。すなわち、上述の処理が繰り返し行われ、ユーザの指示に応じてプログラムの入力、実行、2次元コード表示などが行われる。ステップS109において、モードが変更されたと判定されたとき、処理はステップS101に戻る。 In step S109, the CPU 112 determines whether or not the operation mode has been changed from the algorithm mode to another mode. If not changed, the process returns to step S103. That is, the above-mentioned processing is repeated, and the program is input, executed, and the two-dimensional code is displayed according to the user's instruction. When it is determined in step S109 that the mode has been changed, the process returns to step S101.

(スマートフォンの動作)
スマートフォン200の動作の一例の概要について、図4を参照して説明する。ここでは、スマートフォン200における、電卓100に関するアプリケーションソフトウェア(アプリ)の動作について説明する。
(Smartphone operation)
An outline of an example of the operation of the smartphone 200 will be described with reference to FIG. Here, the operation of the application software (application) related to the calculator 100 on the smartphone 200 will be described.

ステップS201において、スマートフォンのCPU212は、現在選択されている動作モードがプログラム変換モードであるか否かを判定する。プログラム変換モードは、本実施形態に関する、電卓100で作成されたプログラムを他のプログラミング言語によるプログラムに変換し、変換前後のプログラムを提示したり実行したりするモードである。プログラム変換モードでないと判定されたとき、処理はステップS202に進む。 In step S201, the CPU 212 of the smartphone determines whether or not the currently selected operation mode is the program conversion mode. The program conversion mode is a mode for converting a program created by the calculator 100 into a program in another programming language according to the present embodiment, and presenting and executing the program before and after the conversion. When it is determined that the mode is not the program conversion mode, the process proceeds to step S202.

ステップS202において、CPU212は、プログラム変換モード以外の処理を行う。例えば、高精度な計算、グラフ描画、グループメンバー間でのデータの共有などが行われ得る。その後、処理はステップS201に戻る。 In step S202, the CPU 212 performs a process other than the program conversion mode. For example, high-precision calculation, graph drawing, data sharing among group members, and the like can be performed. After that, the process returns to step S201.

ステップS201において、プログラム変換モードであると判定されたとき、処理はステップS203に進む。ステップS203において、CPU212は、プログラム変換の指示が入力されたか否かを判定する。プログラム変換の指示が入力されていないとき、処理はステップS206に進む。一方、プログラム変換の指示が入力されたとき、処理はステップS204に進む。 When it is determined in step S201 that the program conversion mode is set, the process proceeds to step S203. In step S203, the CPU 212 determines whether or not the program conversion instruction has been input. When the program conversion instruction is not input, the process proceeds to step S206. On the other hand, when the program conversion instruction is input, the process proceeds to step S204.

ステップS204において、CPU212は、電卓100で作成されたプログラムを取得する。例えば、CPU212は、カメラ232を用いて、電卓100の液晶ディスプレイ134に表示された2次元コードを撮影させる。CPU212は、取得した2次元コードを解析し、2次元コードで表された情報を取得する。この情報には、電卓100で作成されたプログラムが含まれる。また、この情報には、電卓100の機種に関する情報など、他の情報が含まれていてもよい。CPU212は、取得した情報をサーバ300に送信する。この情報を受けたサーバ300は、電卓100で作成されたプログラムを他のプログラムに変換し、変換後のプログラムをスマートフォン200に送信する。 In step S204, the CPU 212 acquires the program created by the calculator 100. For example, the CPU 212 uses the camera 232 to take a picture of the two-dimensional code displayed on the liquid crystal display 134 of the calculator 100. The CPU 212 analyzes the acquired two-dimensional code and acquires the information represented by the two-dimensional code. This information includes a program created by the calculator 100. Further, this information may include other information such as information about the model of the calculator 100. The CPU 212 transmits the acquired information to the server 300. Upon receiving this information, the server 300 converts the program created by the calculator 100 into another program, and transmits the converted program to the smartphone 200.

ステップS205において、CPU212は、サーバ300からプログラムの変換結果に関する情報を取得する。この情報には、プログラミング言語の種類、変換後のプログラム、プログラムの行番号などの情報が含まれる。CPU212は、取得した情報を液晶ディスプレイ224に表示させる。その後、処理はステップS206に進む。 In step S205, the CPU 212 acquires information regarding the conversion result of the program from the server 300. This information includes information such as the type of programming language, the converted program, and the line number of the program. The CPU 212 displays the acquired information on the liquid crystal display 224. After that, the process proceeds to step S206.

ステップS206において、CPU212は、2種類のプログラムが表示されている状態において、表示されているプログラムリストの任意の行が選択されたか否かを判定する。行の選択は、例えば液晶ディスプレイ224に表示されている行の何れかがユーザによってタッチされることで行われる。タッチされたことは、タッチパネル222を用いて検出される。選択されていないと判定されたとき、処理はステップS209に進む。選択されたと判定されたとき、処理はステップS207に進む。 In step S206, the CPU 212 determines whether or not an arbitrary line in the displayed program list is selected while the two types of programs are displayed. The row selection is performed by, for example, touching any of the rows displayed on the liquid crystal display 224 by the user. The touch is detected using the touch panel 222. When it is determined that it is not selected, the process proceeds to step S209. When it is determined that the selection has been made, the process proceeds to step S207.

ステップS207において、CPU212は、タッチパネル222による検出結果に基づいて、ユーザによって選択された行の情報を取得する。CPU212は、取得した行の情報を、サーバ300に送信する。選択された行の情報を取得したサーバ300は、もう一方のプログラムにおいて当該選択された行に対応する行を特定する。サーバ300は、ユーザによって選択された行と、特定された対応する行とに関する情報をスマートフォン200に送信する。送信される情報には、選択された行及び特定された対応行を強調表示する画像に関する情報が含まれてもよい。 In step S207, the CPU 212 acquires information on a row selected by the user based on the detection result of the touch panel 222. The CPU 212 transmits the acquired row information to the server 300. The server 300 that has acquired the information on the selected row identifies the row corresponding to the selected row in the other program. The server 300 transmits information about the row selected by the user and the corresponding row identified to the smartphone 200. The information transmitted may include information about the image highlighting the selected line and the identified corresponding line.

ステップS208において、CPU212は、サーバ300から選択された行に対応するもう一方の行に関する特定結果を取得する。CPU212は、取得した情報に基づいて、選択された行と、特定された対応行とが強調された画像を、液晶ディスプレイ224に表示させる。その後、処理はステップS209に進む。 In step S208, the CPU 212 acquires a specific result for the other row corresponding to the row selected from the server 300. Based on the acquired information, the CPU 212 causes the liquid crystal display 224 to display an image in which the selected line and the specified corresponding line are emphasized. After that, the process proceeds to step S209.

ステップS209において、CPU212は、表示画面において、2種類のプログラムの配置を変更するか否かを判定する。例えば、スマートフォン200が、画面が縦長となる向きに固定されているとき、2種類のプログラムが縦に2つ並べて配置される。スマートフォン200が、画面が横長となる向きに固定されているとき、2種類のプログラムが横に2つ並べて配置される。このような場合、スマートフォンの向きが変更されたことが例えば重力センサの出力などを用いて検出されたとき、配置を変更すると判定される。配置を変更しないと判定されたとき、処理はステップS212に進む。配置を変更すると判定されたとき、処理はステップS210に進む。 In step S209, the CPU 212 determines whether or not to change the arrangement of the two types of programs on the display screen. For example, when the smartphone 200 is fixed so that the screen is vertically long, two types of programs are arranged vertically. When the smartphone 200 is fixed so that the screen is horizontally long, two types of programs are arranged side by side. In such a case, when it is detected that the orientation of the smartphone is changed by using, for example, the output of the gravity sensor, it is determined that the arrangement is changed. When it is determined that the arrangement is not changed, the process proceeds to step S212. When it is determined that the arrangement is changed, the process proceeds to step S210.

ステップS210において、CPU212は、例えばスマートフォン200の向きといった配置に関する情報を取得する。CPU212は、取得した配置に関する情報をサーバ300に送信する。この情報を取得したサーバ300は、配置の変更に関する情報を作成する。サーバ300は、作成した情報をスマートフォン200に送信する。この情報には、表示画面に関するデータが含まれていてもよい。 In step S210, the CPU 212 acquires information regarding the arrangement such as the orientation of the smartphone 200. The CPU 212 transmits the acquired information regarding the arrangement to the server 300. The server 300 that has acquired this information creates information regarding the change in arrangement. The server 300 transmits the created information to the smartphone 200. This information may include data about the display screen.

ステップS211において、CPU212は、サーバ300から作成結果である配置が変更された画面に関する情報を取得する。CPU212は、取得した情報に基づいて、配置が変更された2種類のプログラムを示す画面を液晶ディスプレイ224に表示させる。その後、処理はステップS212に進む。 In step S211 the CPU 212 acquires information about the screen whose arrangement has been changed, which is the creation result, from the server 300. Based on the acquired information, the CPU 212 causes the liquid crystal display 224 to display a screen showing two types of programs whose arrangement has been changed. After that, the process proceeds to step S212.

ステップS212において、CPU212は、動作モードがプログラム変換モードから変更されたか否かを判定する。モードが変更されていないとき、処理はステップS203に戻る。その結果、プログラム変換、行選択、配置変更の何れかが選択されたとき、選択された処理が実行され、選択されていないとき、何れの処理も行われずに待機する。モード変更がされたと判定されたとき、処理はステップS201に戻る。選択されたモードに応じた処理が行われる。 In step S212, the CPU 212 determines whether or not the operation mode has been changed from the program conversion mode. When the mode has not been changed, the process returns to step S203. As a result, when any of program conversion, line selection, and rearrangement change is selected, the selected process is executed, and when it is not selected, any process is not performed and the process waits. When it is determined that the mode has been changed, the process returns to step S201. Processing is performed according to the selected mode.

(サーバの動作)
サーバ300の動作の一例の概要について、図5を参照して説明する。サーバ300は各種の処理を行うが、ここでは、図4を参照して説明した動作に対応する動作について説明する。
(Server operation)
An outline of an example of the operation of the server 300 will be described with reference to FIG. The server 300 performs various processes, and here, the operations corresponding to the operations described with reference to FIG. 4 will be described.

ステップS301において、サーバ300のCPU312は、スマートフォン200からプログラム変換に関する情報を受信したか否かを判定する。プログラム変換に関する情報を受信していないとき、処理はステップS303に進む。プログラム変換に関する情報を受信したとき、処理はステップS302に進む。ステップS302において、CPU312は、受信した電卓100で作成されたプログラムを他のプログラミング言語を用いたプログラムに変換する変換処理を実行する。変換処理については後に詳述する。その後、処理はステップS303に進む。 In step S301, the CPU 312 of the server 300 determines whether or not the information regarding the program conversion has been received from the smartphone 200. When the information regarding the program conversion has not been received, the process proceeds to step S303. When the information regarding the program conversion is received, the process proceeds to step S302. In step S302, the CPU 312 executes a conversion process of converting the received program created by the calculator 100 into a program using another programming language. The conversion process will be described in detail later. After that, the process proceeds to step S303.

ステップS303において、CPU312は、スマートフォン200から行選択に関する情報を受信したか否かを判定する。行選択に関する情報を受信していないとき、処理はステップS305に進む。行選択に関する情報を受信したとき、処理はステップS304に進む。ステップS304において、CPU312は、選択された行に対応するもう一方のプログラムの行を特定し、それらの行を強調表示するための情報を作成する選択処理を実行する。選択処理については後に詳述する。その後、処理はステップS305に進む。 In step S303, the CPU 312 determines whether or not information regarding row selection has been received from the smartphone 200. If no information regarding row selection has been received, the process proceeds to step S305. When the information regarding the row selection is received, the process proceeds to step S304. In step S304, the CPU 312 executes a selection process that identifies the lines of the other program corresponding to the selected lines and creates information for highlighting those lines. The selection process will be described in detail later. After that, the process proceeds to step S305.

ステップS305において、CPU312は、スマートフォン200から配置変更に関する情報を受信したか否かを判定する。配置変更に関する情報を受信していないとき、処理はステップS301に戻る。配置変更に関する情報を受信したとき、処理はステップS306に進む。ステップS306において、CPU312は、2種類のプログラムの表示を変更するための情報を作成する配置変更処理を実行する。配置変更処理については後に詳述する。その後、処理はステップS301に戻る。 In step S305, the CPU 312 determines whether or not the information regarding the arrangement change is received from the smartphone 200. When the information regarding the rearrangement change has not been received, the process returns to step S301. When the information regarding the rearrangement change is received, the process proceeds to step S306. In step S306, the CPU 312 executes an arrangement change process for creating information for changing the display of the two types of programs. The arrangement change process will be described in detail later. After that, the process returns to step S301.

(変換処理)
ステップS302において行われる変換処理について、図6に示すフローチャートを参照して説明する。ここでは、電卓100で作成される、変換される前のプログラム例を図7Aに示す。また、変換された後のプログラム例を図7Bに示す。また、図7Aに示すプログラムを実行したときに、電卓100に表示される画面例を図8A及び図8Bに示す。
(Conversion process)
The conversion process performed in step S302 will be described with reference to the flowchart shown in FIG. Here, an example of a program created by the calculator 100 before conversion is shown in FIG. 7A. An example of the converted program is shown in FIG. 7B. Further, FIGS. 8A and 8B show examples of screens displayed on the calculator 100 when the program shown in FIG. 7A is executed.

電卓100で作成され実行される第1プログラムの一例は、図7Aのコマンド欄に記載のように、下記のようなプログラムである。
−−−−−
Go to x=-10, y=-20
Pen Down
Repeat 6
Move 20 pixels
Show Result y
Turn ↑ 60 degrees
Show Result x


−−−−−
このプログラムが電卓100で実行されたとき次のように動作する。
An example of the first program created and executed by the calculator 100 is the following program as described in the command column of FIG. 7A.
−−−−−
Go to x = -10, y = -20
Pen Down
Repeat 6
Move 20 pixels
Show Result y
Turn ↑ 60 degrees
Show Result x
"

−−−−−
When this program is executed on the calculator 100, it operates as follows.

「Go to x=-10, y=-20」によって、座標(x, y)=(-10, -20)が指定される。 The coordinates (x, y) = (-10, -20) are specified by "Go to x = -10, y = -20".

「Pen Down」によって、指定されている点(この場合、(x, y)=(-10, -20))から線が引かれる。線が引かれる向き、及び、線を引いた後の位置は、矢尻の記号によって示される。なお、矢尻の向きは、初期設定ではx方向である。 "Pen Down" draws a line from the specified point (in this case, (x, y) = (-10, -20)). The direction in which the line is drawn and the position after the line is drawn are indicated by the arrowhead symbol. The direction of the arrowhead is the x direction by default.

「Repeat 6」及び「」」によって、これらに囲まれたコマンドが6回繰り返される。繰り返されるのは、以下の動作である。 The commands enclosed by "Repeat 6" and "" are repeated 6 times. The following operations are repeated.

「Move 20 pixels」によって、矢尻の方向に長さ20ピクセルの線が引かれる。 "Move 20 pixels" draws a line 20 pixels long in the direction of the arrowhead.

「Show Result y」によって、現在の位置のy座標の値を示す。また、実行ボタンが押されるまで待機する。 "Show Result y" indicates the y-coordinate value of the current position. It also waits until the execute button is pressed.

したがって、実行ボタンが押されたとき、電卓100の液晶ディスプレイ134に表示される画面は、図8Aの符号(a)のようになる。すなわち、(x, y)=(-10, -20)からx方向に長さ20ピクセルの線が引かれ、(x, y)=(10, -20)の位置に矢尻記号が示される。また、現在位置のy座標である「-20」が表示される。 Therefore, when the execute button is pressed, the screen displayed on the liquid crystal display 134 of the calculator 100 is as shown by the reference numeral (a) in FIG. 8A. That is, a line with a length of 20 pixels is drawn from (x, y) = (-10, -20) in the x direction, and an arrowhead symbol is shown at the position of (x, y) = (10, -20). In addition, "-20", which is the y coordinate of the current position, is displayed.

実行ボタンが押されると、「Turn ↑ 60 degrees」によって、矢尻の向きが反時計回りに60度回転される。 When the execute button is pressed, the direction of the arrowhead is rotated 60 degrees counterclockwise by "Turn ↑ 60 degrees".

「Show Result x」によって、現在の位置のx座標の値を示す。また、実行ボタンが押されるまで待機する。 "Show Result x" indicates the x-coordinate value of the current position. It also waits until the execute button is pressed.

したがって、電卓100の液晶ディスプレイ134に表示される画面は、図8Aの符号(b)のようになる。すなわち、その場で反時計回りに60度回転した矢尻記号が示される。また、現在位置のx座標である「10」が表示される。 Therefore, the screen displayed on the liquid crystal display 134 of the calculator 100 is as shown by the reference numeral (b) in FIG. 8A. That is, the arrowhead symbol rotated 60 degrees counterclockwise on the spot is shown. In addition, "10", which is the x-coordinate of the current position, is displayed.

「Repeat 6」及び「」」によって囲まれた命令が繰り返される。したがって、実行ボタンが押されたとき、2回目の「Move 20 pixels」及び「Show Result y」によって、図8Aの符号(c)のように、(x, y)=(10, -20)から矢尻の方向に長さ20ピクセルの線が引かれ、(x, y)=(20, -2.679491924)の位置に矢尻記号が示される。また、現在位置のy座標である「-2.679491924」が表示される。 The instructions enclosed by "Repeat 6" and "" are repeated. Therefore, when the execute button is pressed, the second "Move 20 pixels" and "Show Result y" are performed from (x, y) = (10, -20) as shown by the symbol (c) in FIG. 8A. A 20 pixel long line is drawn in the direction of the arrowhead, and the arrowhead symbol is shown at the position (x, y) = (20, -2.679491924). In addition, "-2.679491924", which is the y coordinate of the current position, is displayed.

実行ボタンが押されたとき、「Turn ↑ 60 degrees」及び「Show Result x」によって、図8Aの符号(d)のよう、その場で反時計回りに60度回転した矢尻記号が示される。また、現在位置のx座標である「20」が表示される。 When the execute button is pressed, "Turn ↑ 60 degrees" and "Show Result x" indicate an arrowhead symbol that is rotated 60 degrees counterclockwise on the spot, as shown by the symbol (d) in FIG. 8A. In addition, "20", which is the x-coordinate of the current position, is displayed.

実行ボタンが押されたとき、3回目の「Move 20 pixels」及び「Show Result y」によって、図8Aの符号(e)のように、(x, y)=(20, -2.679491924)から矢尻の方向に長さ20ピクセルの線が引かれ、(x, y)=(10, 14.64101615)の位置に矢尻記号が示される。また、現在位置のy座標である「14.64101615」が表示される。 When the execute button is pressed, the third "Move 20 pixels" and "Show Result y" show the arrowhead from (x, y) = (20, -2.679491924) as shown by the symbol (e) in FIG. 8A. A 20 pixel long line is drawn in the direction and an arrowhead symbol is shown at position (x, y) = (10, 14.64101615). In addition, "14.64101615", which is the y coordinate of the current position, is displayed.

実行ボタンが押されたとき、「Turn ↑ 60 degrees」及び「Show Result x」によって、図8Aの符号(f)のよう、その場で反時計回りに60度回転した矢尻記号が示される。また、現在位置のx座標である「10」が表示される。 When the execute button is pressed, "Turn ↑ 60 degrees" and "Show Result x" indicate an arrowhead symbol that is rotated 60 degrees counterclockwise on the spot, as shown by the symbol (f) in FIG. 8A. In addition, "10", which is the x-coordinate of the current position, is displayed.

実行ボタンが押されたとき、4回目の「Move 20 pixels」及び「Show Result y」によって、図8Aの符号(g)のように、(x, y)=(10, 14.64101615)から矢尻の方向に長さ20ピクセルの線が引かれ、(x, y)=(-10, 14.64101615)の位置に矢尻記号が示される。また、現在位置のy座標である「14.64101615」が表示される。 When the execute button is pressed, the fourth "Move 20 pixels" and "Show Result y" indicate the direction from (x, y) = (10, 14.64101615) to the arrowhead, as shown by the symbol (g) in FIG. 8A. A line of 20 pixels in length is drawn in, and the arrowhead symbol is shown at the position of (x, y) = (-10, 14.64101615). In addition, "14.64101615", which is the y coordinate of the current position, is displayed.

実行ボタンが押されたとき、「Turn ↑ 60 degrees」及び「Show Result x」によって、図8Bの符号(h)のよう、その場で反時計回りに60度回転した矢尻記号が示される。また、現在位置のx座標である「-10」が表示される。 When the execute button is pressed, "Turn ↑ 60 degrees" and "Show Result x" indicate an arrowhead symbol that is rotated 60 degrees counterclockwise on the spot, as shown by the symbol (h) in FIG. 8B. In addition, "-10", which is the x-coordinate of the current position, is displayed.

実行ボタンが押されたとき、5回目の「Move 20 pixels」及び「Show Result y」によって、図8Bの符号(i)のように、(x, y)=(-10, 14.64101615)から矢尻の方向に長さ20ピクセルの線が引かれ、(x, y)=(-20, -2.679491924)の位置に矢尻記号が示される。また、現在位置のy座標である「-2.679491924」が表示される。 When the execute button is pressed, the fifth "Move 20 pixels" and "Show Result y" show the arrowhead from (x, y) = (-10, 14.64101615), as shown by the symbol (i) in FIG. 8B. A 20 pixel long line is drawn in the direction and an arrowhead symbol is shown at (x, y) = (-20, -2.679491924). In addition, "-2.679491924", which is the y coordinate of the current position, is displayed.

実行ボタンが押されたとき、「Turn ↑ 60 degrees」及び「Show Result x」によって、図8Bの符号(j)のよう、その場で反時計回りに60度回転した矢尻記号が示される。また、現在位置のx座標である「-20」が表示される。 When the execute button is pressed, "Turn ↑ 60 degrees" and "Show Result x" indicate an arrowhead symbol that is rotated 60 degrees counterclockwise on the spot, as shown by the symbol (j) in FIG. 8B. In addition, "-20", which is the x-coordinate of the current position, is displayed.

実行ボタンが押されたとき、6回目の「Move 20 pixels」及び「Show Result y」によって、図8Bの符号(k)のように、(x, y)=(-20, -2.679491924)から矢尻の方向に長さ20ピクセルの線が引かれ、(x, y)=(-10, -20)の位置に矢尻記号が示される。また、現在位置のy座標である「-20」が表示される。 When the execute button is pressed, the sixth "Move 20 pixels" and "Show Result y" will cause an arrowhead from (x, y) = (-20, -2.679491924), as shown by the symbol (k) in FIG. 8B. A line with a length of 20 pixels is drawn in the direction of, and the arrowhead symbol is shown at the position of (x, y) = (-10, -20). In addition, "-20", which is the y coordinate of the current position, is displayed.

実行ボタンが押されたとき、「Turn ↑ 60 degrees」及び「Show Result x」によって、図8Bの符号(l)のよう、その場で反時計回りに60度回転した矢尻記号が示される。また、現在位置のx座標である「-10」が表示される。 When the execute button is pressed, "Turn ↑ 60 degrees" and "Show Result x" indicate an arrowhead symbol that is rotated 60 degrees counterclockwise on the spot, as shown by the symbol (l) in FIG. 8B. In addition, "-10", which is the x-coordinate of the current position, is displayed.

実行ボタンが押されたとき、終了を示す「(空白行)」によってプログラムの実行が終了する。その結果、図8Bの符号(m)のような画面が表示される。ここでさらに実行ボタンが押されたとき、図8Bの符号(n)のような画面が表示され、プログラムの入力画面となる。 When the execute button is pressed, the program execution ends with a "(blank line)" indicating the end. As a result, a screen as shown by the reference numeral (m) in FIG. 8B is displayed. Here, when the execute button is further pressed, a screen as shown by the reference numeral (n) in FIG. 8B is displayed, which becomes a program input screen.

ステップS401において、CPU312は、スマートフォン200から、例えば上述のような電卓100で作成された第1プログラムを取得する。 In step S401, the CPU 312 acquires the first program created by, for example, the calculator 100 as described above from the smartphone 200.

ステップS402において、CPU312は、取得した第1プログラムを異なるプログラミング言語で記述された第2のプログラムに変換する。このとき、図7Aに示すように、CPU312は、第1プログラムの各命令文に順に行番号を付与する。 In step S402, the CPU 312 converts the acquired first program into a second program written in a different programming language. At this time, as shown in FIG. 7A, the CPU 312 assigns line numbers to each instruction statement of the first program in order.

図7Aに示すような第1プログラムに対応する第2プログラムは、例えば図7Bに示すようになる。 The second program corresponding to the first program as shown in FIG. 7A is as shown in FIG. 7B, for example.

第1プログラムの「Go to x=-10, y=-20」は、第2プログラムでは「go to x: (-10) y: (-20)」に変換される。 "Go to x = -10, y = -20" in the first program is converted to "go to x: (-10) y: (-20)" in the second program.

第1プログラムの「Pen Down」は、第2プログラムでは「pen down」に変換される。 The "Pen Down" of the first program is converted to "pen down" in the second program.

第1プログラムの「Repeat 6」は、第2プログラムでは「repeat (6)」に変換される。 "Repeat 6" in the first program is converted to "repeat (6)" in the second program.

第1プログラムの「Move 20 pixels」は、第2プログラムでは「move (20) pixels」に変換される。 "Move 20 pixels" in the first program is converted to "move (20) pixels" in the second program.

第1プログラムの「Show Result y」は、第2プログラムでは「show (y)」及び「wait any key」に変換される。 The "Show Result y" of the first program is converted into "show (y)" and "wait any key" in the second program.

第1プログラムの「Turn ↑ 60 degrees」は、第2プログラムでは「turn ↑ 60 degrees」に変換される。 "Turn ↑ 60 degrees" in the first program is converted to "turn ↑ 60 degrees" in the second program.

第1プログラムの「Show Result x」は、第2プログラムでは「show (x)」及び「wait any key」に変換される。 The "Show Result x" of the first program is converted into "show (x)" and "wait any key" in the second program.

第1プログラムの「」」は、第2プログラムでは「」」に変換される。 The "" "in the first program is converted to" "" in the second program.

第1プログラムの「(空白行)」は、第2プログラムでは「(空白行)」に変換される。 The "(blank line)" of the first program is converted to "(blank line)" in the second program.

以上のようなプログラムの変換は、例えばあらかじめ用意された対応表などを参照して行われ得る。 The conversion of the program as described above can be performed by referring to, for example, a correspondence table prepared in advance.

続いて、ステップS403乃至ステップS410の処理によって、第2プログラムの各々の行に関して、第1プログラムの行番号に対応する行番号が特定される。 Subsequently, by the processing of steps S403 to S410, the line number corresponding to the line number of the first program is specified for each line of the second program.

ステップS403において、CPU312は、第1プログラムの処理行数を示す変数Nを1に設定する。また、第2プログラムの行番号を表す数列をリセットする。 In step S403, the CPU 312 sets the variable N indicating the number of processing lines of the first program to 1. Also, the sequence representing the row number of the second program is reset.

ステップS404において、CPU312は、第1プログラムのN行目のデータを取得する。ステップS405において、CPU312は、取得した第1プログラムのN行目の構文が、プログラムの変換において行数が増える構文であるか否かを判定する。行数が増える構文であるか否か及び増える行数は、例えば対応表を参照することで特定され得る。行数が増えないとき、処理はステップS406に進む。ステップS406において、CPU312は、第2プログラムの行番号を表す数列に1個のNを追加する。その後、処理はステップS407に進む。 In step S404, the CPU 312 acquires the data on the Nth line of the first program. In step S405, the CPU 312 determines whether or not the syntax of the Nth line of the acquired first program is a syntax that increases the number of lines in the conversion of the program. Whether or not the syntax increases the number of rows and the number of rows to increase can be specified by referring to, for example, a correspondence table. When the number of lines does not increase, the process proceeds to step S406. In step S406, the CPU 312 adds one N to the sequence representing the row number of the second program. After that, the process proceeds to step S407.

ステップS407において、CPU312は、第1プログラムに次の行があるか否かを判定する。次の行があるとき、処理はステップS408に進む。ステップS408において、CPU312は、変数Nに1を加算する。その後、処理はステップS404に戻る。すなわち、次の行について、同様の処理が繰り返される。 In step S407, the CPU 312 determines whether or not the first program has the next line. When there is a next line, the process proceeds to step S408. In step S408, the CPU 312 adds 1 to the variable N. After that, the process returns to step S404. That is, the same process is repeated for the next line.

例えば、上述のとおり、図7Aに示した第1プログラムから図7Bに示した第2プログラムへの変換において、第1プログラムの1行目乃至4行目は、行数が増えない行である。したがって、N=1からN=4のとき、ステップS406の処理によって、数列に「1」、「2」、「3」、「4」が1個ずつ追加される。その結果、数列は、{1,2,3,4}となる。 For example, as described above, in the conversion from the first program shown in FIG. 7A to the second program shown in FIG. 7B, the first to fourth lines of the first program are lines in which the number of lines does not increase. Therefore, when N = 1 to N = 4, the processing of step S406 adds one "1", "2", "3", and "4" to the sequence. As a result, the sequence becomes {1, 2, 3, 4}.

ステップS405において、行数が増える構文であると判定されたとき、処理はステップS409に進む。ステップS409において、CPU312は、構文に基づいて、例えば対応表を参照して、増える行数nを取得する。ステップS410において、CPU312は、数列にn+1個のNを追加する。その後、処理はステップS407に進む。 When it is determined in step S405 that the syntax is such that the number of lines increases, the process proceeds to step S409. In step S409, the CPU 312 obtains an increasing number of rows n based on the syntax, for example, by referring to the correspondence table. In step S410, the CPU 312 adds n + 1 N to the sequence. After that, the process proceeds to step S407.

例えば、上述のとおり、図7Aに示した第1プログラムから図7Bに示した第2プログラムへの変換において、第1プログラムの5行目は、行数が1増えて2行になる。したがって、N=5のとき、ステップS409の処理によってn=1が取得され、ステップS410の処理によって、数列に2個の「5」が追加される。その結果、数列は、{1,2,3,4,5,5}となる。 For example, as described above, in the conversion from the first program shown in FIG. 7A to the second program shown in FIG. 7B, the number of lines in the fifth line of the first program is increased by one to two lines. Therefore, when N = 5, n = 1 is acquired by the process of step S409, and two "5" s are added to the sequence by the process of step S410. As a result, the sequence becomes {1,2,3,4,5,5}.

以上のようにして、例えば、図7Aに示した第1プログラムから図7Bに示した第2プログラムへの変換については、数列{1,2,3,4,5,5,6,7,7,8,9}が得られる。 As described above, for example, for the conversion from the first program shown in FIG. 7A to the second program shown in FIG. 7B, the sequence {1,2,3,4,5,5,6,7,7 , 8, 9} is obtained.

ステップS407において次の行がないと判定されたとき、処理はステップS411に進む。ステップS411において、CPU312は、得られた数列に基づいて、第2プログラムに行番号を付与する。例えば、図7Bに示す第2プログラムの例では、図7Bに示すような行番号が付与される。 When it is determined in step S407 that there is no next line, the process proceeds to step S411. In step S411, the CPU 312 assigns a row number to the second program based on the obtained sequence. For example, in the example of the second program shown in FIG. 7B, line numbers as shown in FIG. 7B are assigned.

ステップS412において、CPU312は、第1プログラム及び第2プログラムとそれらの行番号との情報を用いて、スマートフォン200に表示させる画面に関するデータを作成する。ステップS413において、CPU312は、画面に関するデータの作成結果をスマートフォン200に送信する。ここで送信される画面に関するデータは、表示画面の画像データであってもよい。この場合、スマートフォン200は、受信した画像を表示する。また、送信される画面に関するデータは、テキストデータであってもよい。この場合、スマートフォン200は、このテキストデータに基づいて、表示画面を作成する。以上で、変換処理は終了する。 In step S412, the CPU 312 creates data related to the screen to be displayed on the smartphone 200 by using the information of the first program and the second program and their line numbers. In step S413, the CPU 312 transmits the creation result of data related to the screen to the smartphone 200. The data related to the screen transmitted here may be image data of the display screen. In this case, the smartphone 200 displays the received image. Further, the data related to the screen to be transmitted may be text data. In this case, the smartphone 200 creates a display screen based on this text data. This completes the conversion process.

その結果、例えば図9に示すような画像がスマートフォン200に表示される。すなわち、画面600内には、第1プログラムに関する第1プログラムリスト610と第2プログラムに関する第2プログラムリスト620とが縦に並べて表示される。第1プログラムリスト610には、行番号611と命令文612とが含まれる。同様に、第2プログラムリスト620には、行番号621と命令文622とが含まれる。本実施形態では、第1プログラムリスト610の行番号611と第2プログラムリスト620の行番号621とは、機能的に対応する命令文に同じ行番号が付されるという関係になっている。このため、ユーザは、変換前後の第1プログラムリスト610と第2プログラムリスト620とを比較することができ、さらにその対応関係を容易に把握することができる。 As a result, for example, an image as shown in FIG. 9 is displayed on the smartphone 200. That is, in the screen 600, the first program list 610 related to the first program and the second program list 620 related to the second program are displayed vertically side by side. The first program list 610 includes a line number 611 and an instruction statement 612. Similarly, the second program list 620 includes line number 621 and instruction statement 622. In the present embodiment, the line number 611 of the first program list 610 and the line number 621 of the second program list 620 are in a relationship that the same line number is assigned to the functionally corresponding instruction statement. Therefore, the user can compare the first program list 610 and the second program list 620 before and after the conversion, and can easily grasp the corresponding relationship.

なお、ここでは、行の対応関係が番号によって示される例を示したが、これに限らない。アルファベットや記号など各種の符号が同様に用いられ得る。 Here, an example in which the correspondence between lines is indicated by a number is shown, but the present invention is not limited to this. Various codes such as alphabets and symbols can be used similarly.

(選択処理)
ステップS304で行われる選択処理について、図10に示すフローチャートを参照して説明する。
(Selection process)
The selection process performed in step S304 will be described with reference to the flowchart shown in FIG.

ステップS501において、CPU312は、スマートフォン200から選択位置を受信する。ステップS502において、CPU312は、選択位置に基づいて、選択された行を特定する。このとき、第1プログラムと第2プログラムとの対応関係が明らかになっているので、第1プログラムと第2プログラムとの両方の選択された行が特定される。ステップS503において、CPU312は、特定された行について、第1プログラムと第2プログラムとの両方について強調するハイライトを付与するための情報を生成する。例えば、選択された行がハイライト表示された画像を作成する。ステップS504において、CPU312は、ステップS503で生成された結果をスマートフォン200へ送信する。その結果、スマートフォン200では、選択された行が強調表示された画像が表示される。 In step S501, the CPU 312 receives the selected position from the smartphone 200. In step S502, the CPU 312 identifies the selected row based on the selected position. At this time, since the correspondence between the first program and the second program has been clarified, the selected lines of both the first program and the second program are specified. In step S503, the CPU 312 generates information for highlighting the identified lines for both the first and second programs. For example, create an image with the selected lines highlighted. In step S504, the CPU 312 transmits the result generated in step S503 to the smartphone 200. As a result, the smartphone 200 displays an image in which the selected line is highlighted.

例えば、図11に示すように、第1プログラムリスト610の5行目613が選択されたとする。このとき、第1プログラムリスト610の5行目613及び第2プログラムリスト620の対応する2行623が強調表示される。 For example, as shown in FIG. 11, it is assumed that the fifth line 613 of the first program list 610 is selected. At this time, the fifth line 613 of the first program list 610 and the corresponding second line 623 of the second program list 620 are highlighted.

本実施形態によれば、対応した行が強調表示されるので、ユーザは行を選択することで容易に対応関係を把握することができる。 According to the present embodiment, the corresponding line is highlighted, so that the user can easily grasp the correspondence relationship by selecting the line.

(配置変更処理)
ステップS306で行われる配置変更処理について、図12に示すフローチャートを参照して説明する。
(Arrangement change processing)
The arrangement change process performed in step S306 will be described with reference to the flowchart shown in FIG.

ステップS601において、CPU312は、第1プログラム及び第2プログラムの並べ方について縦に並べるか横に並べるかを判定する。並べ方は、ユーザによる操作に応じて変更される。例えば、スマートフォン200の液晶ディスプレイ224が縦長となるようにスマートフォン200が配置されるとき、縦に並べると判定される。例えば、スマートフォン200の液晶ディスプレイ224が横長となるようにスマートフォン200が配置されるとき、横に並べると判定される。横に並べると判定されたとき、処理はステップS602に進む。第1プログラムと第2プログラムとが横に並べて配置されるとき、命令文のうち対応する行が横に並べられると対応関係が把握されやすい。そこで、本実施形態では、ステップS602乃至ステップS607において、第2プログラムに応じて第1プログラムの命令文の行間に必要な空白行を挿入する。 In step S601, the CPU 312 determines whether to arrange the first program and the second program vertically or horizontally. The arrangement is changed according to the operation by the user. For example, when the smartphone 200 is arranged so that the liquid crystal display 224 of the smartphone 200 is vertically long, it is determined that the smartphone 200 is arranged vertically. For example, when the smartphone 200 is arranged so that the liquid crystal display 224 of the smartphone 200 is horizontally long, it is determined that the smartphone 200 is arranged side by side. When it is determined that they are arranged side by side, the process proceeds to step S602. When the first program and the second program are arranged side by side, it is easy to grasp the correspondence relationship if the corresponding lines in the instruction statement are arranged side by side. Therefore, in the present embodiment, in steps S602 to S607, a necessary blank line is inserted between the lines of the instruction statement of the first program according to the second program.

ステップS602において、CPU312は、処理対象の行番号を示す変数Nを1に設定する。ステップS603において、CPU312は、第2プログラムのN番目の行番号を取得する。 In step S602, the CPU 312 sets the variable N indicating the line number to be processed to 1. In step S603, the CPU 312 acquires the Nth line number of the second program.

ステップS604において、CPU312は、現在対象としている行番号が繰り返されている番号であるか否かを判定する。例えば、図7Bに示す第2プログラムにおいて、行番号が「1」である行は、繰り返されていない。これに対して、行番号が「5」である行は、2つ繰り返されている。行番号が繰り返されていないと判定されたとき、処理はステップS606に進む。一方、行番号が繰り返されていると判定されたとき、処理はステップS605に進む。ステップS605において、CPU312は、第1プログラムの対応する行の下に空白行を挿入する。その後、処理はステップS606に進む。 In step S604, the CPU 312 determines whether or not the currently targeted line number is a repeating number. For example, in the second program shown in FIG. 7B, the line whose line number is "1" is not repeated. On the other hand, the line whose line number is "5" is repeated twice. When it is determined that the line number is not repeated, the process proceeds to step S606. On the other hand, when it is determined that the line number is repeated, the process proceeds to step S605. In step S605, the CPU 312 inserts a blank line below the corresponding line in the first program. After that, the process proceeds to step S606.

ステップS606において、CPU312は、次の行があるか否かを判定する。次の行があるとき、処理はステップS607に進む。ステップS607において、CPU312は、変数Nに1を加算する。その後、処理はステップS603に戻る。すなわち、第2プログラムで行番号が繰り返されている行に対応する行については、第1プログラムにおいて対応する行において空白行が挿入される。 In step S606, the CPU 312 determines if there is a next line. When there is a next line, the process proceeds to step S607. In step S607, the CPU 312 adds 1 to the variable N. After that, the process returns to step S603. That is, for the line corresponding to the line in which the line number is repeated in the second program, a blank line is inserted in the corresponding line in the first program.

ステップS606において、次の行がないと判定されたとき、処理はステップS608に進む。ステップS608において、CPU312は、必要に応じて空白行が挿入された第1プログラムに関して表示するためのデータを作成する。このデータは表示用の画像データであってもよい。 When it is determined in step S606 that there is no next line, the process proceeds to step S608. In step S608, the CPU 312 creates data for display with respect to the first program into which blank lines have been inserted, if necessary. This data may be image data for display.

ステップS609において、CPU312は、ステップS608で作成された第1プログラムに関する表示データを用いて、また、第2プログラムに関して既に存在していた表示データを流用して、第1プログラムと第2プログラムとが横に(左右に)並べられた表示データを作成する。 In step S609, the CPU 312 uses the display data related to the first program created in step S608, and also uses the display data already existing for the second program to form the first program and the second program. Create display data arranged side by side (left and right).

ステップS610において、CPU312は、作成した表示用のデータを、スマートフォン200に送信する。その後、配置変更処理は終了する。その結果、スマートフォン200では、第1プログラムリスト610と第2プログラムリスト620とが横に並べられた画面が表示される。 In step S610, the CPU 312 transmits the created display data to the smartphone 200. After that, the arrangement change process ends. As a result, the smartphone 200 displays a screen in which the first program list 610 and the second program list 620 are arranged side by side.

スマートフォン200に表示される画面の一例を図13に示す。この図に示すように、画面600には、第1プログラムリスト610と第2プログラムリスト620とが横に並べて表示されている。ここで、第1プログラムリスト610においては1行の命令文が第2プログラムリスト620においては2行であることがある。このような行については、第1プログラムリスト610において空白行が挿入されることで、第1プログラムリスト610と第2プログラムリスト620とで、対応する命令文が左右に並べて表示される。その結果、ユーザは第1プログラムリスト610の命令文と第2プログラムリスト620の命令文との対応関係を把握しやすい。 FIG. 13 shows an example of the screen displayed on the smartphone 200. As shown in this figure, the first program list 610 and the second program list 620 are displayed side by side on the screen 600. Here, the statement of one line in the first program list 610 may be two lines in the second program list 620. With respect to such a line, by inserting a blank line in the first program list 610, the corresponding statements are displayed side by side in the first program list 610 and the second program list 620. As a result, the user can easily grasp the correspondence between the instruction statement of the first program list 610 and the instruction statement of the second program list 620.

図12に戻って説明を続ける。ステップS601において、並べ方が縦に変更されると判定されたとき、処理はステップS611に進む。ステップS611において、CPU312は、既にある空白行が挿入されていない第1プログラムリスト610と第2プログラムリスト620との表示データを流用して、第1プログラムリスト610と第2プログラムリスト620とが縦に(上下に)並べられた表示データを作成する。その後、処理はステップS610に進む。このとき、作成された第1プログラムリスト610と第2プログラムリスト620とが縦に並べられた表示データをスマートフォン200に送信する。その結果、図9に示すような、第1プログラムリスト610と第2プログラムリスト620とが縦に並べられた画面600が表示される。 The explanation will be continued by returning to FIG. When it is determined in step S601 that the arrangement is changed vertically, the process proceeds to step S611. In step S611, the CPU 312 uses the display data of the first program list 610 and the second program list 620 in which existing blank lines are not inserted, and the first program list 610 and the second program list 620 are vertically arranged. Create display data arranged in (upper and lower). After that, the process proceeds to step S610. At this time, the display data in which the created first program list 610 and the second program list 620 are vertically arranged is transmitted to the smartphone 200. As a result, a screen 600 in which the first program list 610 and the second program list 620 are vertically arranged is displayed as shown in FIG.

[第2の実施形態]
本発明の第2の実施形態について説明する。ここでは、第1の実施形態との相違点について説明し、同一の部分については、同一の符号を付してその説明を省略する。第1の実施形態では、第1プログラムに対して第2プログラムは行が増えることはあるが、減ることはないものとした。また、増える行数は構文の種類によって決まっており、命令文を1行確認することで増える行数が特定されるものとした。これに対して、本実施形態では、第1プログラムに対して第2プログラムは行が増えたり減ったりする。また、増減する行数も次の行の記載次第で変化するものとする。
[Second Embodiment]
A second embodiment of the present invention will be described. Here, the differences from the first embodiment will be described, and the same parts will be designated by the same reference numerals and the description thereof will be omitted. In the first embodiment, it is assumed that the second program may have more lines than the first program, but it does not decrease. In addition, the number of lines to be increased is determined by the type of syntax, and it is assumed that the number of lines to be increased can be specified by checking one line of the statement. On the other hand, in the present embodiment, the number of lines in the second program increases or decreases with respect to the first program. In addition, the number of lines to be increased or decreased shall change depending on the description of the next line.

本実施形態に係る変換処理について、図14A及び図14Bに示すフローチャートを参照して説明する。 The conversion process according to the present embodiment will be described with reference to the flowcharts shown in FIGS. 14A and 14B.

ステップS701において、CPU312は、スマートフォン200から、電卓100で作成された第1プログラムを取得する。ステップS702において、CPU312は、取得した第1プログラムを異なるプログラミング言語で記述された第2のプログラムに変換する。このとき、CPU312は、第1プログラムの各命令文に順に行番号を付与する。ステップS703において、CPU312は、第1プログラムの処理行数を示す変数Nを1に設定する。また、第2プログラムの行番号を表す数列をリセットする。 In step S701, the CPU 312 acquires the first program created by the calculator 100 from the smartphone 200. In step S702, the CPU 312 converts the acquired first program into a second program written in a different programming language. At this time, the CPU 312 assigns line numbers to each instruction statement of the first program in order. In step S703, the CPU 312 sets the variable N indicating the number of processing lines of the first program to 1. Also, the sequence representing the row number of the second program is reset.

ステップS704において、CPU312は、第1プログラムのN行目のデータを取得する。ステップS705において、CPU312は、取得した第1プログラムのN行目の構文が、プログラムの変換において行数が増える構文であるか否かを判定する。行数が増えるとき、処理はステップS706に進む。 In step S704, the CPU 312 acquires the data on the Nth line of the first program. In step S705, the CPU 312 determines whether or not the syntax of the Nth line of the acquired first program is a syntax that increases the number of lines in the conversion of the program. When the number of lines increases, the process proceeds to step S706.

ステップS706において、CPU312は、変数kを1に設定する。ステップS707において、CPU312は、第1プログラムのN+k行目のデータを取得する。ステップS708において、CPU312は、第1プログラムのN+k行目のデータに基づいて、増加行数を決定するために次の行を確認する必要があるか否かを判定する。次の行を確認する必要があるとき、処理はステップS709に進む。ステップS709において、CPU312は、変数kに1を加算する。その後、処理はステップS707に戻る。ステップS708において、次の行を確認する必要がないと判定されたとき、処理はステップS710に進む。 In step S706, the CPU 312 sets the variable k to 1. In step S707, the CPU 312 acquires the data on the N + kth line of the first program. In step S708, the CPU 312 determines whether or not it is necessary to confirm the next line in order to determine the number of increased lines based on the data of the N + kth lines of the first program. When it is necessary to confirm the next line, the process proceeds to step S709. In step S709, the CPU 312 adds 1 to the variable k. After that, the process returns to step S707. When it is determined in step S708 that it is not necessary to confirm the next line, the process proceeds to step S710.

ステップS710において、CPU312は、第1プログラムのN行目からN+k行目までの命令文の記載に基づいて、第2プログラムにおいて対応する行数を示す数列を確定する。例えば、N行目が2行に、N+1行目が3行に変換される場合、数列は、{N,N,N+1,N+1,N+1}となる。ステップS711において、CPU312は、第2プログラムの行数を示す数列に、ステップS710で確定した数列を追加する。 In step S710, the CPU 312 determines a sequence indicating the number of corresponding rows in the second program based on the description of the instruction statements from the Nth row to the N + kth rows of the first program. For example, when the Nth row is converted to the 2nd row and the N + 1st row is converted to the 3rd row, the sequence becomes {N, N, N + 1, N + 1, N + 1}. In step S711, the CPU 312 adds the sequence determined in step S710 to the sequence indicating the number of rows in the second program.

ステップS712において、CPU312は、変数Nにk+1を加算する。ステップS713において、CPU312は、次の行があるか否かを判定する。次の行があるとき、処理はステップS704に戻る。すなわち、数列に追加していない行から処理を繰り返す。 In step S712, the CPU 312 adds k + 1 to the variable N. In step S713, the CPU 312 determines if there is a next line. When there is a next line, the process returns to step S704. That is, the process is repeated from the row not added to the sequence.

ステップS705において、行数が増えていないと判定されたとき、処理はステップS714に進む。ステップS714において、CPU312は、取得した第1プログラムのN行目の構文が、プログラムの変換において行数が減る構文であるか否かを判定する。行数が減るとき、処理はステップS715に進む。 When it is determined in step S705 that the number of rows has not increased, the process proceeds to step S714. In step S714, the CPU 312 determines whether or not the syntax of the Nth line of the acquired first program is a syntax in which the number of lines is reduced in the conversion of the program. When the number of lines decreases, the process proceeds to step S715.

ステップS715において、CPU312は、変数kを1に設定する。ステップS716において、CPU312は、第1プログラムのN+k行目のデータを取得する。ステップS717において、CPU312は、第1プログラムのN+k行目のデータに基づいて、減少行数を決定するために次の行を確認する必要があるか否かを判定する。次の行を確認する必要があるとき、処理はステップS718に進む。ステップS718において、CPU312は、変数kに1を加算する。その後、処理はステップS716に戻る。ステップS717において、次の行を確認する必要がないと判定されたとき、処理はステップS719に進む。 In step S715, the CPU 312 sets the variable k to 1. In step S716, the CPU 312 acquires the data on the N + kth line of the first program. In step S717, the CPU 312 determines whether or not it is necessary to confirm the next row in order to determine the number of reduced rows based on the data in the N + k rows of the first program. When it is necessary to confirm the next line, the process proceeds to step S718. In step S718, the CPU 312 adds 1 to the variable k. After that, the process returns to step S716. When it is determined in step S717 that it is not necessary to confirm the next line, the process proceeds to step S719.

ステップS719において、CPU312は、第1プログラムのN行目からN+k行目までの命令文の記載に基づいて、第2プログラムにおいて対応する行数を示す数列を確定する。ステップS720において、CPU312は、第2プログラムの行数を示す数列に、ステップS719で確定した数列を追加する。例えば、N行目、N+1行目、及びN+2行目が1行に変換される場合、数列には1つの値が追加される。追加される値は例えば、{N}のように最初の行の値であってもよいし、例えば{N/N+1/N+2}のように、行番号を列記した値であってもよい。 In step S719, the CPU 312 determines a sequence indicating the number of corresponding rows in the second program based on the description of the instruction statements from the Nth row to the N + kth rows of the first program. In step S720, the CPU 312 adds the sequence determined in step S719 to the sequence indicating the number of rows in the second program. For example, when the Nth row, the N + 1st row, and the N + 2nd row are converted into one row, one value is added to the sequence. The value to be added may be, for example, the value of the first line such as {N}, or may be the value in which the line numbers are listed, for example, {N / N + 1 / N + 2}.

ステップS721において、CPU312は、変数Nにk+1を加算する。その後、処理はステップS713に戻る。すなわち、次の行があるときには、数列に追加していない行から処理を繰り返す。 In step S721, the CPU 312 adds k + 1 to the variable N. After that, the process returns to step S713. That is, when there is the next row, the process is repeated from the row not added to the sequence.

ステップS714において、行数が減らないと判定されたとき、処理はステップS722に進む。ステップS722において、CPU312は、数列に1個のNを追加する。その後、処理はステップS713に戻る。すなわち、次の行があるときには、数列に追加していない行から処理を繰り返す。 When it is determined in step S714 that the number of rows does not decrease, the process proceeds to step S722. In step S722, the CPU 312 adds one N to the sequence. After that, the process returns to step S713. That is, when there is the next row, the process is repeated from the row not added to the sequence.

ステップS713において、次の行がないと判定されたとき、処理はステップS723に進む。ステップS723において、CPU312は、得られた数列に基づいて、第2プログラムに行番号を付与する。ステップS724において、CPU312は、第1プログラム及び第2プログラムとそれらの行番号との情報を用いて、スマートフォン200に表示させる画面に関するデータを作成する。ステップS725において、CPU312は、画面に関するデータの作成結果をスマートフォン200に送信する。以上で、変換処理は終了する。 When it is determined in step S713 that there is no next line, the process proceeds to step S723. In step S723, the CPU 312 assigns a row number to the second program based on the obtained sequence. In step S724, the CPU 312 creates data related to the screen to be displayed on the smartphone 200 by using the information of the first program and the second program and their line numbers. In step S725, the CPU 312 transmits the creation result of data related to the screen to the smartphone 200. This completes the conversion process.

本実施形態によれば、第1プログラムから第2プログラムに変換するにあたって、行数が増える場合と減る場合とがあっても対応できる。また、本実施形態によれば、命令文の内容に応じて増減する行数が変化する場合があっても対応できる。したがって、種々のプログラム間の変換に対応できる。 According to the present embodiment, when converting from the first program to the second program, it is possible to deal with cases where the number of lines increases and cases where the number of lines decreases. Further, according to the present embodiment, it is possible to deal with the case where the number of lines that increase or decrease changes depending on the content of the instruction statement. Therefore, it is possible to cope with conversion between various programs.

[変形例]
システムの構成については、上述の実施形態に限らない。システム構成は種々に変更し得る。例えば、スマートフォン200は、これに限らず、タブレット型の情報端末、パーソナルコンピュータなど、各種情報処理装置であってよい。また、電卓100とスマートフォン200との間の情報の伝達は、2次元コードで行うに限らない。Bluetooth Low Energy(Bluetoothは登録商標)などの規格を用いた無線通信又は有線通信などで行われてもよい。電卓100がWi−Fi(登録商標)などで直接ネットワーク400に接続してもよい。この場合、スマートフォン200を介さずに、電卓100がサーバ300に第1プログラムを送信してもよい。また、電卓100とスマートフォン200とは別体でなくてもよい。例えば、電卓100の機能とスマートフォン200の機能とを1つのスマートフォンなどの情報処理端末が担ってもよい。また、サーバ300で行われる情報処理は、スマートフォン200で行われてもよい。したがって、システム10の全ての機能を1つの情報処理端末で担ってもよい。
[Modification example]
The configuration of the system is not limited to the above-described embodiment. The system configuration can be changed in various ways. For example, the smartphone 200 is not limited to this, and may be various information processing devices such as a tablet-type information terminal and a personal computer. Further, the transmission of information between the calculator 100 and the smartphone 200 is not limited to the two-dimensional code. It may be performed by wireless communication or wired communication using a standard such as Bluetooth Low Energy (Bluetooth is a registered trademark). The calculator 100 may be directly connected to the network 400 by Wi-Fi (registered trademark) or the like. In this case, the calculator 100 may send the first program to the server 300 without going through the smartphone 200. Further, the calculator 100 and the smartphone 200 do not have to be separate bodies. For example, one information processing terminal such as a smartphone may be responsible for the functions of the calculator 100 and the functions of the smartphone 200. Further, the information processing performed by the server 300 may be performed by the smartphone 200. Therefore, one information processing terminal may carry out all the functions of the system 10.

つまり、電卓100がプログラム入力機器、スマートフォン200が通信機器、サーバ300が情報処理装置として機能するシステムや、電卓100がプログラム入力機器、及び、通信機器、サーバ300が情報処理装置として機能し、スマートフォン200が無いシステムや、電卓100がプログラム入力機器、スマートフォン200が通信機器、及び、情報処理装置として機能し、サーバ300が無いシステム、あるいは、電卓100又はスマートフォン200のそれぞれが単体でプログラム入力機器、通信機器、及び、情報処理装置として機能し、サーバ300が無くてもよい。 That is, a system in which the calculator 100 functions as a program input device, the smartphone 200 functions as a communication device, and the server 300 functions as an information processing device, the calculator 100 functions as a program input device, and the communication device and the server 300 function as an information processing device. A system without a 200, a system in which the calculator 100 functions as a program input device, a smartphone 200 functions as a communication device, and an information processing device without a server 300, or a system in which the calculator 100 or the smartphone 200 is a single program input device. It functions as a communication device and an information processing device, and may not have a server 300.

上述の実施形態では、行数を特定するアルゴリズムの一例を示したが、これに限らない。同様の機能を発揮すれば、上述の機能は他の方法によって実現されもよい。 In the above embodiment, an example of an algorithm for specifying the number of rows has been shown, but the present invention is not limited to this. As long as the same function is exhibited, the above-mentioned function may be realized by another method.

上述の実施形態では、変換前の第1プログラムを基準として、第1プログラムの1行ごとに行番号が付され、変換後の第2プログラムの各々の行に、対応する行番号が付されている。しかしながら、これに限らない。変換後の第2プログラムを基準として、第2プログラムの1行ごとに行番号が付され、変換前の第1プログラムの各々の行に、対応する行番号が付されてもよい。 In the above-described embodiment, a line number is assigned to each line of the first program with reference to the first program before conversion, and a corresponding line number is assigned to each line of the second program after conversion. There is. However, it is not limited to this. A line number may be assigned to each line of the second program with reference to the second program after conversion, and a corresponding line number may be assigned to each line of the first program before conversion.

なお、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、各実施形態は適宜組み合わせて実施してもよく、その場合組み合わせた効果が得られる。更に、上記実施形態には種々の発明が含まれており、開示される複数の構成要件から選択された組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、課題が解決でき、効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。 The present invention is not limited to the above embodiment, and can be variously modified at the implementation stage without departing from the gist thereof. In addition, each embodiment may be carried out in combination as appropriate, in which case the combined effect can be obtained. Further, the above-described embodiment includes various inventions, and various inventions can be extracted by a combination selected from a plurality of disclosed constituent requirements. For example, even if some constituent requirements are deleted from all the constituent requirements shown in the embodiment, if the problem can be solved and the effect is obtained, the configuration in which the constituent requirements are deleted can be extracted as an invention.

以下に、本願出願の当初の特許請求の範囲に記載された発明を付記する。
[1]
第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと
をコンピュータに実行させるためのプログラム。
[2]
ユーザによって選択された、前記第1プログラムリストと前記第2プログラムリストとのうち何れか一方の任意の行の情報を取得することと、
前記第1プログラムリストと前記第2プログラムリストとのうち他方の、前記選択された行に対応する行を示す表示を前記表示装置に表示させるためのデータを作成することと
を更にコンピュータに実行させるための[1]に記載のプログラム。
[3]
前記第1プログラムリストと前記第2プログラムリストとを左右に並べたときに互いに対応する行が左右に並ぶように、前記第1プログラムリスト又は前記第2プログラムリストの行間に空白行を挿入することと、
前記空白行が挿入された、前記第1プログラムリストと前記第2プログラムリストとを左右に並べて前記表示装置に表示させるためのデータを作成することと
を更にコンピュータに実行させるための[1]又は[2]に記載のプログラム。
[4]
ユーザによる操作に応じて、前記空白行を含まない前記第1プログラムリストと前記第2プログラムリストとを上下に並べて前記表示装置に表示させるためのデータを作成することを更にコンピュータに実行させるための[3]に記載のプログラム。
[5]
第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと
を実行する回路を備える情報処理装置。
[6]
第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと
を実行させるためのプログラムが記憶された記憶装置を備える情報処理装置。
[7]
情報処理装置、通信機器、及び、プログラム入力機器を備えるシステムにより実行される情報処理方法であって、
前記プログラム入力機器により、第1プログラムを入力すること、
前記情報処理装置により、
前記プログラム入力機器により入力された前記第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと、
前記通信機器へ前記データを送信することと、
前記通信機器の表示装置により、前記データを表示することと
を含む、情報処理方法。
Hereinafter, the inventions described in the claims of the original application of the present application will be added.
[1]
Acquiring the first program and
Converting the first program into a second program described in a programming language different from the programming language used in the first program and performing the same function as the first program.
The lines functionally corresponding to each other of the first program and the second program are designated by the corresponding reference numerals, and the first program list of the first program and the reference numerals are given. A program for causing a computer to create data for displaying the second program list of the second program on a display device.
[2]
Acquiring the information of an arbitrary line of any one of the first program list and the second program list selected by the user.
Further causes the computer to create data for displaying the display indicating the line corresponding to the selected line, which is the other of the first program list and the second program list, on the display device. The program described in [1] for.
[3]
Inserting a blank line between the lines of the first program list or the second program list so that the lines corresponding to each other are arranged side by side when the first program list and the second program list are arranged side by side. When,
[1] or [1] for causing the computer to further create data for displaying the first program list and the second program list on the display device side by side with the blank line inserted. The program described in [2].
[4]
In order to further cause the computer to create data for displaying the first program list and the second program list, which do not include the blank line, side by side on the display device in response to an operation by the user. The program described in [3].
[5]
Acquiring the first program and
Converting the first program into a second program described in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
Creating data for displaying the first program list of the first program and the second program list of the second program with the reference numerals on the display device is executed. An information processing device equipped with a circuit.
[6]
Acquiring the first program and
Converting the first program into a second program written in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
Creating data for displaying the first program list of the first program with the reference numerals and the second program list of the second program with the reference numerals on the display device is executed. An information processing device including a storage device in which a program for storing a program is stored.
[7]
An information processing method executed by a system equipped with an information processing device, a communication device, and a program input device.
To input the first program by the program input device,
With the information processing device
Acquiring the first program input by the program input device and
Converting the first program into a second program written in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
Creating data for displaying the first program list of the first program with the reference numerals and the second program list of the second program with the reference numerals on the display device.
Sending the data to the communication device and
An information processing method including displaying the data on a display device of the communication device.

10…システム、100…電卓、112…CPU、114…ROM、116…RAM、118…フラッシュメモリ、122…2次元コードエンコーダ、132…入力キー、134…液晶ディスプレイ、190…バスライン、200…スマートフォン、212…CPU、214…ROM、216…RAM、218…フラッシュメモリ、222…タッチパネル、224…液晶ディスプレイ、232…カメラ、234…通信装置、290…バスライン、300…サーバ、312…CPU、314…ROM、316…RAM、318…ハードディスク、334…通信装置、390…バスライン、400…ネットワーク、600…画面、610…第1プログラムリスト、611…行番号、612…命令文、620…第2プログラムリスト、621…行番号、622…命令文。 10 ... system, 100 ... calculator, 112 ... CPU, 114 ... ROM, 116 ... RAM, 118 ... flash memory, 122 ... two-dimensional code encoder, 132 ... input key, 134 ... liquid crystal display, 190 ... bus line, 200 ... smartphone , 212 ... CPU, 214 ... ROM, 216 ... RAM, 218 ... flash memory, 222 ... touch panel, 224 ... liquid crystal display, 232 ... camera, 234 ... communication device, 290 ... bus line, 300 ... server, 312 ... CPU, 314 ... ROM, 316 ... RAM, 318 ... Hard disk, 334 ... Communication device, 390 ... Bus line, 400 ... Network, 600 ... Screen, 610 ... First program list, 611 ... Line number, 612 ... Statement, 620 ... Second Program list, 621 ... line number, 622 ... statement.

Claims (7)

第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと
をコンピュータに実行させるためのプログラム。
Acquiring the first program and
Converting the first program into a second program described in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
The computer is instructed to create data for displaying the first program list of the first program and the second program list of the second program with the reference numerals on the display device. A program to run.
ユーザによって選択された、前記第1プログラムリストと前記第2プログラムリストとのうち何れか一方の任意の行の情報を取得することと、
前記第1プログラムリストと前記第2プログラムリストとのうち他方の、前記選択された行に対応する行を示す表示を前記表示装置に表示させるためのデータを作成することと
を更にコンピュータに実行させるための請求項1に記載のプログラム。
Acquiring the information of an arbitrary line of any one of the first program list and the second program list selected by the user.
Further causes the computer to create data for displaying the display indicating the line corresponding to the selected line, which is the other of the first program list and the second program list, on the display device. The program according to claim 1.
前記第1プログラムリストと前記第2プログラムリストとを左右に並べたときに互いに対応する行が左右に並ぶように、前記第1プログラムリスト又は前記第2プログラムリストの行間に空白行を挿入することと、
前記空白行が挿入された、前記第1プログラムリストと前記第2プログラムリストとを左右に並べて前記表示装置に表示させるためのデータを作成することと
を更にコンピュータに実行させるための請求項1又は2に記載のプログラム。
Inserting a blank line between the lines of the first program list or the second program list so that the lines corresponding to each other are arranged side by side when the first program list and the second program list are arranged side by side. When,
Claim 1 or claim 1 for further causing a computer to create data for displaying the first program list and the second program list side by side on the display device in which the blank line is inserted. The program described in 2.
ユーザによる操作に応じて、前記空白行を含まない前記第1プログラムリストと前記第2プログラムリストとを上下に並べて前記表示装置に表示させるためのデータを作成することを更にコンピュータに実行させるための請求項3に記載のプログラム。 In order to further cause the computer to create data for displaying the first program list and the second program list, which do not include the blank line, side by side on the display device in response to an operation by the user. The program according to claim 3. 第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと
を実行する回路を備える情報処理装置。
Acquiring the first program and
Converting the first program into a second program described in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
Creating data for displaying the first program list of the first program and the second program list of the second program with the reference numerals on the display device is executed. An information processing device equipped with a circuit.
第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと
を実行させるためのプログラムが記憶された記憶装置を備える情報処理装置。
Acquiring the first program and
Converting the first program into a second program described in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
Creating data for displaying the first program list of the first program with the reference numerals and the second program list of the second program with the reference numerals on the display device is executed. An information processing device including a storage device in which a program for storing a program is stored.
情報処理装置、通信機器、及び、プログラム入力機器を備えるシステムにより実行される情報処理方法であって、
前記プログラム入力機器により、第1プログラムを入力すること、
前記情報処理装置により、
前記プログラム入力機器により入力された前記第1プログラムを取得することと、
前記第1プログラムを、前記第1プログラムに用いられているプログラミング言語と異なるプログラミング言語で記述され、前記第1プログラムと同等の機能を果たす第2プログラムに変換することと、
前記第1プログラムと前記第2プログラムとの互いに機能的に対応する行に、対応する符号を付することと、
前記符号が付された前記第1プログラムの第1プログラムリストと前記符号が付された前記第2プログラムの第2プログラムリストとを、表示装置に表示させるためのデータを作成することと、
前記通信機器へ前記データを送信することと、
前記通信機器の表示装置により、前記データを表示することと
を含む、情報処理方法。
An information processing method executed by a system equipped with an information processing device, a communication device, and a program input device.
To input the first program by the program input device,
With the information processing device
Acquiring the first program input by the program input device and
Converting the first program into a second program described in a programming language different from the programming language used in the first program and performing the same function as the first program.
Lines that functionally correspond to each other in the first program and the second program are designated by corresponding reference numerals.
Creating data for displaying the first program list of the first program with the reference numerals and the second program list of the second program with the reference numerals on the display device.
Sending the data to the communication device and
An information processing method including displaying the data on a display device of the communication device.
JP2019069742A 2019-04-01 2019-04-01 Program for converting program, information processing apparatus, and information processing method Active JP7306026B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019069742A JP7306026B2 (en) 2019-04-01 2019-04-01 Program for converting program, information processing apparatus, and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019069742A JP7306026B2 (en) 2019-04-01 2019-04-01 Program for converting program, information processing apparatus, and information processing method

Publications (2)

Publication Number Publication Date
JP2020170221A true JP2020170221A (en) 2020-10-15
JP7306026B2 JP7306026B2 (en) 2023-07-11

Family

ID=72745933

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019069742A Active JP7306026B2 (en) 2019-04-01 2019-04-01 Program for converting program, information processing apparatus, and information processing method

Country Status (1)

Country Link
JP (1) JP7306026B2 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6275223B1 (en) * 1998-07-08 2001-08-14 Nortel Networks Limited Interactive on line code inspection process and tool
JP2003316605A (en) * 2002-04-26 2003-11-07 Fujitsu Ltd Debugger program
JP2004133630A (en) * 2002-10-09 2004-04-30 Ricoh Co Ltd Programming method, program conversion apparatus, program and storage medium
JP2005063121A (en) * 2003-08-11 2005-03-10 Ricoh Co Ltd Device, method and program for converting source code and storage medium
JP2006011756A (en) * 2004-06-24 2006-01-12 Fujitsu Ltd Program converting program, program converting device and program converting method
WO2007072652A1 (en) * 2005-12-22 2007-06-28 Syunichi Niihara Program processing pattern automatic analysis processing device
JP2008181311A (en) * 2007-01-24 2008-08-07 Toshiba Corp Refactoring support device and program
JP2013257639A (en) * 2012-06-11 2013-12-26 Ntt Data Corp Method and system of difference extraction of source code using syntax analysis
WO2017120894A1 (en) * 2016-01-15 2017-07-20 华为技术有限公司 Display method and terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6275223B1 (en) * 1998-07-08 2001-08-14 Nortel Networks Limited Interactive on line code inspection process and tool
JP2003316605A (en) * 2002-04-26 2003-11-07 Fujitsu Ltd Debugger program
JP2004133630A (en) * 2002-10-09 2004-04-30 Ricoh Co Ltd Programming method, program conversion apparatus, program and storage medium
JP2005063121A (en) * 2003-08-11 2005-03-10 Ricoh Co Ltd Device, method and program for converting source code and storage medium
JP2006011756A (en) * 2004-06-24 2006-01-12 Fujitsu Ltd Program converting program, program converting device and program converting method
WO2007072652A1 (en) * 2005-12-22 2007-06-28 Syunichi Niihara Program processing pattern automatic analysis processing device
JP2008181311A (en) * 2007-01-24 2008-08-07 Toshiba Corp Refactoring support device and program
JP2013257639A (en) * 2012-06-11 2013-12-26 Ntt Data Corp Method and system of difference extraction of source code using syntax analysis
WO2017120894A1 (en) * 2016-01-15 2017-07-20 华为技术有限公司 Display method and terminal

Also Published As

Publication number Publication date
JP7306026B2 (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN106293160B (en) Method and device for switching mouse pointers among multiple displays
US10504258B2 (en) Information processing device editing map acquired from server
JP2011204102A (en) Device, method and program for processing display control
JP2013196100A (en) Drawing display device and drawing display program
CN115129278A (en) Image display control method, system, readable storage medium and electronic device
US10073667B2 (en) Multi-monitor and display method for multi-monitor
JP4971226B2 (en) Design support device
JP7306026B2 (en) Program for converting program, information processing apparatus, and information processing method
CN111951348A (en) Method and device for determining frame selection area and electronic equipment
JP4854797B2 (en) Programs and electronics
EP3419004B1 (en) Data processing method and data processing device
CN109308862B (en) Signal control method, control device, processing device and signal control equipment
JP6287498B2 (en) Electronic whiteboard device, electronic whiteboard input support method, and program
CN112256175B (en) Text display method, text display device, electronic equipment and computer readable storage medium
US10885685B2 (en) Electronic apparatus for drawing graphs of mathematical expressions
JP2010128567A (en) Cursor movement control method and device, and program
JP2004233711A (en) Map data construction system
JP5073608B2 (en) Image output apparatus, image output method, and program
US9990338B2 (en) Display device for controlling enlargement of displayed image data, and data processing device and non-transitory computer readable medium
JP3969301B2 (en) Graph display control device and graph display control program
JP2005165633A (en) Drawing device, drawing method, program and recording medium
JP3193929B2 (en) Image processing device
JP2020160384A (en) Display method, display device, and display program
JP2009151693A (en) Batch display image output apparatus and method, and computer program and recording medium
JP4576925B2 (en) Method and apparatus and program for batch operation of multiple map images, and storage medium storing batch operation program for multiple map images

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221214

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20230104

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230213

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: 20230530

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230612

R150 Certificate of patent or registration of utility model

Ref document number: 7306026

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150