SW500007 Microchip Technology, SW500007 Datasheet - Page 56

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
Supported Data Types and Variables
3.4.1 Radix Specifiers and Constants
The format of integral constants specifies their radix. HI-TECH PICC-18 STD supports the ANSI
standard radix specifiers as well as ones which enable binary constants to be specified in C code.
The format used to specify the radices are given in Table 3.6. The letters used to specify binary or
hexadecimal radices are case insensitive, as are the letters used to specify the hexadecimal digits.
overflow. The suffix l or L may be used with the constant to indicate that it must be assigned either
a signed long or unsigned long type, and the suffix u or U may be used with the constant to
indicate that it must be assigned an unsigned type, and both l or L and u or U may be used to indicate
unsigned long int type.
constant. The suffixes l or L specify a long double type which is considered an identical type to
double by HI-TECH PICC-18 STD.
constant has char type. Multi-byte character constants are not supported.
world". The type of string constants is const char * and the strings are stored in the program
memory. Assigning a string constant to a non-const char pointer will generate a warning from the
compiler. For example:
Defining and initializing a non-const array (i.e. not a pointer definition) with a string, for example:
produces an array in data space which is initialised at startup with the string "two" (copied from
program space), whereas a constant string used in other contexts represents an unnamed const-
qualified array, accessed directly in program space.
42
Any integral constant will have a type which is the smallest type that can hold the value without
Floating-point constants have double type unless suffixed by f or F, in which case it is a float
Character constants are enclosed by single quote characters ’, for example ’a’. A character
String constants or string literals are enclosed by double quote characters ", for example "hello
char * cp= "one";
const char * ccp= "two"; // "two" in ROM, correct
char ca[]= "two";
binary
octal
decimal
hexadecimal
Radix
0bnumber or 0Bnumber
0number
number
0xnumber or 0Xnumber
Table 3.6: Radix formats
// "one" in ROM, produces warning
// "two" different to the above
Format
0b10011010
0763
129
0x2F
Example
C Language Features

Related parts for SW500007