Go to the first, previous, next, last section, table of contents.


4.13 Literals

All the C++ literals are built-in to Larch/C++. A literal can be viewed as a trait function (with zero arity) of the sort which the literal's type is based on. For example, one can view the integer constant 27 as a trait function with the signature 27: -> int. As in C++, adjacent string-literals are concatenated into a single string (see section 2.5.4 of [Ellis-Stroustrup90]).

literal ::= integer-constant | floating-constant
      | character-constant | string-literal [ string-literal ] ...
      | abstract-string-literal


Go to the first, previous, next, last section, table of contents.