Skip to main content

Local Variables

Local Variables

For the name of local variable, the following rules apply in ObjectScript:

  • The first character must be either a letter or a percent sign (%).

    If you start a name with %, use z or Z as the next character after that.

  • The remaining characters must be letters or numbers. On Unicode systems, these other characters can include letter characters above ASCII 255 (Unicode letters).

  • Names are case-sensitive.

  • The name must be unique (within the appropriate context) to the first 31 characters.

    Any subscripts of the variable do not contribute to this count.

Local Variable Names to Avoid

Avoid using the following names for local variables:

  • SQLCODE

    Avoid using SQLCODE as the name of a variable in any context where Caché SQL might run. See the “SQLCODE Values and Error Messages” chapter of the Caché Error Reference.

  • zenPage, this, and zenThis

    In Zen classes, avoid using these as names of variables. See the “Zen Special Variables” section in the “Zen Pages” chapter in Developing Zen Applications.

FeedbackOpens in a new tab