User`s manual
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
Numeric constants can be represented in decimal, binary, or hexadecimal number
system.
In decimal notation, they are represented as a sequence of digits, without commas
or spaces, and can be prefixed with + or - operator to indicate the sign. Values
default to positive (67258 is equivalent to +67258).
The dollar-sign prefix or a 0x prefix indicates a hexadecimal numeral (for example
$8F or 0xC9).
The percent-sign indicates a binary numeral (for example %0101).
Example:
123 Decimal
$1fc Hex
0xb9 Hex
%101 Binary
Character string, also called a string literal or a string constant, consists of a quot-
ed string. Separators can be used only within quoted strings. A quoted string is a
sequence of up to 255 characters from the extended ASCII character set, written in
one line and enclosed by apostrophes.
Quoted string with nothing between the apostrophes is a null string. Apostrophe
itself cannot be used as part of the string. For example:
"mikroBasic"
' mikroBasic
""
' null string
" "
' a space
Length of character string is the number of characters it consists of. Character
string of length 1 is compatible with the char type. You can assign string literal to
a string variable or to array of char.
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
35
page
NUMERALS AND CHARACTER STRINGS
Numerals
Character Strings