HTBasic Help
×
Menu
Index

Numeric Constant

 
A constant is an entity with a fixed value. There are three types of numeric constants: integer, long and real. An integer constant is a whole number not specified with a decimal point, ".", nor with scientific notation, which falls in the range -2,147,483,647 to 2,147,483,647. Integer constants can be expressed in decimal, octal (base 8) or hexadecimal (base 16). An octal constant must begin with the characters "&O" or simply "&". A hexadecimal constant must begin with the characters "&H. A real constant is specified with a decimal point or scientific notation, or is outside the integer range. Some integer constants are "1", "-20000", "&H7FFF" and "&O377. Some real constants are "-1.0", "1E+10" and "40000.5".