Your first code in Scol¶
Each Scol code runs in the virtual machine (VM), as Java or Python. Except for a few cases, an unique source code should be made for all platforms. The VM, specific at each operating system, will translate (load the source and create the byte-code) in a transparent way for you.
To develop a Scol application, you must write :
- a script : it loads the packages and launches one (or several) functions to run the application;
- packages : one or several thousands source files.
When you develop an application, you should activate the log file and the console. For that, launch Scol, click on the Scol icon and choose "Settings". Go to the "Maintenance" item : select "All" in the combo box. Restart Scol.
In this first tutorial, we simply create a script without package. Open your favorite text editor and create a new document. Write this :
_showconsole _fooS "Scol is a fantastic language !" _fooS "Thank you to its developers" _fooS "Obi-Wan Kenobi. You're not our only hope !!" _fooS "Now, you can close this window to exit"
In a script, a small part of the apis is available.
_showconsole displays the Scol console on the screen.
_fooS write a string in the application log file and in the Scol console (if it is displayed).
Next, save the document (first_code.scol by example) and launch it !
Note : the source code can be donwloaded from the repository
License : CC-BY-SA 2.0
Tutorial by iri
Updated by /
Updated by iri about 12 years ago · 1 revisions