Topic: compile-time execution
Topic: data type by lexical constraints
Topic: data structure literals
Topic: default value
Topic: enumerated data types
Topic: initialization of data
Topic: initialized constants
Topic: integer values and operations
Topic: kinds of numbers
Topic: named constants and expressions
Topic: notation for constants
Topic: object-defined names
Topic: primitive functions
Topic: string literals
Topic: strings
Topic: undefined, null, and other signal values
Topic: value as an abstraction
| |
Summary
A constant is a name that designates one or more values, where a value is an immutable bit string plus data type. (Can/should '0' be an object?) Generally a lexical pattern identifies the constant's data types and a procedure for that data type converts the name into a bit string. The name can include a unit specifier that qualifies the data type or bit string. (cbb 1/90)
A constant is a token string which when given to a string-to-value procedure produces a typed value. A numerical constant consists of digits, type identifying characters and component deliminators. Enumerated types define new constants. The value associated with a constant is usually context independent, but a target type may be defined. For instance 'R:=3' may produce a real number with value 3. An expression of constants may also be considered a constant if there exists a string interpreter function. Many different strings will produce the same typed value. These strings may be defined via a template or conversion function. One of the strings is the output format defined by a value-to-string function. Constants make an abstract program concrete because of their fixed meaning. One of a language's boundaries is that constants can't be modified or replaced. (cbb 5/80)
Subtopic: constants as values, permanent name
Quote: symbols that are valid handles to objects in most scopes are typically recognized syntactically, e.g., numbers, symbols, and strings [»kentW6_1991]
| Quote: constants are terms that are their own value [»memorex]
| Quote: a constant is a permanent name for a value; a variable is a temporary name [»hehnEC7_1975]
| Quote: a literal is a constant variable whose value is suggested by its print name [»wulfWA4_1974]
| Quote: the value of a literal is the literal itself; e.g., true, false, and .capOmega. as undefined [»wirtN1_1966]
| Quote: a denotation is a self-defining name for a value; e.g., '2' [»maclBJ12_1983]
| Subtopic: constants as attributes
QuoteRef: memorex ;;2-22 can get length of a symbol's value in storage words
| Subtopic: constant data structures
Quote: in CmLisp, use .alpha. to convert a value into a constant xector; i.e., the value is loaded into every processor [»hillWD_1985]
| Quote: in CmLisp, use .bullet. to selectively cancel the constant meta-operation .alpha. [»hillWD_1985]
| Quote: think of CmLisp's .alpha. as a way to get a zillion of something; .bullet. marks subexpressions that already have a zillion [»hillWD_1985]
| Subtopic: data exchange
Quote: Kleisli's data exchange format is CPL values; self-describing, e.g., {| indicates a bag; no fixed schema or type declaration [»wongL9_2000]
| Subtopic: type compatible
Quote: a constant is type compatible if it can be a value of that type; it can be compatible with many types [»clayR4_1978]
| Subtopic: expression of constants
Quote: any construct that requires a constant should also allow an expression of constants [»knobB4_1976]
| Subtopic: enumeration
Quote: use enumerated data type to define a new set of constants [»demeA3_1979]
| Subtopic: data flow
QuoteRef: kosiPR9_1973 ;;94 in a data flow language, CONSTANT provides a constant value that always has PRESENCE and can't receive input
| Subtopic: compiling constants
Quote: C# constants are computed at compile time and accessed via their class [»wiltS10_2000]
| QuoteRef: cbb_1973 ;;Algol handles literal constants by calling the appropriate runtime conversion routine
| Quote: Proteus included the format of literals as part of a type definition [»solnN_1971, OK]
| Quote: the syntax of a literal defines a calculation that converts a print name into an internal value [»wulfWA4_1974]
| Quote: define the set CONST by functions const? and evcon; evcon maps each constant into the value it denotes [»reynJC8_1972]
| Subtopic: code constants
Quote: executable code should not be modified; was a big clarity problem with machine code [»dijkEW5_1965]
|
Related Topics
Topic: compile-time execution (17 items)
Topic: data type by lexical constraints (15 items)
Topic: data structure literals (9 items)
Topic: default value (8 items)
Topic: enumerated data types (17 items)
Topic: initialization of data (45 items)
Topic: initialized constants (12 items)
Topic: integer values and operations (13 items)
Topic: kinds of numbers (24 items)
Topic: named constants and expressions (21 items)
Topic: notation for constants (14 items)
Topic: object-defined names (15 items)
Topic: primitive functions (34 items)
Topic: string literals (3 items)
Topic: strings (13 items)
Topic: undefined, null, and other signal values (34 items)
Topic: value as an abstraction (25 items)
|