Version 6.3.13 for Windows
 —  Using Natural Studio  —

Rules and Naming Conventions

This section describes Natural-specific rules and naming conventions.


Object Naming Conventions

This section describes the naming conventions that apply when saving and/or cataloging a Natural object in a Natural system file.

The name of a Natural object can be 1 to 8 characters (listed in the following table) where the first character must be one of the following:

If the first character is a number sign (#) or a plus sign (+), the name must consist of at least one additional character.

Exception:

The name of a Natural DDM can be 1 to 32 characters (listed in the following table) where the first character must be an upper-case alphabetical character.

The name of a Natural object can consist of the following characters:

Character ISO Character Name Remark
A - Z Latin capital letter A - Z Upper-case alphabetical character
0 - 9 Digit zero - digit nine Numeric character
- Hyphen-minus Hyphen
_ Low line Underscore
/ Solidus Slash
@ Commercial at  
$ Dollar sign  
& Ampersand Only allowed in language codes

See also Defining the Language of a Natural Object in the Programming Guide.

# Number sign Hash sign
+ Plus sign Only allowed as the first character

Top of page

Library Naming Conventions

This section describes the naming conventions that apply to a Natural library.

The name (ID) of a library can be 1 to 8 characters and must not start with "SYS". The prefix "SYS" is reserved for Natural system libraries.

A library name must start with an upper-case alphabetical character. Any other alphabetical character must also be upper case. A library name must not contain any blank characters.

A library name can consist of the following characters:

Character ISO Character Name Remark
A - Z Latin capital letter A - Z Upper-case alphabetical character
0 - 9 Digit zero - digit nine Numeric character
- Hyphen-minus Hyphen
_ Low line Underscore

Top of page

Naming Conventions for User-Defined Variables

This section describes the naming conventions that apply to a user-defined variable:

For further information on user-defined variables, refer to the section User-Defined Variables in the Programming Guide.

Length of Variable Names

The name of a user-defined variable can be 1 to 32 characters long.

You can use variable names of over 32 characters (for example, in complex applications where longer meaningful variable names enhance the readability of programs); however, only the first 32 characters are significant and must therefore be unique, the remaining characters will be ignored by Natural.

Limitations of Variable Names

The name of a user-defined variable must not be a Natural reserved keyword.

Within one Natural program, you must not use the same name for a user-defined variable and a database field, because this might lead to referencing errors (see Qualifying Data Structures in the Programming Guide).

Characters Allowed in Variable Names

The name of a user-defined variable can consist of the following characters:

Character ISO Character Name Remark
A - Z Latin capital and/or small letter A - Z

Upper-case and/or lower-case alphabetical character

Lower-case not allowed as the first character

0 - 9 Digit zero - digit nine Numeric character
- Hyphen-minus Hyphen
_ Low line Underscore
/ Solidus Slash
@ Commercial at  
$ Dollar sign  
& Ampersand  
# Number sign Hash sign
+ Plus sign Only allowed as the first character

First Character of Variable Names

The first character of the name must be one of the following:

Character ISO Character Name Remark
A - Z Latin capital letter A - Z Upper-case alphabetical character
& Ampersand  
# Number sign Hash sign
+ Plus sign  

If the first character is a number sign (#), a plus sign (+) or an ampersand (&), the name must consist of at least one additional character.

Variables in a global data area (GDA) with a plus sign (+) as the first character must be defined at Level 1; see also Global Data Area in the Programming Guide. Other levels are only used in a redefinition.

A plus sign (+) as the first character of a name is only allowed for application-independent variables (AIVs) and variables in a global data area (GDA).

Names of AIVs must begin with a plus sign (+); see also Defining Application-Independent Variables in the description of the DEFINE DATA statement in the Statements documentation.

An ampersand (&) as the first character of a name is used in conjunction with dynamic source program modification (see the RUN statement in the Statements documentation), and as a dynamically replaceable character when defining processing rules; see the relevant description in the Map Editor documentation.

Case of Characters in Variable Names

With Natural for Windows, UNIX and OpenVMS, lower-case characters entered as part of a variable name are internally converted to upper case.

Caution:
If you use lower-case characters as part of the variable name, variable names must be unique regardless of their case.

Top of page