User manual
mikroPascal PRO for PIC32
MikroElektronika
213
begin
a := 241;
b := 128;
cc := a + b; // equals 113
cc := word(a + b); // equals 113
dd := a + b; // equals 369
ptr := TBytePtr(@arr);
ptr := ^byte(@arr);
end.
Type Specier
The specier type introduces a synonym for a specied type. The type declarations are used to construct shorter or
more convenient names for types already dened by the language or declared by the user.
The specier type stands rst in the declaration:
type synonym = <type_denition>;
The type keyword assigns synonym to <type_denition>. The synonym needs to be a valid identier.
A declaration starting with the type specier does not introduce an object or a function of a given type, but rather a
new name for a given type. In other words, the type declaration is identical to a “normal” declaration, but instead of
objects, it declares types. It is a common practice to name custom type identiers with starting capital letter — this is
not required by the mikroPascal PRO for PIC32.
For example:
// Let’s declare a synonym for “byte”
type Distance = byte;
// Now, synonym “Distance” can be used as type identier:
var i : Distance; // declare variable i of byte