{"id":2434,"date":"2026-11-10T08:03:50","date_gmt":"2026-11-10T08:03:50","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=integer"},"modified":"2026-11-10T08:03:50","modified_gmt":"2026-11-10T08:03:50","slug":"integer","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=integer","title":{"rendered":"Integer"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An integer is a number such as 7, 0 or -12, with no fraction. Programming languages store integers separately from decimals because they are faster and exact, though each type has a maximum size.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using the right number type avoids rounding errors and bugs in prices, stock counts and totals.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A stock system stores the number of bags of cement in the store as an integer, since nobody has half a bag.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ask developers to store money in a way that avoids rounding errors, such as whole cents or shillings.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A whole number with no decimal part, used for counting in programs.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[14],"dc_topic":[34],"class_list":["post-2434","dc_term","type-dc_term","status-publish","hentry","dc_letter-i","dc_topic-software-and-development"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2434\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2434"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=2434"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=2434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}