literal()

The literal() function take a constant string value and converts it to a literal of the appropriate required type (String, Char, numeric, Boolean or Enum value) at compile time.

It is provided mainly for use by the codegen for the (upcoming) ESP/Web development framework, and of little use in regular code, where a normal literal will suffice.

Simple example:

var b: Boolean := literal('true');
var i: Integer := literal('5');
bool b = literal("true");
int i = literal("5");
let b: Boolean = literal("true")
let i: Integer = literal("5")
bool b = literal("true");
int i = literal("5");
Dim b As Boolean = literal("true")
Dim i As Integer = literal("5")

See Also

  • ESP/Web