Predeclared

From Wikipedia, the free encyclopedia

In computer languages, the built-in information, encodings or tools that are available to a programmer are pre-declared, often in the form of entities, variables, objects, functions or instructions. It is mostly not possible to overwrite or otherwise manipulate them.

A pre-declared entity is a built-in notation convention for a character or a string. For example, in the HTML markup language, a large number of character and numeric entities are available to represent characters. In HTML, '&lt;' is a possible pre-declared entity to represent '<'.[1] The programmer must not declare this entity by himself before he can use it, since it is already pre-declared by the specifications of the HTML language. Pre-declared entities are often used as escape sequences to represent information that would otherwise cause possible conflicts in its non-encoded form.

Pre-declared variable

When a variable is pre-declared, it provides the programmer with information that he might be interested in. For example, in the Perl language, a variable %ENV is pre-declared, holding environmental information such as the operating system, host information, user information, and much more.[2] Other pre-declared variables in Perl are %INC and %SIG. Almost all common programming languages provide the programmer with such pre-declared variables in one or another form.

When variables are pre-declared, it is commonly assumed that the value for the pre-declared name is also pre-assigned at the same time.

Pre-declared object

Pre-declared objects have the same goal as pre-declared variables. For example, in the JavaScript language, the navigator-object is available to get all kinds of information about the browser that is running the script in question.

Pre-declared functions and instructions

Narrow semantic sense

References

Related Articles

Wikiwand AI