Revision 152136340 of "Glagol" on enwiki

'''Glagol''' ([[Russian language|Russian]] ''Глагол'', "verb") is a programming language based on [[Russian language|Russian]] syntax. It is strongly reminiscent of [[Oberon programming language|Oberon]] and [[Pascal programming language|Pascal]]. The language is the subject of serious academic study and is under active development. The complete distribution includes, along with the compiler, a set of mathematical and system libraries, games and applications with source code attached.

== Features ==
* Usage of Russian keyword is believed to make language easier to understand. These keywords are often different from those usually used to describe programming languages but they are closer to everyday speech.
* Language is based on [[Oberon (programming language)|Oberon]] and therefore almost all the features of this language are present.
* There is big support for console programmes, which are widely used in education. All strings are automatically converted into OEM encoding with output procedures.
* There is a simple console GUI present.
* Debugging is possible (using Microsoft Visual Studio).

== Problems ==
* Console output. All existing functions use console output, and simple GUI is also console. It is still possible to use pure Windows API though.
* No [[Unicode]] support. All programmes are forced to use Windows-1251 (Windows Cyrillic) encoding, which is automatically translated into cp866 (aternative DOS cyrillic) codepage used in console by output functions.
* Lack of modern GUI. Supplied IDE (Оболочка) is too simple for serious use. Use of [[FAR manager]] and batch command file Построить.bat is suggested for the program compilation. It is also possible to use Microsoft Visual Studio as a GUI, but debugging is the only supported advanced feature there.
* Typing texts can sometimes require switching between different keyboard layouts because not all Russian keyboard layouts contain characters []<>{}|# that are used in Glagol (the one used in Windows 98 does use Alt key for this, the one used in Windows XP doesn’t and Alt key is used for inserting characters by their number instead). Using of modern IDE can be a solution to this problem.
Of course, these problems can be eliminated as the compiler development goes on.


== Terminology ==
Terminology, used in Glagol, is defferent from the one used to describe most programming languages. While being closer to everyday speech, it may confuse those who want to learn Glagol already knowing other programming language.
{| class="wikitable"
|-valign="top"
! Glagol term
! Direct translation
! Traditional term
! English term
|-valign="top"
| вид (vid)
| kind
| тип (tip)
| type
|-valign="top"
|данное (dannoye)||datum||переменная (peremennaya)||variable
|-valign="top"
|действие (deystviye)||action||операция (operatsiya)||operation
|-valign="top"
|доступ (dostup)||access||указатель (ukazatel')||pointer
|-valign="top"
|задача (zadacha)
|task
|процедура (protsedura), функция (funktsiya)
|procedure, function
|-valign="top"
|ключ (klyuch)
|key
|логическая переченная (logical variable)
|boolean variable
|-valign="top"
|набор (nabor)
|set, collection
|запись (zapis'), структура (struktura), объект (ob`yekt), класс (klass)
|record, structure, object, class
|-valign="top"
|название (nazvaniye)
|name
|идентификатор (identifikator)
|identifier
|-valign="top"
|отдел (otdyel)	
|section
|модуль (modul')
|unit, module
|-valign="top"
|пояснение (poyasneniye)
|explanation
|комментарий (kommentariy)
|comment
|-valign="top"
|преобразователь (preoprazovatel')
|transformator
|компилятор (kompilyator)
|compiler
|-valign="top"
|приёмник (priyomnik)
|reciever
|параметр (parametr)
|parameter
|-valign="top"
|ряд (ryad)
|row
|массив (massiv)
|array
|-valign="top"
|тексторез (tekstorez)
|text cutter
|препроцессор (preprotsessor)
|prepocessor
|-valign="top"
|уборка памяти (uborka pamyati)
|memory cleanup	
|сборка мусора (sborka musora)
|grabage collection
|-valign="top"
|указание (ukazaniye)
|instruction
|оператор (operator)
|operator
|-valign="top"
|цепочка (tsepochka)
|(small) chain
|строка (stroka)
|string
|}

==Example of the program on Glagol==
«[[hello world program|Hello world]]»:
  <font color="#0000BB">ОТДЕЛ</font> <font color="#007700">Привет+</font><font color="#0000BB">;</font>
  
  <font color="#0000BB">ИСПОЛЬЗУЕТ</font> <font color="#007700">Вывод</font> <font color="#0000BB">ИЗ</font> <font color="#DD0000">"...\Отделы\Обмен\"</font><font color="#0000BB">;</font>
  
  <font color="#0000BB">УКАЗ</font>
    <font color="#007700">Вывод<font color="#0000BB">.</font>Цепь</font><font color="#0000BB">(</font><font color="#DD0000">"Здравствуй, мир!"</font><font color="#0000BB">)</font>
  
  <font color="#0000BB">КОН</font> <font color="#007700">Привет</font><font color="#0000BB">.</font>

==External links==
* [http://glagol.nad.ru/ Official site of the programming language Glagol]
* [http://rus.jino-net.ru/index.php?c=7 Independent forum about programming on Glagol]


{{compu-lang-stub}}

[[Category:Programming languages]]
[[Category:Non-English-based programming languages]]
[[Category:Pascal programming language family]]
[[Category:Procedural programming languages]]
[[Category:Imperative programming languages]]

[[cs:Glagol]]
[[ru:Глагол (язык программирования)]]