|Home | Tutorial | Classes | Functions | QSA Workbench | Language | Qt API | QSA Articles Qt Script for Applications

[Prev: class] [Home] [Next: function]

const

const identifier = Value;

This keyword is used to define constant values. The identifier is created as a constant with the given Value. The constant is global unless defined within the scope of a class or function.

Example:

    const PI2 = Math.PI * 2;
    const COPYRIGHT = "Copyright (c) 2001";

Attempts to assign to a constant cause the interpreter to issue an error message and stop.

[Prev: class] [Home] [Next: function]


Copyright © 2001-2006 TrolltechTrademarks
QSA version 1.1.5