undefined

Summary

The value returned by JS++ for out-of-bounds accesses for internal types, and the value returned when no value has been assigned for external types.

Syntax

undefined

Description

For external types, when no value has been assigned to a variable or no value has been returned from a function, JS++ may return undefined. Note the distinction from null, which can only be introduced via an assignment statement.

For internal types, which must be initialized, undefined can only be present for out-of-bounds accesses (e.g. on arrays). See Existent Types for more information on how JS++ prevents out-of-bounds accesses at compile time.

undefined has the type void.

Differences from JavaScript

In ECMAScript 3 JavaScript, undefined can be defined because it is a property of the global object. For example, the following may be valid:

1
undefined = 1;

In JS++, undefined is a keyword and cannot be re-defined.

See Also

Share

HTML | BBCode | Direct Link