JP7503737B2 - Program, terminal device and method - Google Patents

Program, terminal device and method Download PDF

Info

Publication number
JP7503737B2
JP7503737B2 JP2020046367A JP2020046367A JP7503737B2 JP 7503737 B2 JP7503737 B2 JP 7503737B2 JP 2020046367 A JP2020046367 A JP 2020046367A JP 2020046367 A JP2020046367 A JP 2020046367A JP 7503737 B2 JP7503737 B2 JP 7503737B2
Authority
JP
Japan
Prior art keywords
specific code
code
cursor
program
line
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
JP2020046367A
Other languages
Japanese (ja)
Other versions
JP2021149274A (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.)
Mixi Inc
Original Assignee
Mixi Inc
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 Mixi Inc filed Critical Mixi Inc
Priority to JP2020046367A priority Critical patent/JP7503737B2/en
Publication of JP2021149274A publication Critical patent/JP2021149274A/en
Application granted granted Critical
Publication of JP7503737B2 publication Critical patent/JP7503737B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、プログラム、端末装置及び方法に関する。 The present invention relates to a program, a terminal device, and a method.

近年、初等中等教育段階におけるプログラミング教育の推進について検討が進められている。また、このようなプログラミング教育を支援するシステムの検討も進められている。例えば、特許文献1では、ユーザが作成したプログラムコードの分析結果に基づいて、ユーザが間違いやすいソースコードに対するアドバイスを提示するシステムが記載されている。 In recent years, there has been much discussion about promoting programming education at the primary and secondary education levels. Systems to support such programming education are also being considered. For example, Patent Document 1 describes a system that provides advice on source code that is likely to cause user errors, based on the results of an analysis of program code created by the user.

特開2019-039971号公報JP 2019-039971 A

ところで、端末装置(例えば、パーソナルコンピュータ、キーボード、タブレット端末等)の操作等に対するユーザの習熟度は様々であるため、習熟度の低いユーザによる端末装置の操作負担が大きいという問題点がある。例えば、プログラミング教育を行う場合、端末装置に対する習熟度が低いユーザは、端末装置の表示画面においてカーソルを適切なプログラムコード内の位置に移動させるのに困難が伴う場合が多い。 However, since users have different levels of proficiency in operating terminal devices (e.g., personal computers, keyboards, tablet devices, etc.), there is a problem in that users with low proficiency place a heavy burden on operating the terminal device. For example, when providing programming education, users with low proficiency in terminal devices often have difficulty moving the cursor to the appropriate position in the program code on the display screen of the terminal device.

そこで、本発明は、ユーザによる端末装置の操作負担を軽減可能な技術を提供することを目的とする。 The present invention aims to provide a technology that can reduce the burden on users when operating terminal devices.

本発明の一態様に係るプログラムは、ユーザが操作する端末装置を制御するプログラムであって、前記ユーザによって編集されるプログラムコードを表示部に表示し、前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付け、前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入し、前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記プログラムコードに対する前記特定のコードの挿入後の前記カーソルの位置を移動させる。 A program according to one aspect of the present invention is a program for controlling a terminal device operated by a user, which displays program code edited by the user on a display unit, accepts a request from the user to insert specific code into the program code, inserts the specific code into the program code in response to the insertion request, and moves the position of the cursor after the specific code is inserted into the program code based on designation information that specifies the position of the cursor after the specific code is inserted.

本発明によれば、ユーザによる端末装置の操作負担を軽減可能な技術を提供することを目的とする。 The present invention aims to provide a technology that can reduce the burden on users when operating a terminal device.

本実施形態に係る情報処理システムの構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of a configuration of an information processing system according to an embodiment of the present invention. 本実施形態に係る情報処理システムにおけるプログラムの編集画面の一例を示す図である。FIG. 11 is a diagram showing an example of a program editing screen in the information processing system according to the embodiment. 本実施形態に係る端末及びサーバのハードウェア構成例を示す図である。FIG. 2 is a diagram illustrating an example of the hardware configuration of a terminal and a server according to the embodiment. 本実施形態に係る端末の機能ブロック構成例を示す図である。FIG. 2 is a diagram illustrating an example of a functional block configuration of a terminal according to the present embodiment. 本実施形態に係るカーソル位置の制御の一例を示す図である。6A to 6C are diagrams illustrating an example of control of a cursor position according to the embodiment. 本実施形態に係る特定のコードの挿入制御の一例を示す図である。11A and 11B are diagrams illustrating an example of a specific code insertion control according to the embodiment. 本実施形態に係る特定のコードの挿入制御の他の例を示す図である。13A to 13C are diagrams illustrating another example of the insertion control of a specific code according to the embodiment. 本実施形態に係るカーソル位置の制御手順の一例を示すフローチャートである。10 is a flowchart showing an example of a control procedure for a cursor position according to the embodiment; 本実施形態に係る挿入位置の制御手順の一例を示すフローチャートである。10 is a flowchart showing an example of a control procedure for an insertion position according to the embodiment; 本実施形態に係る特定のコードの挿入制御の変更例を示す図である。13A and 13B are diagrams illustrating a modified example of the control of insertion of a specific code according to the embodiment.

添付図面を参照して、本発明の実施形態について説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 The following describes an embodiment of the present invention with reference to the attached drawings. In each drawing, the same reference numerals denote the same or similar configurations.

(システム構成)
図1は、本実施形態に係る情報処理システムの構成の一例を示す図である。図1に示す情報処理システム1は、1以上の端末10と、サーバ20とを備える。端末10及びサーバ20は、インターネットやイントラネット、無線LAN、移動通信等の通信ネットワークNを介して互いに通信可能に接続されている。端末10は、端末装置と呼ばれてもよく、サーバ20は、情報処理装置と呼ばれてもよい。
(System configuration)
Fig. 1 is a diagram showing an example of the configuration of an information processing system according to this embodiment. The information processing system 1 shown in Fig. 1 includes one or more terminals 10 and a server 20. The terminals 10 and the server 20 are connected to each other so as to be able to communicate with each other via a communication network N such as the Internet, an intranet, a wireless LAN, or mobile communication. The terminals 10 may be called terminal devices, and the server 20 may be called information processing devices.

端末10は、ユーザが利用する端末である。端末10のユーザは、例えば、プログラミング教育を受ける生徒、及び/又は、プログラミング教育を行う教師である。ユーザは、端末10を操作することで、プログラミング等の授業を受けたり、授業を行ったりことができる。端末10は、例えば、携帯電話(スマートフォンを含む)、タブレット端末、パーソナルコンピュータ等である。このように、端末10は、教育(例えば、プログラミング教育)用の端末であってもよい。 The terminal 10 is a terminal used by a user. The user of the terminal 10 is, for example, a student receiving programming education and/or a teacher providing programming education. By operating the terminal 10, the user can take or give lessons in programming or the like. The terminal 10 is, for example, a mobile phone (including a smartphone), a tablet terminal, a personal computer, etc. In this way, the terminal 10 may be a terminal for education (for example, programming education).

サーバ20は、端末10に対して、プログラミング用の各コード(例えば、関数、引数等)を提供する。サーバ20は、1又は複数の物理的なサーバ等から構成されていてもよいし、ハイパーバイザー(hypervisor)上で動作する仮想的なサーバを用いて構成されていてもよいし、クラウドサーバを用いて構成されていてもよい。サーバ20は、プログラミング用の各コードを記憶する記憶部を有していてもよい。 The server 20 provides each programming code (e.g., functions, arguments, etc.) to the terminal 10. The server 20 may be configured with one or more physical servers, or may be configured with a virtual server that operates on a hypervisor, or may be configured with a cloud server. The server 20 may have a storage unit that stores each programming code.

図1において、端末10は、プログラムコードに対する特定のコードの挿入要求を受け付けると、当該特定のコードをサーバ20から取得してもよい。例えば、端末10は、当該挿入要求を受け付けると、当該特定のコードの取得要求をサーバ20に送信し、サーバ20は、当該取得要求に応じて記憶部から検索された特定のコードを端末10に送信してもよい。当該特定のコードの取得要求は、当該特定のコードの識別情報を含んでもよい。 In FIG. 1, when the terminal 10 receives a request to insert specific code into the program code, the terminal 10 may acquire the specific code from the server 20. For example, when the terminal 10 receives the insertion request, the terminal 10 may transmit a request to acquire the specific code to the server 20, and the server 20 may transmit the specific code searched for from the memory unit in response to the acquisition request to the terminal 10. The request to acquire the specific code may include identification information of the specific code.

なお、端末10は、プログラミング用の複数のコードのセットであるコードセットを予めサーバ20から受信し、後述する記憶装置12(記憶部と呼ばれてもよい)等に記憶させておいてもよい。この場合、端末10は、プログラムコードに対する特定のコードの挿入要求を受け付けると、記憶装置12に記憶された上記コードセットから、当該挿入要求に対応する特定のコードを選択してもよい。 The terminal 10 may receive a code set, which is a set of multiple codes for programming, from the server 20 in advance and store it in the storage device 12 (which may be referred to as a storage unit) described below. In this case, when the terminal 10 receives a request to insert a specific code into the program code, it may select the specific code corresponding to the insertion request from the code set stored in the storage device 12.

図2は、本実施形態に係る情報処理システムにおけるプログラムの編集画面(editor)の一例を示す図である。図2に示すように、各端末10には、プログラムコードの編集用の画面(編集画面)と、当該プログラムコードに対して挿入される特定のコードの候補(ここでは、例えば、ExtensionCode関数、Extension2関数及び引数red)に対応するボタンが表示されてもよい。このように、特定のコードは、所定のプログラミング言語による定型文(例えば、予め定められた関数又は引数)等であってもよい。 Figure 2 is a diagram showing an example of a program editing screen (editor) in the information processing system according to this embodiment. As shown in Figure 2, each terminal 10 may display a screen for editing program code (editing screen) and buttons corresponding to candidates for specific code to be inserted into the program code (here, for example, the ExtensionCode function, the Extension2 function, and the red argument). In this way, the specific code may be a boilerplate text in a specific programming language (for example, a predetermined function or argument), etc.

図2において、ユーザが、所定のボタンをタップする場合、当該所定のボタンに対応する特定のコードがプログラムコードの編集画面内のカーソルの現在位置に挿入されてもよい。例えば、ユーザが、ExtensionCode関数に対応するボタンをタップする場合、編集画面のカーソル位置(ここでは、3行目の最初)に、ExtensionCode関数を示す特定のコード(例えば、「ExtensionCode()」)が挿入されてもよい。なお、図2は、例示にすぎず、各端末10のユーザがキーボードを用いて当該プログラムコードを編集することを妨げるものではない。また、本明細書において、タップは、押下、タッチ、クリック等と言い換えられてもよい。また、所定のボタンは、物理的なボタンであってもよいし、表示部101に表示された仮想的なボタンであってもよく、所定の領域等と呼ばれてもよい。 In FIG. 2, when a user taps a specific button, a specific code corresponding to the specific button may be inserted at the current cursor position in the program code editing screen. For example, when a user taps a button corresponding to an ExtensionCode function, a specific code indicating the ExtensionCode function (e.g., "ExtensionCode()") may be inserted at the cursor position (here, the beginning of the third line) in the editing screen. Note that FIG. 2 is merely an example and does not prevent a user of each terminal 10 from editing the program code using a keyboard. In addition, in this specification, tapping may be rephrased as pressing, touching, clicking, etc. Furthermore, the specific button may be a physical button, may be a virtual button displayed on the display unit 101, or may be called a specific area, etc.

このように、本実施形態に係る情報処理システム1では、各端末10は、ユーザによる所定の操作(例えば、所定のボタンのタップ)により、各端末10の編集画面上のプログラムコードに対する特定のコードの挿入要求を受け付け、当該挿入要求に応答して、当該特定のコードを所定位置に挿入してもよい。これにより、ユーザ自身がキーボートを用いてプログラムコードの全てを入力する必要がなく、スペルミス等を防止することができる。したがって、習熟度の低いユーザもプログラミングに親しむことができる。 In this way, in the information processing system 1 according to this embodiment, each terminal 10 may receive a request to insert specific code into the program code on the editing screen of each terminal 10 through a specific operation by the user (e.g., tapping a specific button), and in response to the insertion request, insert the specific code into a specific position. This eliminates the need for the user to input all of the program code using the keyboard, making it possible to prevent spelling errors and the like. Therefore, even users with low proficiency levels can become familiar with programming.

また、本実施形態に係る情報処理システム1では、各端末10は、特定のコードの挿入後のカーソルの位置(以下、「カーソル位置」ともいう)を指定する指定情報(例えば、後述する文字列「[CURSOR]」等)に基づいて、編集画面における特定のコードの挿入後のカーソル位置を移動させてもよい。これにより、端末10のユーザ自身が操作しなくとも、特定のコードの挿入後のカーソル位置を適切に移動させることができるので、ユーザによる端末10の操作負担を軽減できる。また、教育現場において、端末10の画面上の適切なカーソル位置をユーザに移動させる必要がないので、習熟度の低いユーザを指導する教師の指導負担を軽減できる。 In addition, in the information processing system 1 according to this embodiment, each terminal 10 may move the cursor position on the editing screen after a specific code is inserted based on designation information (such as the character string "[CURSOR]" described below) that specifies the position of the cursor after the specific code is inserted (hereinafter also referred to as the "cursor position"). This allows the cursor position after the specific code is inserted to be moved appropriately without the user of the terminal 10 operating it themselves, thereby reducing the burden on the user to operate the terminal 10. Also, in educational settings, since there is no need for the user to move the cursor to an appropriate position on the screen of the terminal 10, the teaching burden on teachers instructing users with low proficiency can be reduced.

また、一般的な端末において特定のコードを挿入する場合、当該特定のコードの挿入前のカーソル位置(例えば、図2では、3行目の最初)に特定のコードが挿入される。一方、挿入前のカーソル位置が適切ではない場合(例えば、図2の2行目のSampleProgram2の途中等)、当該カーソル位置における特定のコードの挿入によりプログラムコード全体が破壊され、実行できなくなる恐れがある。 Furthermore, when inserting specific code on a general terminal, the specific code is inserted at the cursor position before the insertion of the specific code (for example, at the beginning of the third line in Figure 2). On the other hand, if the cursor position before the insertion is not appropriate (for example, in the middle of SampleProgram2 on the second line in Figure 2), the insertion of the specific code at that cursor position may destroy the entire program code, making it unable to be executed.

そこで、本実施形態に係る情報処理システム1では、各端末10は、特定のコードの挿入前のカーソル位置及び当該特定のコードの種別(例えば、関数又は引数等)の少なくとも一つに基づいて、当該特定のコードの挿入位置を制御してもよい。これにより、当該特定のコードの挿入位置を制御できるので、誤った位置に特定のコードが挿入されるのを防止でき、習熟度の低いユーザを指導する教師の指導負担を軽減できる。 Therefore, in the information processing system 1 according to this embodiment, each terminal 10 may control the insertion position of the specific code based on at least one of the cursor position before the insertion of the specific code and the type of the specific code (e.g., function or argument, etc.). This allows the insertion position of the specific code to be controlled, preventing the specific code from being inserted in an incorrect position and reducing the teaching burden on teachers who instruct users with low proficiency.

(ハードウェア構成)
図3は、本実施形態に係る端末及びサーバのハードウェア構成例を示す図である。端末10及びサーバ20は、それぞれ、CPU(Central Processing Unit)、GPU(Graphical processing unit)等のプロセッサ11、メモリ、HDD(Hard Disk Drive)及び/又はSSD(Solid State Drive)等の記憶装置12、有線又は無線通信を行う通信IF(Interface)13、入力操作を受け付ける入力デバイス14、及び情報の出力を行う出力デバイス15を有する。入力デバイス14は、例えば、キーボード、タッチパネル、マウス及び/又はマイク等である。出力デバイス15は、例えば、ディスプレイ及び/又はスピーカ等である。
(Hardware configuration)
3 is a diagram showing an example of the hardware configuration of the terminal and the server according to the present embodiment. The terminal 10 and the server 20 each have a processor 11 such as a central processing unit (CPU) or a graphical processing unit (GPU), a storage device 12 such as a memory, a hard disk drive (HDD) and/or a solid state drive (SSD), a communication interface (IF) 13 for wired or wireless communication, an input device 14 for accepting input operations, and an output device 15 for outputting information. The input device 14 is, for example, a keyboard, a touch panel, a mouse, and/or a microphone. The output device 15 is, for example, a display and/or a speaker.

後述する表示部101は、出力デバイス15により実現されてもよいし、出力デバイス15に加えてプロセッサ11が記憶装置12に記憶されたプログラムを実行することにより実現されてもよい。また、後述する入力受付部102は、入力デバイス14により実現されてもよいし、入力デバイス14に加えてプロセッサ11が記憶装置12に記憶されたプログラムを実行することにより実現されてもよい。また、後述する送受信部103は、通信IF13により実現されてもよいし、通信IF13に加えてプロセッサ11が記憶装置12に記憶されたプログラムを実行することにより実現されてもよい。 The display unit 101 described below may be realized by the output device 15, or may be realized by the processor 11 executing a program stored in the storage device 12 in addition to the output device 15. The input reception unit 102 described below may be realized by the input device 14, or may be realized by the processor 11 executing a program stored in the storage device 12 in addition to the input device 14. The transmission/reception unit 103 described below may be realized by the communication IF 13, or may be realized by the processor 11 executing a program stored in the storage device 12 in addition to the communication IF 13.

また、後述する制御部104は、端末10のプロセッサ11が、記憶装置12に記憶されたプログラムを実行することにより実現することができる。また、当該プログラムは、記憶媒体に格納することができる。当該プログラムを格納した記憶媒体は、コンピュータ読み取り可能な非一時的な記憶媒体(Non-transitory computer readable medium)であってもよい。非一時的な記憶媒体は特に限定されないが、例えば、USB(Universal Serial Bus)メモリ、又はCD-ROM(Compact Disc ROM)等の記憶媒体であってもよい。 The control unit 104, which will be described later, can be realized by the processor 11 of the terminal 10 executing a program stored in the storage device 12. The program can be stored in a storage medium. The storage medium storing the program may be a non-transitory computer readable medium. The non-transitory storage medium is not particularly limited, and may be, for example, a storage medium such as a Universal Serial Bus (USB) memory or a Compact Disc ROM (CD-ROM).

(機能ブロック構成)
図4は、本実施形態に係る端末の機能ブロック構成例を示す図である。図4に示すように、端末10は、表示部101と、入力受付部102と、送受信部103と、制御部104と、を含む。
(Function block configuration)
4 is a diagram showing an example of a functional block configuration of a terminal according to the present embodiment. As shown in FIG. 4, the terminal 10 includes a display unit 101, an input receiving unit 102, a transmitting/receiving unit 103, and a control unit 104.

表示部101は、後述する制御部104の制御に従い、プログラムの編集画面を表示する。具体的には、表示部101は、ユーザよって編集されるプログラムコードを表示してもよい。また、表示部101は、編集画面上の所定位置にカーソルを表示させてもよい。 The display unit 101 displays a program editing screen according to the control of the control unit 104 described below. Specifically, the display unit 101 may display the program code edited by the user. The display unit 101 may also display a cursor at a predetermined position on the editing screen.

入力受付部102は、端末10のユーザからの入力を受け付ける。具体的には、入力受付部102は、表示部101に表示されたプログラムコードに対する特定のコードの挿入要求をユーザから受け付けてもよい。例えば、入力受付部102は、ユーザによる所定の操作(例えば、表示部101に表示された所定ボタンのタップ等)を検出すると、当該所定の操作に対応する特定のコードの挿入要求を受け付けてもよい。 The input acceptance unit 102 accepts input from a user of the terminal 10. Specifically, the input acceptance unit 102 may accept a request from the user to insert specific code into the program code displayed on the display unit 101. For example, when the input acceptance unit 102 detects a specific operation by the user (e.g., tapping a specific button displayed on the display unit 101), the input acceptance unit 102 may accept a request to insert specific code corresponding to the specific operation.

送受信部103は、後述する制御部104の制御に従い、サーバ20との通信を行う。具体的には、送受信部103は、入力受付部102により特定のコードの挿入要求が受け付けられる場合、当該特定のコードの取得要求をサーバ20に送信し、当該サーバ20から当該特定のコードを受信してもよい。又は、送受信部103は、プログラミング用の上記コードセットを、予めサーバ20から受信してもよい。当該サーバ20から受信されたコードセットは、記憶装置12に記憶されてもよい。入力受付部102により特定のコードの挿入要求が受け付けられる場合、記憶装置12に記憶されたコードセットの中から当該特定のコードが後述する制御部104の制御等によって参照されてもよい。 The transmission/reception unit 103 communicates with the server 20 under the control of the control unit 104, which will be described later. Specifically, when the input reception unit 102 receives a request to insert a specific code, the transmission/reception unit 103 may transmit a request to acquire the specific code to the server 20 and receive the specific code from the server 20. Alternatively, the transmission/reception unit 103 may receive the above-mentioned code set for programming from the server 20 in advance. The code set received from the server 20 may be stored in the storage device 12. When the input reception unit 102 receives a request to insert a specific code, the specific code may be referenced from the code set stored in the storage device 12 under the control of the control unit 104, which will be described later, or the like.

制御部104は、端末10における種々の処理(例えば、表示部101による表示、送受信部103による送信、受信等)を制御する。制御部104は、カーソル制御部104A及び挿入制御部104Bの少なくとも一つを備えてもよい。 The control unit 104 controls various processes in the terminal 10 (e.g., display by the display unit 101, transmission and reception by the transmission/reception unit 103, etc.). The control unit 104 may include at least one of a cursor control unit 104A and an insertion control unit 104B.

カーソル制御部104Aは、表示部101に表示されるカーソルの位置を制御する。具体的には、カーソル制御部104Aは、特定のコードの挿入後のカーソル位置を指定する情報(以下、「指定情報」ともいう)に基づいて、当該特定のコードの挿入後のカーソル位置を移動させる。 The cursor control unit 104A controls the position of the cursor displayed on the display unit 101. Specifically, the cursor control unit 104A moves the cursor position after a specific code is inserted based on information that specifies the cursor position after the specific code is inserted (hereinafter, also referred to as "specified information").

ここで、指定情報は、特定のコードの挿入後のカーソルの相対位置又は絶対位置を指定してもよい。当該指定情報は、挿入対象の特定のコードに埋め込まれてもよいし、当該特定のコードに付加されてもよいし、又は、当該特定のコードとは別に管理されてもよい。 The designation information may designate the relative or absolute position of the cursor after the specific code is inserted. The designation information may be embedded in the specific code to be inserted, may be added to the specific code, or may be managed separately from the specific code.

例えば、上記相対位置を指定する指定情報は、当該特定のコード内の埋め込まれた所定の要素であってもよく、当該所定の要素の位置が上記挿入後のカーソル位置と等しくともよい。当該所定の要素は、文字列、数字等どのような要素であってもよい。当該相対位置を指定する指定情報は、特定のコード内の何行目及び/又は何列目(何文字目)かを示す情報であってもよい。一方、上記絶対値を指定する指定情報は、例えば、編集画面における何行目及び/又は何列目(何文字目)かを示す情報であってもよい。 For example, the designation information specifying the relative position may be a predetermined element embedded in the specific code, and the position of the predetermined element may be equal to the cursor position after the insertion. The predetermined element may be any element, such as a character string or a number. The designation information specifying the relative position may be information indicating a line and/or a column (character) in the specific code. On the other hand, the designation information specifying the absolute value may be information indicating a line and/or a column (character) on an editing screen, for example.

図5は、本実施形態に係るカーソル位置の制御の一例を示す図である。図5(a)及び(b)では、上記指定情報は、例えば、挿入対象の特定のコード内に埋め込まれた文字列「[CURSOR]」であるものとするが、上記の通りこれに限られない。また、図5(a)及び(b)では、特定のコードの挿入前のカーソル位置に特定のコードが挿入されるものとするが、後述するように、特定のコードの挿入位置はこれに限られない。 Figure 5 is a diagram showing an example of cursor position control according to this embodiment. In Figures 5(a) and (b), the above-mentioned specification information is, for example, the character string "[CURSOR]" embedded in the specific code to be inserted, but as described above, this is not limited to this. Also, in Figures 5(a) and (b), the specific code is inserted at the cursor position before the insertion of the specific code, but as described below, the insertion position of the specific code is not limited to this.

図5(a)及び(b)に示すように、カーソル制御部104Aは、指定情報が示す位置(すなわち、当該特定のコードに埋め込まれた文字列「[CURSOR]」の位置)に特定のコードの挿入後のカーソルを移動させてもよい。このとき、挿入制御部104Bは、当該指定情報(すなわち、特定のコードに埋め込まれた文字列「[CURSOR]」)を削除したコードを、表示部101に表示させてもよい。 As shown in Figures 5(a) and (b), the cursor control unit 104A may move the cursor after the specific code is inserted to the position indicated by the designation information (i.e., the position of the character string "[CURSOR]" embedded in the specific code). At this time, the insertion control unit 104B may display the code from which the designation information (i.e., the character string "[CURSOR]" embedded in the specific code) has been deleted on the display unit 101.

例えば、図5(a)では、ExtensionCode関数の引数の入力位置に文字列「[CURSOR]」が埋め込まれている。このため、カーソル制御部104Aは、当該ExtensionCode関数を挿入後のカーソル位置を、当該文字列「[CURSOR]」の埋め込み位置に移動させてもよい。また、挿入制御部104Bは、当該ExtensionCode関数内に埋め込まれた文字列「[CURSOR]」を削除したコード「ExtensionCode()」を表示部101に表示させてもよい。 For example, in FIG. 5(a), the character string "[CURSOR]" is embedded in the input position of the argument of the ExtensionCode function. Therefore, the cursor control unit 104A may move the cursor position after inserting the ExtensionCode function to the embedded position of the character string "[CURSOR]". Furthermore, the insertion control unit 104B may cause the display unit 101 to display the code "ExtensionCode()" with the character string "[CURSOR]" embedded in the ExtensionCode function deleted.

また、図5(b)では、Extension関数(「function Extension()」)の引数の入力位置内で改行して文字列「[CURSOR]」が埋め込まれている。このため、カーソル制御部104Aは、当該Extension関数を挿入後のカーソル位置を、当該文字列「[CURSOR]」の埋め込み位置に移動させてもよい。また、挿入制御部104Bは、当該Extension関数内に埋め込まれた文字列「[CURSOR]」を削除したコード「function Extension()」を表示部101に表示させてもよい。 In addition, in FIG. 5B, the character string "[CURSOR]" is embedded at the input position of the argument of the Extension function ("function Extension()") after a line break. Therefore, the cursor control unit 104A may move the cursor position after inserting the Extension function to the embedded position of the character string "[CURSOR]". Furthermore, the insertion control unit 104B may display on the display unit 101 the code "function Extension()" with the character string "[CURSOR]" embedded in the Extension function deleted.

挿入制御部104Bは、表示部101に表示されたプログラムコードに対する特定のコードの挿入を制御してもよい。具体的には、挿入制御部104Bは、入力受付部102で受け付けられた挿入要求に応答して、表示部101に表示されたプログラムコードに対して特定のコードを挿入してもよい。 The insertion control unit 104B may control the insertion of specific code into the program code displayed on the display unit 101. Specifically, the insertion control unit 104B may insert specific code into the program code displayed on the display unit 101 in response to an insertion request accepted by the input accepting unit 102.

また、挿入制御部104Bは、当該特定のコードの挿入前のカーソル位置及び当該特定のコードの種別の少なくとも一つに基づいて、当該特定のコードの挿入位置を制御してもよい。具体的には、当該特定のコードの挿入前のカーソル位置及び当該特定のコードの種別の少なくとも一つに基づいて、以下の(1)~(4)の少なくとも一つの方法により、特定のコードを挿入してもよい。
(1)挿入前のカーソル位置を含む行の先頭又は末尾で改行して特定のコードを挿入
(2)挿入前のカーソル位置に特定のコードを挿入
(3)挿入前のカーソル位置を含む関数の先頭、末尾又は引数の入力位置で改行して特定のコードを挿入
(4)挿入前のカーソル位置を含む関数の引数の入力位置に特定のコードを挿入
Furthermore, the insertion control unit 104B may control the insertion position of the specific code based on at least one of the cursor position before the insertion of the specific code and the type of the specific code. Specifically, the specific code may be inserted by at least one of the following methods (1) to (4) based on at least one of the cursor position before the insertion of the specific code and the type of the specific code.
(1) Insert specific code at the beginning or end of the line including the cursor position before insertion, and then start a new line. (2) Insert specific code at the cursor position before insertion. (3) Insert specific code at the beginning, end, or argument input position of a function including the cursor position before insertion, and then start a new line. (4) Insert specific code at the argument input position of a function including the cursor position before insertion.

図6は、本実施形態に係る特定のコードの挿入制御の一例を示す図である。図6(a)及び(b)では、挿入対象の特定のコードの種別が関数(ここでは、ExtensionCode関数及びExtension2関数)である場合の上記方法(1)の一例が示される。一方、図6(c)では、挿入対象の特定のコードの種別が引数(ここでは、red)である場合の上記方法(2)の一例が示される。 Figure 6 is a diagram showing an example of specific code insertion control according to this embodiment. Figures 6(a) and (b) show an example of the above method (1) when the type of specific code to be inserted is a function (here, an ExtensionCode function and an Extension2 function). Meanwhile, Figure 6(c) shows an example of the above method (2) when the type of specific code to be inserted is an argument (here, red).

図6(a)に示すように、特定のコードの挿入前のカーソル位置が当該挿入前のカーソル位置を含む行の先頭である場合、挿入制御部104Bは、当該先頭で改行して特定のコードを挿入してもよい。例えば、図6(a)では、挿入前のカーソル位置が1行目の先頭であり、挿入対象の特定のコードがExtensionCode関数及びExtension2関数である。このため、1行目の先頭での改行によりExtensionCode関数及びExtension2関数が1行目及び2行目に挿入され、元の1、2行目のSampleProgram関数が3、4行目に移動される。 As shown in FIG. 6(a), if the cursor position before the insertion of the specific code is the beginning of the line that contains the cursor position before the insertion, the insertion control unit 104B may insert a line break at that beginning and insert the specific code. For example, in FIG. 6(a), the cursor position before the insertion is the beginning of the first line, and the specific code to be inserted is the ExtensionCode function and the Extension2 function. Therefore, by inserting a line break at the beginning of the first line, the ExtensionCode function and the Extension2 function are inserted into the first and second lines, and the SampleProgram functions originally on the first and second lines are moved to the third and fourth lines.

図6(b)に示すように、特定のコードの挿入前のカーソル位置が当該挿入前のカーソル位置を含む行の先頭以外である(例えば、途中又は末尾である)場合、挿入制御部104Bは、当該特定のコードの種別が関数であるなら、当該行の末尾で改行して当該特定のコードを挿入してもよい。例えば、図6(b)では、挿入前のカーソル位置が1行目の先頭以外であり、挿入対象の特定のコードがExtensionCode関数及びExtension2関数である。このため、1行目の末尾での改行によりExtensionCode関数及びExtension2関数が2行目及び3行目に挿入され、元の2行目のSampleProgram関数が4行目に移動される。 As shown in FIG. 6(b), if the cursor position before the insertion of specific code is other than the beginning of the line containing the cursor position before the insertion (for example, in the middle or at the end), the insertion control unit 104B may insert the specific code by starting a new line at the end of the line if the type of the specific code is a function. For example, in FIG. 6(b), the cursor position before the insertion is other than the beginning of the first line, and the specific code to be inserted is the ExtensionCode function and the Extension2 function. Therefore, the line break at the end of the first line inserts the ExtensionCode function and the Extension2 function into the second and third lines, and the SampleProgram function originally on the second line is moved to the fourth line.

一方、図6(c)に示すように、特定のコードの挿入前のカーソル位置が当該挿入前のカーソル位置を含む行の先頭以外である(例えば、途中又は末尾である)場合、挿入制御部104Bは、挿入する特定のコードの種別が引数であるなら、改行なしで当該挿入前のカーソル位置に当該特定のコードを挿入してもよい。例えば、図6(c)では、挿入前のカーソル位置が1行目の先頭以外であり、挿入対象の特定のコードが引数「red」である。このため、挿入前のカーソル位置にそのままredが挿入される。 On the other hand, as shown in FIG. 6(c), if the cursor position before the insertion of the specific code is other than the beginning of the line containing the cursor position before the insertion (for example, in the middle or at the end), the insertion control unit 104B may insert the specific code at the cursor position before the insertion without a line break if the type of the specific code to be inserted is an argument. For example, in FIG. 6(c), the cursor position before the insertion is other than the beginning of the first line, and the specific code to be inserted is the argument "red". Therefore, red is inserted directly at the cursor position before the insertion.

このように、挿入制御部104Bは、当該特定のコードの種別(例えば、関数又は引数等)に基づいて、当該特定のコードを挿入する際に所定位置での改行の有無を判断してもよい。具体的には、挿入制御部104Bは、特定のコードの種別が関数なら所定位置で改行してから当該特定のコードを挿入してもよい(図6(a)及び(b)参照)。一方、挿入制御部104Bは、特定のコードの種別が引数なら所定位置での改行無しに当該特定のコードを挿入してもよい(図6(c)参照)。 In this way, the insertion control unit 104B may determine whether or not to insert a line break at a predetermined position when inserting the specific code based on the type of the specific code (e.g., function or argument, etc.). Specifically, if the type of the specific code is a function, the insertion control unit 104B may insert a line break at a predetermined position before inserting the specific code (see Figures 6(a) and (b)). On the other hand, if the type of the specific code is an argument, the insertion control unit 104B may insert the specific code without a line break at the predetermined position (see Figure 6(c)).

また、挿入制御部104Bは、種別が関数である特定のコードを挿入する場合、当該特定のコードの挿入前のカーソル位置に基づいて、当該改行の位置を決定してもよい。具体的には、挿入制御部104Bは、当該挿入前のカーソル位置が当該カーソル位置を含む行又は関数の先頭であるなら、当該先頭で改行してもよい(図6(a)参照)。一方、挿入制御部104Bは、当該挿入前のカーソル位置が当該カーソル位置を含む行又は関数の先頭以外であるなら、当該行又は関数の末尾で改行してもよい(図6(b)参照)。 When inserting specific code whose type is a function, the insertion control unit 104B may determine the position of the line break based on the cursor position before the insertion of the specific code. Specifically, if the cursor position before the insertion is at the beginning of the line or function that contains the cursor position, the insertion control unit 104B may break the line at the beginning (see FIG. 6(a)). On the other hand, if the cursor position before the insertion is other than the beginning of the line or function that contains the cursor position, the insertion control unit 104B may break the line at the end of the line or function (see FIG. 6(b)).

一方、挿入制御部104Bは、種別が引数である特定のコードを挿入する場合、当該特定のコードの挿入前のカーソル位置に基づいて、当該特定のコードの挿入位置を決定してもよい(図6(c)参照)。 On the other hand, when inserting a specific code whose type is an argument, the insertion control unit 104B may determine the insertion position of the specific code based on the cursor position before the insertion of the specific code (see FIG. 6(c)).

図7は、本実施形態に係る端末における特定のコードの挿入制御の他の例を示す図である。図7(a)では、挿入対象の特定のコードの種別が引数(ここでは、red)である場合の上記方法(3)の一例が示される。図7(b)では、挿入対象の特定のコードの種別が引数(ここでは、red)である場合の上記方法(4)の一例が示される。 Figure 7 shows another example of control of the insertion of a specific code in a terminal according to this embodiment. Figure 7(a) shows an example of the above method (3) when the type of the specific code to be inserted is an argument (here, red). Figure 7(b) shows an example of the above method (4) when the type of the specific code to be inserted is an argument (here, red).

図7(a)に示すように、挿入制御部104Bは、種別が引数である特定のコードを挿入する場合であっても、挿入制御部104Bは、改行してから当該特定のコードを挿入してもよい。この場合、挿入制御部104Bは、当該特定のコードの挿入前のカーソル位置に基づいて当該改行の位置を決定してもよいし、又は、挿入前のカーソル位置に関係なく、当該カーソル位置を含む関数の引数の入力位置に、当該特定のコードを入力してもよい。 As shown in FIG. 7(a), even when inserting specific code whose type is an argument, the insertion control unit 104B may insert a line break before inserting the specific code. In this case, the insertion control unit 104B may determine the position of the line break based on the cursor position before the insertion of the specific code, or may input the specific code into the input position of the argument of the function that includes the cursor position, regardless of the cursor position before the insertion.

例えば、図7(a)では、挿入制御部104Bは、種別が引数である特定のコードを挿入する場合、当該特定のコードのカーソル位置がSampleProgram関数の引数の入力位置になくとも、当該引数の入力位置で改行して、当該特定のコードを挿入し、更に改行する。 For example, in FIG. 7(a), when inserting specific code whose type is an argument, the insertion control unit 104B starts a line break at the input position of the argument, inserts the specific code, and then starts a line break again, even if the cursor position of the specific code is not at the input position of the argument of the SampleProgram function.

また、図7(b)に示すように、挿入制御部104Bは、種別が引数である特定のコードを挿入する場合、挿入前のカーソル位置が当該カーソル位置を含む関数の引数の入力位置になくとも、当該引数の入力位置に当該特定のコードを挿入してもよい。このように、挿入制御部104Bは、特定のコードの種別(ここでは、引数)に基づいて、挿入前のカーソル位置が上記関数のどの位置であるかに関係なく、当該特定のコードの挿入位置を決定してもよい。 Also, as shown in FIG. 7(b), when inserting specific code whose type is an argument, the insertion control unit 104B may insert the specific code at the input position of the argument even if the cursor position before insertion is not at the input position of the argument of the function that includes the cursor position. In this way, the insertion control unit 104B may determine the insertion position of the specific code based on the type of the specific code (argument in this case), regardless of the position of the cursor position before insertion in the function.

以上において、挿入制御部104Bは、当該特定のコードの挿入前のカーソル位置及び当該特定のコードの種別の少なくとも一つに基づいて、当該特定のコードの挿入位置を制御するものとしたが、これに限られない。例えば、挿入制御部104Bは、挿入対象の特定のコードが特定の関数であるか否かに基づいて、当該特定のコードの挿入位置を制御してもよい。 In the above, the insertion control unit 104B controls the insertion position of the specific code based on at least one of the cursor position before the insertion of the specific code and the type of the specific code, but this is not limited to the above. For example, the insertion control unit 104B may control the insertion position of the specific code based on whether the specific code to be inserted is a specific function.

以上説明した端末10の各機能ブロックは、サーバ20に実装されることとしてもよい。つまり、本実施形態で端末10が行う各種処理は、端末10に代えてサーバ20で実行されることとしてもよい。 The functional blocks of the terminal 10 described above may be implemented in the server 20. In other words, the various processes performed by the terminal 10 in this embodiment may be executed by the server 20 instead of the terminal 10.

(処理手順)
次に、情報処理システム1における処理手順について説明する。
(Processing Procedure)
Next, a processing procedure in the information processing system 1 will be described.

<カーソル位置の制御手順>
図8は、本実施形態に係るカーソル位置の制御手順の一例を示すフローチャートである。ステップS101で、入力受付部102は、表示部101に表示されたプログラムコードに対する特定のコードの挿入要求をユーザから受け付ける。
<Cursor position control procedure>
8 is a flowchart showing an example of a procedure for controlling the cursor position according to the present embodiment. In step S101, the input receiving unit 102 receives a request from a user to insert a specific code into the program code displayed on the display unit 101.

ステップS102で、カーソル制御部104Aは、ステップS101で挿入要求が受け付けられた特定のコードの挿入後のカーソル位置を指定する指定情報(例えば、図5(a)及び(b)では、当該特定のコードに埋め込まれた文字列「[CURSOR]」)を検出する。 In step S102, the cursor control unit 104A detects designation information that specifies the cursor position after insertion of the specific code for which an insertion request was accepted in step S101 (for example, in Figures 5(a) and (b) the character string "[CURSOR]" embedded in the specific code).

ステップS103で、カーソル制御部104Aは、上記挿入要求に応答して、表示部101に表示されたプログラムコードに対して特定のコードを挿入する。ステップS102で検出された指定情報が当該特定のコードに埋め込まれている場合、カーソル制御部104Aは、当該特定のコードから当該指定情報を削除して、上記プログラムコードに挿入してもよい。 In step S103, in response to the insertion request, the cursor control unit 104A inserts specific code into the program code displayed on the display unit 101. If the designation information detected in step S102 is embedded in the specific code, the cursor control unit 104A may delete the designation information from the specific code and insert it into the program code.

ステップS104で、カーソル制御部104Aは、ステップS102で検出された指定情報に基づいて、表示部101に表示されたプログラムコードに対する特定のコードの挿入後のカーソル位置を移動させる。 In step S104, the cursor control unit 104A moves the cursor position after inserting a specific code into the program code displayed on the display unit 101 based on the designation information detected in step S102.

ステップS105で、制御部104は、プログラムの編集処理を終了するか否かを判定する。編集処理を終了しない場合(ステップS105:No)、本動作は、ステップS101に戻る。 In step S105, the control unit 104 determines whether or not to end the program editing process. If the editing process is not to end (step S105: No), the operation returns to step S101.

図8に示すカーソル位置の制御手順によれば、端末10のユーザ自身が操作しなくとも、特定のコードの挿入後のカーソル位置を予め設定された適切な位置に移動させることができるので、ユーザによる端末10の操作負担を軽減できる。また、教育現場において、端末10の画面上の適切なカーソル位置をユーザに移動させる必要がないので、習熟度の低いユーザを指導する教師の指導負担を軽減できる。 According to the cursor position control procedure shown in FIG. 8, the cursor position after inserting a specific code can be moved to a preset appropriate position without the user of the terminal 10 operating it himself, thereby reducing the burden on the user to operate the terminal 10. Also, in educational settings, since there is no need for the user to move the cursor to an appropriate position on the screen of the terminal 10, the teaching burden on teachers who instruct users with low proficiency can be reduced.

<挿入位置の制御手順>
図9は、本実施形態に係る挿入位置の制御手順の一例を示すフローチャートである。なお、また、図9では、入力受付部102は、表示部101に表示されたプログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付けているものとする。
<Insertion position control procedure>
9 is a flowchart showing an example of a control procedure for an insertion position according to the present embodiment. In addition, in FIG. 9, it is assumed that the input receiving unit 102 receives a request from the user to insert a specific code into the program code displayed on the display unit 101.

ステップS201で、挿入制御部104Bは、当該特定のコードの挿入前のカーソル位置を検出する。 In step S201, the insertion control unit 104B detects the cursor position before the specific code is inserted.

ステップS202で、挿入制御部104Bは、ステップS201で検出された挿入前のカーソル位置が当該カーソル位置を含む行又は関数の先頭であるか否かを判定する。当該挿入前のカーソル位置が当該行又は関数の先頭である場合(ステップS202:Yes)、ステップS203で、挿入制御部104Bは、当該先頭で改行して特定のコードを挿入する(例えば、図6(a))。 In step S202, the insertion control unit 104B determines whether the cursor position before insertion detected in step S201 is the beginning of the line or function that contains the cursor position. If the cursor position before insertion is the beginning of the line or function (step S202: Yes), in step S203, the insertion control unit 104B starts a new line at the beginning and inserts specific code (for example, FIG. 6(a)).

一方、当該挿入前のカーソル位置が当該行又は関数の先頭ではない場合(ステップS202:No)、ステップS204で、挿入制御部104Bは、当該特定のコードの種別を判定する。当該特定のコードの種別が関数である場合(ステップS204:関数)、ステップS205で、挿入制御部104Bは、当該挿入前のカーソル位置を含む当該行又は関数の末尾で改行して当該特定のコードを挿入する(例えば、図6(b))。 On the other hand, if the cursor position before the insertion is not at the beginning of the line or function (step S202: No), in step S204, the insertion control unit 104B determines the type of the specific code. If the type of the specific code is a function (step S204: Function), in step S205, the insertion control unit 104B inserts the specific code by starting a new line at the end of the line or function that includes the cursor position before the insertion (for example, FIG. 6(b)).

当該特定のコードの種別が引数である場合(ステップS204:引数)、ステップS206で、挿入制御部104Bは、当該挿入前のカーソル位置に当該特定のコードを挿入する(例えば、図6(c))。なお、ステップS206において、挿入制御部104Bは、当該挿入前のカーソル位置を含む行又は関数の所定位置(例えば、引数の入力位置)で改行して当該特定のコードを挿入してもよい(例えば、図7(a))。或いは、ステップS206において、挿入制御部104Bは、当該挿入前のカーソル位置を含む行又は関数の所定位置(例えば、引数の入力位置)で該特定のコードを挿入してもよい(例えば、図7(b))。 If the type of the specific code is an argument (step S204: argument), in step S206, the insertion control unit 104B inserts the specific code at the cursor position before the insertion (for example, FIG. 6(c)). Note that in step S206, the insertion control unit 104B may insert the specific code by starting a new line at a predetermined position (for example, the argument input position) of the line or function including the cursor position before the insertion (for example, FIG. 7(a)). Alternatively, in step S206, the insertion control unit 104B may insert the specific code at a predetermined position (for example, the argument input position) of the line or function including the cursor position before the insertion (for example, FIG. 7(b)).

図9に示す挿入位置の制御手順によれば、端末10のユーザ自身が操作しなくとも、特定のコードを適切な位置に挿入することができるので、ユーザによる端末10の操作負担を軽減できる。また、教育現場において、特定のコードの挿入時に適切な挿入位置にカーソルを移動させる必要がないので、習熟度の低いユーザを指導する教師の指導負担を軽減できる。 According to the insertion position control procedure shown in FIG. 9, a specific code can be inserted into an appropriate position without the user of the terminal 10 operating it himself, thereby reducing the burden on the user to operate the terminal 10. Also, in educational settings, since there is no need to move the cursor to an appropriate insertion position when inserting a specific code, the teaching burden on teachers who teach users with low proficiency can be reduced.

なお、上記挿入位置の制御手順では、所定位置(例えば、行の先頭又は末尾、引数の入力位置等で)改行して特定のコードを挿入する場合、当該特定のコードは、挿入行の先頭から開始される例を説明した。例えば、図6(a)、図6(b)、図7(a)では、挿入コードは、いずれも挿入行の先頭(1文字目)から開始されている。しかしながら、特定のコードの挿入行における開始位置は、1文字目に限られず、2文字目以降であってもよい。このような、ある行におけるあるコードの開始位置は、インデントと呼ばれてもよい。特定のコードの挿入行におけるインデントは、挿入前のカーソル位置を含む行(以下、改行対象行ともいう)と同様に合わせられてもよいし、又は、予め指定されてもよい。 In the above-mentioned insertion position control procedure, when a specific code is inserted by breaking a line at a predetermined position (e.g., the beginning or end of a line, the argument input position, etc.), an example was described in which the specific code starts from the beginning of the insertion line. For example, in Figures 6(a), 6(b), and 7(a), the inserted code all starts from the beginning of the insertion line (the first character). However, the start position of the specific code on the insertion line is not limited to the first character, and may be the second character or later. Such a start position of a certain code on a certain line may be called an indent. The indent on the insertion line of the specific code may be aligned in the same way as the line containing the cursor position before insertion (hereinafter also referred to as the line to be broken), or may be specified in advance.

図10は、本実施形態に係る端末における特定のコードの挿入制御の変更例を示す図である。図10では、特定のコードの挿入行における開始位置の制御について説明する。なお、図10では、挿入前のカーソル位置が改行対象行の末尾である一例を示すが、これに限られず、どのような位置で改行をする場合にも適用可能である。 Figure 10 is a diagram showing a modified example of the control of inserting a specific code in a terminal according to this embodiment. In Figure 10, the control of the start position in the line where the specific code is inserted is explained. Note that Figure 10 shows an example in which the cursor position before insertion is at the end of the line to be broken, but this is not limited to this and can be applied to any position where a line break is to be inserted.

図10に示すように、改行対象行におけるコード(ここでは、3行目の「Example()」)の開始位置は、インデントにより、当該行の先頭ではなく所定数の文字(ここでは、2文字)を空白又はタブスペースを用いてずらした位置(ここでは、3文字目)となっている。このため、挿入制御部104Bは、当該改行対象行における開始位置に倣って、特定のコードの挿入行(ここでは、4行目及び5行目)における特定のコードの開始位置を先頭から所定数の文字だけずらした位置(ここでは、3文字目)に決定してもよい。例えば、挿入制御部104Bは、空白又はタブスペースを用いて、特定のコードの挿入行における開始位置をずらすことができる。 As shown in FIG. 10, the start position of the code in the line to be broken (here, "Example()" on the third line) is shifted a predetermined number of characters (here, two characters) using spaces or tab spaces (here, the third character) due to indentation, rather than at the beginning of the line. Therefore, the insertion control unit 104B may determine the start position of a specific code in the lines to be inserted (here, the fourth and fifth lines) to be a position shifted a predetermined number of characters from the beginning (here, the third character) following the start position in the line to be broken. For example, the insertion control unit 104B can shift the start position of the specific code in the lines to be inserted by using spaces or tab spaces.

図10に示すように、改行対象行(例えば、3行目)に倣って、特定のコードの挿入行(例えば、4及び5行目)の開始位置を制御することにより、プログラムの縦列を自動的に調整できる。このため、ユーザの操作負担を軽減しながら、プログラムを見やすくすることができる。 As shown in Figure 10, the vertical columns of a program can be automatically adjusted by controlling the start position of the line where a particular code is inserted (e.g., lines 4 and 5) based on the line to be broken (e.g., line 3). This reduces the operational burden on the user while making the program easier to read.

なお、図10では、挿入制御部104Bは、特定のコードの挿入行における開始位置を、改行対象行のコードの開始位置に基づいて調整するが、これに限られない。挿入制御部104Bは、特定のコードの挿入行における開始位置を予め指定してもよい。例えば、挿入制御部104Bは、コード挿入定型文における開始位置を予めずらしておく(例えば、所定数の文字だけ空白又はタブスペースによりずらしておく)ことにより、特定のコードの挿入行における開始位置を指定してもよい。 In FIG. 10, the insertion control unit 104B adjusts the start position of the specific code in the insertion line based on the start position of the code in the line to be broken, but this is not limited to the above. The insertion control unit 104B may specify the start position of the specific code in the insertion line in advance. For example, the insertion control unit 104B may specify the start position of the specific code in the insertion line by shifting the start position in the code insertion template in advance (for example, shifting it by a predetermined number of characters using spaces or tab spaces).

(まとめ)
以上説明した実施形態によれば、ユーザによる所定の操作(例えば、ボタンの押下又はタップ)により、編集画面上のプログラムコードに対する特定のコードの挿入要求を受け付ける端末10において、当該特定のコードの挿入後のカーソル位置及び当該特定のコードの挿入位置の少なくとも一つを適切に制御できる。したがって、ユーザによる端末10の操作負担を軽減できる。
(summary)
According to the embodiment described above, in the terminal 10 that accepts a request to insert specific code into program code on an editing screen by a predetermined operation by a user (e.g., pressing or tapping a button), at least one of the cursor position after the specific code is inserted and the insertion position of the specific code can be appropriately controlled. Therefore, the burden of operating the terminal 10 on the user can be reduced.

以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態で説明したフローチャート、シーケンス、実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The above-described embodiments are intended to facilitate understanding of the present invention, and are not intended to limit the present invention. The flow charts, sequences, elements included in the embodiments, and their arrangements, materials, conditions, shapes, sizes, etc., described in the embodiments are not limited to those exemplified, and may be modified as appropriate. In addition, configurations shown in different embodiments may be partially substituted or combined.

<付記>
<付記1>
ユーザ(生徒)が操作する端末装置を制御するプログラムであって、
前記ユーザによって編集されるプログラムコードを表示部に表示し、
前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付け、
前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入し、
前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記プログラムコードに対する前記特定のコードの挿入後の前記カーソルの位置を移動させる、
プログラム。
<Additional Notes>
<Appendix 1>
A program for controlling a terminal device operated by a user (student),
displaying the program code edited by the user on a display unit;
accepting a request from the user to insert specific code into the program code;
inserting the specific code into the program code in response to the insertion request;
moving a position of the cursor after the specific code is inserted into the program code based on designation information designating a position of the cursor after the specific code is inserted;
program.

付記1によれば、プログラムコードに対する特定のコードの挿入後のカーソルの位置を適切に移動させることができるので、ユーザによる端末装置の操作負担を軽減できる。 According to Appendix 1, the cursor position can be appropriately moved after inserting specific code into the program code, thereby reducing the burden on the user to operate the terminal device.

<付記2>
前記特定のコードは、前記指定情報を含み、
前記特定のコードから前記指定情報を削除したコードを、前記表示部に表示する
付記1に記載のプログラム。
<Appendix 2>
The specific code includes the specified information,
The program according to claim 1, further comprising: displaying, on the display unit, a code obtained by deleting the designation information from the specific code.

付記2によれば、挿入対象の特定のコード内に埋め込まれた位置情報に基づいて、当該特定のコード挿入後のカーソルの位置を簡易に指定することができる。 According to Appendix 2, the position of the cursor after inserting a specific code can be easily specified based on the position information embedded in the specific code to be inserted.

<付記3>
前記特定のコードの挿入前の前記カーソルの位置及び前記特定のコードの種別の少なくとも一つに基づいて、前記特定のコードの挿入位置を制御する、
付記1又は付記2に記載のプログラム。
<Appendix 3>
controlling an insertion position of the specific code based on at least one of a position of the cursor before the insertion of the specific code and a type of the specific code;
3. The program according to claim 1 or 2.

付記3によれば、特定のコードの挿入前のカーソルの位置及び特定のコードの種別の少なくとも一つに基づいて、当該特定のコードの挿入位置を制御できるので、誤った位置に特定のコードが挿入されるのを防止でき、ユーザによる端末装置の操作負担を軽減できる。 According to Appendix 3, the insertion position of a specific code can be controlled based on at least one of the position of the cursor before the specific code is inserted and the type of the specific code, so that it is possible to prevent the specific code from being inserted in an incorrect position and reduce the burden on the user in operating the terminal device.

<付記4>
前記特定のコードの挿入前の前記カーソルの位置及び前記特定のコードの種別の少なくとも一つに基づいて、前記位置を含む行の先頭又は末尾で改行して前記特定のコードを挿入する、前記位置に前記特定のコードを挿入する、前記位置を含む関数の先頭、末尾又は引数の入力位置で改行して前記特定のコードを挿入する、又は、前記位置を含む関数の引数の入力位置に前記特定のコードを挿入する、
付記3に記載のプログラム。
<Appendix 4>
based on at least one of the position of the cursor before insertion of the specific code and the type of the specific code, inserting the specific code at the beginning or end of a line including the position, inserting the specific code at the position, inserting the specific code at the beginning, end or input position of an argument of a function including the position, or inserting the specific code at the input position of an argument of a function including the position;
4. The program according to claim 3.

付記4によれば、挿入前のカーソルの位置及び特定のコードの種別の少なくとも一つに基づいて、特定のコードの挿入時の改行の有無と改行位置を制御できるので、当該挿入位置をより適切に決定でき、ユーザによる端末装置の操作負担を軽減できる。 According to Appendix 4, the presence or absence of a line break and the line break position when inserting a specific code can be controlled based on at least one of the position of the cursor before insertion and the type of specific code, so that the insertion position can be determined more appropriately and the burden on the user of operating the terminal device can be reduced.

<付記5>
ユーザが操作する端末装置であって、
前記ユーザによって編集されるプログラムコードを表示する表示部と、
前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付ける入力受付部と、
前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入する挿入制御部と、
前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記特定のコードの挿入後の前記プログラムコード内の前記カーソルの位置を移動させるカーソル制御部と、
を備える端末装置。
<Appendix 5>
A terminal device operated by a user,
a display unit that displays the program code edited by the user;
an input receiving unit that receives a request from the user to insert a specific code into the program code;
an insertion control unit that inserts the specific code into the program code in response to the insertion request;
a cursor control unit that moves a position of the cursor in the program code after the specific code is inserted based on designation information that designates a position of the cursor after the specific code is inserted;
A terminal device comprising:

付記5によれば、プログラムコードに対する特定のコードの挿入後のカーソルの位置を適切に移動させることができるので、ユーザによる端末装置の操作負担を軽減できる。 According to Appendix 5, the cursor position can be appropriately moved after inserting specific code into the program code, thereby reducing the burden on the user in operating the terminal device.

<付記6>
ユーザが操作する端末装置において、
前記ユーザによって編集されるプログラムコードを表示するステップと、
前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付けるステップと、
前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入するステップと、
前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記特定のコードの挿入後の前記プログラムコード内の前記カーソルの位置を移動させるステップと、
を有する方法。
<Appendix 6>
In a terminal device operated by a user,
displaying the program code to be edited by the user;
receiving a request from the user for inserting specific code into the program code;
inserting the particular code into the program code in response to the insertion request;
moving a position of the cursor in the program code after the specific code is inserted based on designation information that designates a position of the cursor after the specific code is inserted;
The method according to claim 1,

付記6によれば、プログラムコードに対する特定のコードの挿入後のカーソルの位置を適切に移動させることができるので、ユーザによる端末装置の操作負担を軽減できる。 According to Appendix 6, the cursor position can be appropriately moved after inserting specific code into the program code, thereby reducing the burden on the user to operate the terminal device.

1…情報処理システム、10…端末、20…サーバ、N…通信ネットワーク、11…プロセッサ、12…記憶装置、13…通信IF、14…入力デバイス、15…出力デバイス、20…サーバ、101…表示部、102…入力受付部、103…送受信部、104…制御部、104A…カーソル制御部、104B…挿入制御部 1...information processing system, 10...terminal, 20...server, N...communication network, 11...processor, 12...storage device, 13...communication IF, 14...input device, 15...output device, 20...server, 101...display unit, 102...input reception unit, 103...transmission/reception unit, 104...control unit, 104A...cursor control unit, 104B...insertion control unit

Claims (5)

ユーザが操作する端末装置を制御するプログラムであって、
前記ユーザによって編集されるプログラムコードを表示部に表示し、
前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付け、
前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入し、
前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記プログラムコードに対する前記特定のコードの挿入後の前記カーソルの位置を移動させ
前記特定のコードの挿入前の前記カーソルの位置及び前記特定のコードの種別に基づいて、前記特定のコードの挿入前の前記カーソルの位置を含む行、前記行の1以上前の行、及び、前記行の1以上後の行のいずれかにおける所定の位置に、前記特定のコードが挿入されるように、前記特定のコードの挿入位置を制御する、
プログラム。
A program for controlling a terminal device operated by a user,
displaying the program code edited by the user on a display unit;
accepting a request from the user to insert specific code into the program code;
inserting the specific code into the program code in response to the insertion request;
moving a position of the cursor after the specific code is inserted into the program code based on designation information designating a position of the cursor after the specific code is inserted ;
controlling an insertion position of the specific code based on the position of the cursor before the insertion of the specific code and the type of the specific code, so that the specific code is inserted at a predetermined position in any one of the line including the position of the cursor before the insertion of the specific code, one or more lines preceding the line, and one or more lines following the line;
program.
前記特定のコードは、前記指定情報を含み、
前記特定のコードから前記指定情報を削除したコードを、前記表示部に表示する
請求項1に記載のプログラム。
The specific code includes the specified information,
The program according to claim 1 , further comprising: displaying, on the display unit, a code obtained by deleting the designation information from the specific code.
前記特定のコードの挿入前の前記カーソルの位置及び前記特定のコードの種別の少なくとも一つに基づいて、前記位置を含む行の先頭又は末尾で改行して前記特定のコードを挿入する、前記位置に前記特定のコードを挿入する、前記位置を含む関数の先頭、末尾又は引数の入力位置で改行して前記特定のコードを挿入する、又は、前記位置を含む関数の引数の入力位置に前記特定のコードを挿入する、
請求項1又は請求項2に記載のプログラム。
based on at least one of the position of the cursor before insertion of the specific code and the type of the specific code, inserting the specific code at the beginning or end of a line including the position, inserting the specific code at the position, inserting the specific code at the beginning, end or input position of an argument of a function including the position, or inserting the specific code at the input position of an argument of a function including the position;
The program according to claim 1 or 2 .
ユーザが操作する端末装置であって、
前記ユーザによって編集されるプログラムコードを表示する表示部と、
前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付ける入力受付部と、
前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入する挿入制御部と、
前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記特定のコードの挿入後の前記プログラムコード内の前記カーソルの位置を移動させるカーソル
制御部と、を備え
前記制御部は、前記特定のコードの挿入前の前記カーソルの位置及び前記特定のコードの種別に基づいて、前記特定のコードの挿入前の前記カーソルの位置を含む行、前記行の1以上前の行、及び、前記行の1以上後の行のいずれかにおける所定の位置に、前記特定のコードが挿入されるように、前記特定のコードの挿入位置を制御する、
端末装置。
A terminal device operated by a user,
a display unit that displays the program code edited by the user;
an input receiving unit that receives a request from the user to insert a specific code into the program code;
an insertion control unit that inserts the specific code into the program code in response to the insertion request;
a cursor control unit that moves a position of the cursor in the program code after the specific code is inserted based on designation information that designates a position of the cursor after the specific code is inserted ,
the control unit controls an insertion position of the specific code based on the position of the cursor before the insertion of the specific code and the type of the specific code, so that the specific code is inserted at a predetermined position in any one of a line including the position of the cursor before the insertion of the specific code, one or more lines preceding the line, and one or more lines following the line.
Terminal device.
ユーザが操作する端末装置において、
前記ユーザによって編集されるプログラムコードを表示するステップと、
前記プログラムコードに対する特定のコードの挿入要求を前記ユーザから受け付けるステップと、
前記挿入要求に応答して、前記プログラムコードに対して前記特定のコードを挿入するステップと、
前記特定のコードの挿入後のカーソルの位置を指定する指定情報に基づいて、前記特定のコードの挿入後の前記プログラムコード内の前記カーソルの位置を移動させるステップ
と、
前記特定のコードの挿入前の前記カーソルの位置及び前記特定のコードの種別に基づいて、前記特定のコードの挿入前の前記カーソルの位置を含む行、前記行の1以上前の行、及び、前記行の1以上後の行のいずれかにおける所定の位置に、前記特定のコードが挿入されるように、前記特定のコードの挿入位置を制御するステップと、
を有する方法。
In a terminal device operated by a user,
displaying the program code to be edited by the user;
receiving a request from the user for inserting specific code into the program code;
inserting the particular code into the program code in response to the insertion request;
moving a position of the cursor in the program code after the specific code is inserted based on designation information that designates a position of the cursor after the specific code is inserted;
controlling an insertion position of the specific code based on the position of the cursor before the insertion of the specific code and the type of the specific code, so that the specific code is inserted at a predetermined position in any one of the line including the position of the cursor before the insertion of the specific code, one or more lines preceding the line, and one or more lines following the line;
The method according to claim 1,
JP2020046367A 2020-03-17 2020-03-17 Program, terminal device and method Active JP7503737B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020046367A JP7503737B2 (en) 2020-03-17 2020-03-17 Program, terminal device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020046367A JP7503737B2 (en) 2020-03-17 2020-03-17 Program, terminal device and method

Publications (2)

Publication Number Publication Date
JP2021149274A JP2021149274A (en) 2021-09-27
JP7503737B2 true JP7503737B2 (en) 2024-06-21

Family

ID=77848841

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020046367A Active JP7503737B2 (en) 2020-03-17 2020-03-17 Program, terminal device and method

Country Status (1)

Country Link
JP (1) JP7503737B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004258848A (en) 2003-02-25 2004-09-16 Hitachi Software Eng Co Ltd Program preparation supporting method and system and program
JP2005018458A (en) 2003-06-26 2005-01-20 Toshiba Tec Corp Programming support device and method, and programming support program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004258848A (en) 2003-02-25 2004-09-16 Hitachi Software Eng Co Ltd Program preparation supporting method and system and program
JP2005018458A (en) 2003-06-26 2005-01-20 Toshiba Tec Corp Programming support device and method, and programming support program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
大竹 智也,Atom実践入門,第1版,日本,株式会社技術評論社,2016年08月25日,pp.85-87

Also Published As

Publication number Publication date
JP2021149274A (en) 2021-09-27

Similar Documents

Publication Publication Date Title
US7743331B1 (en) Viewing and modifying content slide navigation properties
KR20020011933A (en) Reading apparatus and method using display device
CN108628939B (en) Information display device, information display method, and computer-readable storage medium
EP2613228A1 (en) Display apparatus and method of editing displayed letters in the display apparatus
JP6627217B2 (en) Text display device, learning method, and program
JP2020513589A (en) Terminal learning content display method and application program according to the method
KR102129785B1 (en) Method and apparatus to support the reading comprehension
US8810510B2 (en) Cursor display method and character input apparatus
JP7503737B2 (en) Program, terminal device and method
KR101380692B1 (en) Apparatus for on-line study and method for the same
JP2008165642A (en) Information processing system and information processor and method for controlling information processing system and method for controlling information processor and program and recording medium
US9747813B2 (en) Braille mirroring
KR20130008663A (en) Method and device for user interface
JP2002268529A (en) Learning supporting method and device and learning supporting program
KR20200009812A (en) Method and system for supporting spell checking within input interface of mobile device
EP2360673A1 (en) Text output method and apparatus
CN112487040A (en) Information processing apparatus, information processing method, and storage medium
JPH0830598A (en) Support device for learning or document preparation
WO2018101318A1 (en) Information processing device, program, and information processing method
KR102614344B1 (en) An apparatus and method for providing a plurality of mathmatics lecturing contents using dual user interface
KR102618311B1 (en) An apparatus and method for providing conversational english lecturing contents
JP7036483B1 (en) Programs, information processing equipment and information processing methods
JP7379809B2 (en) Entry content judgment device and program
US10297165B2 (en) Education support system and terminal device
JP2007018410A (en) Information processing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230124

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240220

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240415

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240523

R150 Certificate of patent or registration of utility model

Ref document number: 7503737

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150