Ezhil Programming
Ezhil Programming
Ezhil, in Tamil language script (Tamil: எழில், romanized: Eḻil, lit. 'beauty', Tamil
pronunciation: [eɻil̪ ]), is a compact, open source, interpreted, programming language,
originally designed to enable native-Tamil speaking students, K-12 age-group to
learn computer programming, and enable learning numeracy and computing, outside of
linguistic expertise in predominately English language-based computer systems.
In the Ezhil programming language, Tamil keywords and language-grammar are chosen to
easily enable the native Tamil speaker write programs in the Ezhil system. Ezhil allows easy
representation of computer program closer to the Tamil language logical constructs equivalent
to the conditional, branch and loop statements in modern English based programming
languages. Ezhil is the first freely available programming language in the Tamil language and
one of many known non-English-based programming languages. The language was officially
announced in July 2009, while it has been developed since late 2007.
Description[edit]
The syntax of Ezhil is broadly similar to that of BASIC: blocks of code are run in sequential
order, or via functions definitions, in a common control flow structures include while , and if .
The termination of function block and statement blocks should have the termination keyword,
similar to END in BASIC. Declarations are not necessary as Ezhil is a dynamic typed language,
though type conversions must be made explicitly. Ezhil has built-in types for Numbers, Strings,
Logicals and Lists.
Goals[edit]
Educational: Ezhil language is targeted toward K-12 students, and native-Tamil speakers,
to learn elementary computer science principle
Intuitive: Ezhil language syntactic sugar is arranged to allow a sentence structure closer to
the head final Tamil language, where the usual word order is SOV, in contrast to
the SVO order of English.
Features[edit]
Type system[edit]
Ezhil has four basic types, for Numbers, Strings, Logicals and Lists. It does not allow creation
of new types, being a procedural language without structures or objects.
@( CONDITION ) ஆனொல்
#True branch
இல்லை
#False branch
முடி
Loop statement[edit]
@( CONDITION ) வலர
#LOOP BODY
முடி
Operators[edit]
Standard logical operators, equality "==", inequality "!=", arithmetic comparison ">=",
"<=",">","<" are supported. Arithmetic operators like "+","-","*","/" indicate standard plus,
minus, product, division. Modulo is denoted by "%", and exponent by "^" characters.
Comments[edit]
'#' character denotes a single-line comment from the point to end-of-line. Multi-line comments
are not defined.
Function declaration[edit]
Implementations[edit]
Current Ezhil implementation[4] is tightly integrated with the Python runtime. Ezhil interpreter
is based on a readline-like CLI, while it can also be run in a batch mode. The interactive mode
consumes programs as UTF-8 encoded text and builds a tree, using a compiler front-end, to
build an AST, and executes it using the Python objects build from this AST.
Examples[edit]
Hello world[edit]
The following is a Hello world program in Ezhil:
Guessing game[edit]
The following is a guessing game with 10-chances to guess a number between [1-100].
# 10 வொய்ப்பு லை த ொடுக்
வொய்ப்பு = 0
The following is a guessing game with 10-chances to guess a number between [1-100]
File I/O[edit]
# க ொப்புப் பயன்பொடு
fp = க ொப்லப_திை( "names.txt","w")
# நொம் ஒரு பட்டியலில் இருந்து வொர்த்ல லை பயன்படுத் முடியும்
எ = ["இந் ","ஒரு","எழில்"," மிழ்","நிரைொக் ","தமொழி","உ ொரணம்"]
இ=0
@( இ < len(எ) ) வலர
# நொம் ஒவ்தவொரு வரியும் ஒரு எண் மற்றும் வொர்த்ல கசர்க் முடியும்
வரி = str(இ) +" = "+ எடு( எ, இ ) + " \n"
பதிப்பி வரி
க ொப்லப_எழுது( fp,வரி )
இ=இ+1
முடி
#கசமித்து மூட
க ொப்லப_மூடு( fp )
# பயனருக்கு ொண்பிக்
பதிப்பி வரி ள்
# க ொப்பு மூட
க ொப்லப_மூடு( fp )
# ஒரு எடிட்டர் க ொப்பு திைக் , "names.txt". emacs அல்ைது Notepad பயன்படுத் வும்.
Turtle graphics[edit]
The following is a Turtle graphics based example to draw the Yin-Yang symbols.
நிரல்பொ ம் main()
#turtle_reset()
yin(200, "white", "black")
yin(200, "black", "white")
turtle_ht()
pause( "Done! Hit enter to quit", 5)
முடி
main()