SourcePoint Intel Help

Table of Contents

Constants

Integer Constants

Integer constants are of the form:

[0y | 0Y]{0-1}+[y | Y]                  // binary constant

[0o | 0O]{0-7}+[q | Q]                  // octal constant

[0n | 0N]{0-9}+[t | T]                  // decimal constant

[0x | 0X]{0-9 | a-f | A-F}+[h | H]      // hex constant

{0-9}+{k | K}                           // Kb

{0-9}+{m | M}                           // Mb

In the absence of an explicit base prefix or suffix, the default number base is specified by the base control variable.

Examples

10t                    // constant is decimal and has value 10

0n10                   // constant is decimal and has value 10

10y                    // constant is binary and has value 2

 

base = hex

10                     // constant has value 16 decimal

 

base = dec

10                     // constant has value 10 decimal

Floating Point Constants

Floating point constants are of the form:

[+ | -]{Digit}+.{Digit}*[Exp]

[+ | -]{Digit}*.{Digit}+[Exp]

[+ | -]{Digit}+[Exp]

Where:

  Digit             [0-9]

  Exp              [E | e][- | +]{Digit}+

Examples

.234

-1.1234

123.45e3

10e-5

Character Constants

Character constants follow the C language convention.

Examples

’a’                       // value = 0x61

’\t’                      // tab character

’\\’                      // backslash character

’\377’                    // octal value 377 = 255 decimal

String Constants

String constants follow the C language convention.  Constants longer than 256 characters are truncated.

Examples

”abcd”                     // abcd

”ab\\cd”                   // ab\cd

”abcd\n”                   // abcd + newline character