Skip to content
← Back to glossary

整数型Integer Type

Learn in the textbookData Types

DefinitionThe integer type (整数型) is a data type for whole numbers with no fractional part, negative numbers included.

ExplanationIt suits values that never have a fraction, such as counts, repetitions, or the position number of an element in an array. When one integer is divided by another, it can also be used to get the quotient and the remainder as integers.

AnalogyThink of the steps of a staircase. There is a first step and a second step, but no step 1.5.

Memory hook"Integer" comes from a Latin word meaning "untouched, whole".