Simple Types

Simple types represent types that cannot be divided into more basic elements and are the model for representing elementary data on machine level. Basic memory unit in mikroBasic PRO for PIC has 8 bits.

Here is an overview of simple types in mikroBasic PRO for PIC:

Type Size Range
bit 1–bit 0 or 1
sbit 1–bit 0 or 1
byte, char 8–bit 0 .. 255
short 8–bit -128 .. 127
word 16–bit 0 .. 65535
integer 16–bit -32768 .. 32767
longword 32–bit 0 .. 4294967295
longint 32–bit -2147483648 .. 2147483647
float, double 32–bit ±1.17549435082 * 10-38 .. ±6.80564774407 * 1038

You can assign signed to unsigned or vice versa only using the explicit conversion. Refer to Types Conversions for more information.

Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
Want more examples and libraries? 
Find them on LibStock - A place for the code