![]() | ![]() | |||||||||||||||
|
LiteralsNumbers (numeric literals) represent a numeric value. They are in conventional base 10 (by default) can contain a decimal point. Numbers can also have an underscore (underline character) which does not affect the meaning: underscores may be used to break up a long number for readability. An alternate base (hex, octal, etc.) can be specified by following the base with the value between '#'. The minimum base is 2 (binary) and the maximum base is 16 (hexadecimal). Hexadecimal letter characters can be in upper or lower case. Scientific notation (a power of 10 exponent) is not yet supported. => ? 16#FFFF#
All numeric literals are of type univeral_numeric. Characters are enclosed in single quotes. It must be only one graphic character bracketed by two single quotes (also called apostrophes).
Strings are enclosed in double quotes. They are a sequence of zero or more graphic characters bracketed by two double quotes.
All string or character literals are of type universal_string. Ada: In Ada, the number 5 is an integer and 5.0 is a real literal (float). Here they are both universal_numeric. In Ada, "hello" is a string and 'c' is a character. Both are universal_strings here. |
![]() Block Statements and Subprograms |
![]() |
![]() |