S-Lang
|
|
S-Lang is an interpreted 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. 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 and mutt.
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);
}
