Code Editor

Aus ExpeccoWiki

Wechseln zu: Navigation, Suche
Code Editor

The code editor is used to view and edit the source code of an elementary block. It can be found on the "Code" tab after selecting an elementary block block in the navigation tree.

To the right, you see an example for some code in the editor.


The editor consists of a drop down list item on top, and the code area, which covers the rest of the editor's space. The code input area is a regular text editor which also provides syntax coloring.

The drop down list displays the programming language which is adjusted for the block. You can choose a different language from the drop down, which will cause the system to try converting the given code to the newly adjusted language. When converting, also the icon of the block in the navigation tree will change accordingly.

When a elementary block is created, the code is preset with some initial lines. These consist of the execution function body, a comment block that gives advice how to access the input and output values, and a transcript command that prints a standard output message to the transcript.

Usually, you will cut out the comment block and the transcript command, and replace it by your own code. The function body delimiters can be left as they are, removing them does not make sense because they are needed for execution. When you fill in your code, the just-in-time parsing of the system will provide syntax coloring, so you can discover errors and typos already at editing time.

The expecco API provides appropriate method calls for JavaScript and Smalltalk.



For other editors see: Editors

The full online documentation can be found under: Online Documentation

Meine Werkzeuge