2E Programming Language 0.8.2
Sponsored Links
2E Programming Language 0.8.2 Ranking & Summary
File size:
0.031 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
1033
Date added:
2006-12-26
Publisher:
Derek Pressnall
2E Programming Language 0.8.2 description
2E Programming Language (two es, as in ee, or expression evaluator) is a simple algebraic syntax language. It natively supports expressions (composed of operators and operands), and function definitions, and basically nothing else. Therefore, it can be fairly straight-forward to learn (assuming you are already familiar with general programming constructs).
The language itself is refered to as 2e, however the interpreter is called ee.
An operand can be a literal, such as a numeric value (integer or floating point), a quoted string, a single-quoted character, a variable or a function call. Operators consist of the standard algebraic operators (i.e., *, /, +, -), assignment ("="), logical operators (<, >, <= >=, ==), sub-expression join operator (";"), and a conditional operator pair ("? :") like in C. Also added, is an iterative conditional pair ("?? :").
Heres a couple of examples:
ee -p 2 + 3 * 7
23
In this case, when called with the "-p" flag, the next parameter is evaluated and the final result printed. The "-c" flag does the same thing, but doesnt print the final result (use this when the expression already contains output statements).
ee -c x = 7; y = 11; z = (x * y); print(z; "n")
77
The ";" operator isnt really a statement terminator, it is actually a join operator. It evaluates the left and right expressions, and returns the result of the right hand side. It has the lowest order of precedence, so in general use you can treat it like a statement terminator (however it can be used in the middle of a larger expression, such as within parentheses grouping). It also does double-duty as a function parameter delimeter, such as the print function in the previous example.
The way that the "?" (conditoinal) operator works is as follows:
result = expr_test ? expr_true : expr_false
If expr_test is true (non-zero), then expr_true is evaluated and returned, otherwise expr_false is evaluated and returned. This is just like the inline conditional in C.
Also supported, is the iterative conditional:
result = expr_test ?? expr_true : expr_false
This will evaluate expr_test repeatedly, and as long as it is true, will evaluate expr_true. Once expr_test becomes false, then the final expr_true value is returned as the result of the whole expression. However, if expr_test never was true to begin with, then and only then is expr_false evaluated and returned. Therefore, expr_false can be used for some error handling, for example.
If an operator of lower precedence than ? or ?? is encounterd such as the ";" (join) operator, then a default false target will automatically be assumed. Therefore,
result = expr_test ? expr_true : 0; ...
result = expr_test ? expr_true; ...
are both the same. Heres a more extensive example, highlighting a few more of the operands avaliable. This example also calls the interpreter using the unix "#!" syntax, same as what is used for other scripting languages.
#!/usr/local/bin/ee
# This is a comment
i = 0;
x = 0;
i < 10 ?? ( # Read this as "while i is less than 10"
j = 0;
j < 5 ?? ( # while j < 5
array[i][j] = x; # here we are assigning a value to a 2-dimentional array
j++;
x++
);
i++
)
This example uses the iterative conditional operator to initialize an array. Notice the missing ";" after x++ and i++. this is because they are not followed by an operand (instead, in this case are followed by a closing parenthese). The ";" operator is a binary operator, no different than +, -, *, /, etc. Therefore, it is only used between to operands or two sub-expressions.
Enhancements:
- This release adds a bunch of functions to round out the string handling capabilities of 2e.
- Also added are "anonymous" functions, bitwise operators, and a few code cleanups.
The language itself is refered to as 2e, however the interpreter is called ee.
An operand can be a literal, such as a numeric value (integer or floating point), a quoted string, a single-quoted character, a variable or a function call. Operators consist of the standard algebraic operators (i.e., *, /, +, -), assignment ("="), logical operators (<, >, <= >=, ==), sub-expression join operator (";"), and a conditional operator pair ("? :") like in C. Also added, is an iterative conditional pair ("?? :").
Heres a couple of examples:
ee -p 2 + 3 * 7
23
In this case, when called with the "-p" flag, the next parameter is evaluated and the final result printed. The "-c" flag does the same thing, but doesnt print the final result (use this when the expression already contains output statements).
ee -c x = 7; y = 11; z = (x * y); print(z; "n")
77
The ";" operator isnt really a statement terminator, it is actually a join operator. It evaluates the left and right expressions, and returns the result of the right hand side. It has the lowest order of precedence, so in general use you can treat it like a statement terminator (however it can be used in the middle of a larger expression, such as within parentheses grouping). It also does double-duty as a function parameter delimeter, such as the print function in the previous example.
The way that the "?" (conditoinal) operator works is as follows:
result = expr_test ? expr_true : expr_false
If expr_test is true (non-zero), then expr_true is evaluated and returned, otherwise expr_false is evaluated and returned. This is just like the inline conditional in C.
Also supported, is the iterative conditional:
result = expr_test ?? expr_true : expr_false
This will evaluate expr_test repeatedly, and as long as it is true, will evaluate expr_true. Once expr_test becomes false, then the final expr_true value is returned as the result of the whole expression. However, if expr_test never was true to begin with, then and only then is expr_false evaluated and returned. Therefore, expr_false can be used for some error handling, for example.
If an operator of lower precedence than ? or ?? is encounterd such as the ";" (join) operator, then a default false target will automatically be assumed. Therefore,
result = expr_test ? expr_true : 0; ...
result = expr_test ? expr_true; ...
are both the same. Heres a more extensive example, highlighting a few more of the operands avaliable. This example also calls the interpreter using the unix "#!" syntax, same as what is used for other scripting languages.
#!/usr/local/bin/ee
# This is a comment
i = 0;
x = 0;
i < 10 ?? ( # Read this as "while i is less than 10"
j = 0;
j < 5 ?? ( # while j < 5
array[i][j] = x; # here we are assigning a value to a 2-dimentional array
j++;
x++
);
i++
)
This example uses the iterative conditional operator to initialize an array. Notice the missing ";" after x++ and i++. this is because they are not followed by an operand (instead, in this case are followed by a closing parenthese). The ";" operator is a binary operator, no different than +, -, *, /, etc. Therefore, it is only used between to operands or two sub-expressions.
Enhancements:
- This release adds a bunch of functions to round out the string handling capabilities of 2e.
- Also added are "anonymous" functions, bitwise operators, and a few code cleanups.
2E Programming Language 0.8.2 Screenshot
Advertisements
2E Programming Language 0.8.2 Keywords
2E Programming Language 0.8.2
2E Programming Language
programming language
syntax language
can be
Algebraic syntax
Expr
language
programming
2e
true
operator
2E Programming Language 0.8.2
Code Generators
Programming
Bookmark 2E Programming Language 0.8.2
2E Programming Language 0.8.2 Copyright
WareSeeker periodically updates pricing and software information of 2E Programming Language 0.8.2 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of 2E Programming Language 0.8.2 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
assembly language programming
programming languages
c programming language
c++ programming language
programming language guide
programming language design
programming languages timeline
java programming language
programming language history
basis programming language
programming language trends
early programming language
programming language popularity
programming language software
fortran programming language
programming language shootout
what is programming language
history of programming language
Related Software
Qore is a modular, multi-threaded, SQL-integrated, weakly- typed scripting language. Free Download
Felix Programming Language is a high performance, statically typed scripting language. Free Download
AFNIX is a multi-threaded functional programming language with dynamic symbol bindings that support the object oriented paradigm Free Download
Transmuter Programming Language is an extremely dynamic, biologically-inspired prototyping language. Free Download
PATH programming language is a unique two-dimensional programming language. Free Download
Tom is a software environment for defining transformations in Java. Free Download
The Blue Programming Language project is a unique bytecode-compiled language. Free Download
The Qu Programming Language is a full-featured object oriented programming language. Free Download
Latest Software
Popular Software
Favourite Software