Difference between revisions of "Extensible Object Script"
(→Examples) |
|||
Line 81: | Line 81: | ||
</table> | </table> | ||
− | '''Extensible Object Script''' (short "EOS") is the Scripting language used for Systems Based on the [[Extensible Services / Server]] for Automation family. Extensible Object Script features Object mixing, caching, lambda expressions and | + | '''Extensible Object Script''' (short "EOS") is the Scripting language used for Systems Based on the [[Extensible Services / Server]] for Automation family. Extensible Object Script features Object mixing, caching, lambda expressions and dynamic typing. |
Extensible Object Script runs inside the ES/S-A Enviroment (Java-Based) and is compatble with Java Objects (Objects extending java.lang.Object). As Java-based Language (Processed by JCC and Apache BCEL) it is theoretically plattform independent, as the runtime can be executed on any Java-capable platform. | Extensible Object Script runs inside the ES/S-A Enviroment (Java-Based) and is compatble with Java Objects (Objects extending java.lang.Object). As Java-based Language (Processed by JCC and Apache BCEL) it is theoretically plattform independent, as the runtime can be executed on any Java-capable platform. |
Revision as of 17:32, 27 December 2022
Extensible Object Script | |
---|---|
Developer | Texas Instruments, Netroda Technologies, A. Zeneli et. al. |
Type | Scripting Language |
Licenses | LGPL |
Initial release |
2002 |
Current Version | 2.10.2 |
Platform | EOSRuntime (Java / Platform Independent) |
Origin |
|
Paradigm | Imperative Procedural |
Typing | Dynamic, Weak |
Influences | Java, ActionScript, JavaScript |
Extensible Object Script (short "EOS") is the Scripting language used for Systems Based on the Extensible Services / Server for Automation family. Extensible Object Script features Object mixing, caching, lambda expressions and dynamic typing.
Extensible Object Script runs inside the ES/S-A Enviroment (Java-Based) and is compatble with Java Objects (Objects extending java.lang.Object). As Java-based Language (Processed by JCC and Apache BCEL) it is theoretically plattform independent, as the runtime can be executed on any Java-capable platform.
Contents
[hide]Background
ExtensibleObjectScript is a general purpose object-oriented programming and scripting language. It is designed to be simple to learn, easy to use, yet still powerful, combining the convenience of a just-in-time interpreter with the features and reliability of the surrounding Java virtual machine. Its origins trace to ObjectScript developed originally by Texas Instrument until the early 2000s.
Introduction
Extensible Object Script is a full featured object oriented scripting language, which combines the powerful features of a full blown programming language such as Java with the ease of use of a scripting language. It supports functions (which can be closures), classes, inheritance, synchronization (for multi-threaded programs) and garbage collection. Also, an ObjectScript program can take advantage of exising Java APIs by creating instances of Java classes, calling methods of Java objects, and even implementing Java interfaces or extending Java classes. As the Core of Extensible Services / Server for Automation is java based, Extensible Object Script integrates seamlessly.
Uses
Scripts utilizing EOS are used to create Complex Typed System Assets (CTSA), Create and modify Area Service Controllers (ASXC) and to create user programs, like recurring tasks, automation routines and similar.
Examples
// A Simple While-Loop var a = 0; while(true) { a++; if( a > 5 ) break; else continue; a = 10; // this line is never evaluated }123456789101112
// Two For-Loops var arr = []; for( var i=0; i<10; i++ ) arr[i] = i; var sum = 0; for( var item : arr ) sum += item;12345678910
// Simple Recursion function fib(n) { if( n == 0 ) throw new Exception("Invalid Input"); else if( n == 1 ) return 1; else if( n == 2 ) return 1; else return fib(n-1) + fib(n-2); }12345678910111213
Object-Oriented Examples
Expand
A Example complex program shown below, this snippets creates a Lighting theme for a residential or public building utilizing a Extensible Services / Server for Automation based system.
Expand