Language Reference

The following are some general characteristics of BrightScript, as compared to other common scripting languages:

  • BrightScript is not case sensitive.

  • Statement syntax is similar to Python, Basic, Ruby, and Lua (and dissimilar to C).

  • Like JavaScript and Lua, objects and named data-entry structures are associative arrays.

  • BrightScript supports dynamic typing (like JavaScript) and declared types (like C and Java).

  • Similar to .Net and Java, BrightScript uses "interfaces" and "components" (i.e. objects).

BrightScript code is compiled into bytecode that is run by an interpreter. The compilation step occurs every time a script is loaded and run. Similar to JavaScript, there is no separate compilation step that results in a saved binary file.

BrightScript and its component architecture are written in 100% C for speed, efficiency, and portability. Since many embedded processors do not have floating-point units, BrightScript makes extensive use of the "integer" type. Unlike some languages (including JavaScript), BrightScript only uses floating point numbers when necessary.