Integer

A numeric value, for example, 1 and 1234 are examples of integers. A negative integer is any negative numeric value, for example, -1 and -1234 are examples of a negative integers. In most programming languages you can convert a number into an integer using the int function. Below is an example of how this could be done in Perl.

my $random = int(rand(10));
print "Random number between 0 and 10: $random\n";

In the above example the $random variable is assigned a random number, which is converted into a whole number using the int() function.

Also see: Number, Numeric, Programming definitions, String, Whole number