Squirrel (programming language)

Squirrel is a dynamically typed, object-oriented programming language. It is particularly intended to be used in computer games and other applications as embedded scripting language. The design is much inspired by Lua. Uses it is for example in OpenTTD to create AI players.

Syntax

The syntax of Squirrel is based on C . A function x can calculate the factorial of a natural number, see, for example, as follows:

Function factorial ( x) {    if ( x == 0) {      return 1;    }    else {      return x * factorial ( x -1);    } } history

Squirrel was developed by Alberto Demichelis for a computer game project because he had problems with garbage collection of Lua. In 2003 Squirrel is released under the zlib license.

743023
de