NetScaler extensions - language overview

The extension language is based on the Lua 5.2 programming language. Lua provides a compact execution engine with good performance that is designed for embedding in C programs, like NetScaler software.

The extension language is dynamically typed, which means each object carries its own type information. Any variable can hold any type at any time during execution, so variable types are not declared.

The language is also free form, where white space between tokens is ignored. Statements may be separated by semicolons, but that is not required and usually not done. Blocks of statements are typically terminated by end. There are no brackets around blocks like the { and } in C or Java.

Identifiers are sequences of letters (a through z and A through Z), digits (0 through 9), and underscores (_), not starting in a digit. Identifiers are case-sensitive, so var, VAR, and Var are all different identifiers.

Comments are started by –. Everything after – is ignored to the end of the line. Example:

-- This is a comment.

NetScaler extensions - language overview

In this article