A primitive type is a data type provided by a programming language as a basic building block.
The actual range of primitive data types that is available is dependent upon the specific programming language that is being used. For example, in C, strings are a composite but built-in data type, whereas in modern dialects of BASIC and in JavaScript, they are assimilated to a primitive data type that is both basic and built-in.
Classic basic primitive types may include:
- character (
character,char) - integer (
integer,int,short,long,byte) with a variety of precisions - floating-point number (
float,double,real,double precision) - fixed-point number (
fixed) with a variety of precisions and a programmer-selected scale - boolean, logical values (
true,false)