S-Lang |
S-Lang is an interpreted language programming language designed to provide extensibility to applications written in other programming languages via language embedding. Created in 1992, its original syntax reflected its origins as a Stack-based programming language, but the current syntax is very much like that of C (programming language). S-Lang is small, simple and dynamically typed. Because of its size and ease-of-embedding, S-lang has been embedded in programs such as slrn, JED (text editor) and mutt (email client).
=Example code=
Here is how to implement the factorial function using S-Lang:
define factorial (); % declare it for recursion define factorial (n) { if (n < 2) return 1; return n * factorial (n - 1); }
=External link=
|
|