CINXE.COM

Data type - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Data type - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"9f1ef6ec-23a8-48b1-8870-ed1aade24a7e","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Data_type","wgTitle":"Data type","wgCurRevisionId":1274970518,"wgRevisionId":1274970518,"wgArticleId":93817,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["CS1 maint: location missing publisher","Articles with short description","Short description is different from Wikidata","Articles with example C code","Articles containing potentially dated statements from 2011","All articles containing potentially dated statements","Wikipedia articles in need of updating from July 2024","All Wikipedia articles in need of updating","Articles with example Haskell code","All articles with unsourced statements", "Articles with unsourced statements from September 2021","Commons category link is on Wikidata","Data types","Programming language concepts"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Data_type","wgRelevantArticleId":93817,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":30000,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false, "wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q190087","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=[ "ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","ext.scribunto.logs","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.math.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.17"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Python_3._The_standard_type_hierarchy-en.svg/1200px-Python_3._The_standard_type_hierarchy-en.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="1713"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Python_3._The_standard_type_hierarchy-en.svg/800px-Python_3._The_standard_type_hierarchy-en.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="1142"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Python_3._The_standard_type_hierarchy-en.svg/640px-Python_3._The_standard_type_hierarchy-en.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="914"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Data type - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Data_type"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Data_type&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Data_type"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Data_type rootpage-Data_type skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" title="Main menu" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li><li id="n-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages"><span>Special pages</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=Data+type" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=Data+type" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Data+type" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Data+type" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Concept" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Concept"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Concept</span> </div> </a> <ul id="toc-Concept-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Definition" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Definition"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Definition</span> </div> </a> <ul id="toc-Definition-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Classification" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Classification"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Classification</span> </div> </a> <ul id="toc-Classification-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Examples" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Examples"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Examples</span> </div> </a> <button aria-controls="toc-Examples-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Examples subsection</span> </button> <ul id="toc-Examples-sublist" class="vector-toc-list"> <li id="toc-Machine_data_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Machine_data_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Machine data types</span> </div> </a> <ul id="toc-Machine_data_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Boolean_type" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Boolean_type"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>Boolean type</span> </div> </a> <ul id="toc-Boolean_type-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Numeric_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Numeric_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.3</span> <span>Numeric types</span> </div> </a> <ul id="toc-Numeric_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Enumerations" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Enumerations"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4</span> <span>Enumerations</span> </div> </a> <ul id="toc-Enumerations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-String_and_text_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#String_and_text_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.5</span> <span>String and text types</span> </div> </a> <ul id="toc-String_and_text_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Union_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Union_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.6</span> <span>Union types</span> </div> </a> <ul id="toc-Union_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Algebraic_data_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Algebraic_data_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.7</span> <span>Algebraic data types</span> </div> </a> <ul id="toc-Algebraic_data_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Data_structures" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Data_structures"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.8</span> <span>Data structures</span> </div> </a> <ul id="toc-Data_structures-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Abstract_data_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Abstract_data_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.9</span> <span>Abstract data types</span> </div> </a> <ul id="toc-Abstract_data_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pointers_and_references" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Pointers_and_references"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.10</span> <span>Pointers and references</span> </div> </a> <ul id="toc-Pointers_and_references-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Function_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Function_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.11</span> <span>Function types</span> </div> </a> <ul id="toc-Function_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Type_constructors" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Type_constructors"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.12</span> <span>Type constructors</span> </div> </a> <ul id="toc-Type_constructors-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Quantified_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Quantified_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.13</span> <span>Quantified types</span> </div> </a> <ul id="toc-Quantified_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Refinement_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Refinement_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.14</span> <span>Refinement types</span> </div> </a> <ul id="toc-Refinement_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Dependent_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Dependent_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.15</span> <span>Dependent types</span> </div> </a> <ul id="toc-Dependent_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Intersection_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Intersection_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.16</span> <span>Intersection types</span> </div> </a> <ul id="toc-Intersection_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Meta_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Meta_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.17</span> <span>Meta types</span> </div> </a> <ul id="toc-Meta_types-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Convenience_types" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Convenience_types"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.18</span> <span>Convenience types</span> </div> </a> <ul id="toc-Convenience_types-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Further_reading" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Further_reading"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Further reading</span> </div> </a> <ul id="toc-Further_reading-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" title="Table of Contents" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Data type</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 53 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-53" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">53 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%86%D9%88%D8%B9_%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA" title="نوع بيانات – Arabic" lang="ar" hreflang="ar" data-title="نوع بيانات" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/Tipu_de_datu" title="Tipu de datu – Asturian" lang="ast" hreflang="ast" data-title="Tipu de datu" data-language-autonym="Asturianu" data-language-local-name="Asturian" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Veril%C9%99nl%C9%99r_tipi" title="Verilənlər tipi – Azerbaijani" lang="az" hreflang="az" data-title="Verilənlər tipi" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%A1%E0%A7%87%E0%A6%9F%E0%A6%BE_%E0%A6%9F%E0%A6%BE%E0%A6%87%E0%A6%AA" title="ডেটা টাইপ – Bangla" lang="bn" hreflang="bn" data-title="ডেটা টাইপ" data-language-autonym="বাংলা" data-language-local-name="Bangla" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://zh-min-nan.wikipedia.org/wiki/Chu-li%C4%81u-h%C3%AAng" title="Chu-liāu-hêng – Minnan" lang="nan" hreflang="nan" data-title="Chu-liāu-hêng" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="Minnan" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li><li class="interlanguage-link interwiki-be-x-old mw-list-item"><a href="https://be-tarask.wikipedia.org/wiki/%D0%A2%D1%8B%D0%BF_%D0%B7%D1%8C%D0%B2%D0%B5%D1%81%D1%82%D0%B0%D0%BA" title="Тып зьвестак – Belarusian (Taraškievica orthography)" lang="be-tarask" hreflang="be-tarask" data-title="Тып зьвестак" data-language-autonym="Беларуская (тарашкевіца)" data-language-local-name="Belarusian (Taraškievica orthography)" class="interlanguage-link-target"><span>Беларуская (тарашкевіца)</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%A2%D0%B8%D0%BF_%D0%B4%D0%B0%D0%BD%D0%BD%D0%B8" title="Тип данни – Bulgarian" lang="bg" hreflang="bg" data-title="Тип данни" data-language-autonym="Български" data-language-local-name="Bulgarian" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Tip_podatka_(ra%C4%8Dunarstvo)" title="Tip podatka (računarstvo) – Bosnian" lang="bs" hreflang="bs" data-title="Tip podatka (računarstvo)" data-language-autonym="Bosanski" data-language-local-name="Bosnian" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Tipus_de_dada" title="Tipus de dada – Catalan" lang="ca" hreflang="ca" data-title="Tipus de dada" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Datov%C3%BD_typ" title="Datový typ – Czech" lang="cs" hreflang="cs" data-title="Datový typ" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Datatype" title="Datatype – Danish" lang="da" hreflang="da" data-title="Datatype" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Datentyp" title="Datentyp – German" lang="de" hreflang="de" data-title="Datentyp" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Andmet%C3%BC%C3%BCp" title="Andmetüüp – Estonian" lang="et" hreflang="et" data-title="Andmetüüp" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%A4%CF%8D%CF%80%CE%BF%CF%82_%CE%B4%CE%B5%CE%B4%CE%BF%CE%BC%CE%AD%CE%BD%CF%89%CE%BD" title="Τύπος δεδομένων – Greek" lang="el" hreflang="el" data-title="Τύπος δεδομένων" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Tipo_de_dato" title="Tipo de dato – Spanish" lang="es" hreflang="es" data-title="Tipo de dato" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Datumtipo" title="Datumtipo – Esperanto" lang="eo" hreflang="eo" data-title="Datumtipo" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Datu-mota" title="Datu-mota – Basque" lang="eu" hreflang="eu" data-title="Datu-mota" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%86%D9%88%D8%B9_%D8%AF%D8%A7%D8%AF%D9%87" title="نوع داده – Persian" lang="fa" hreflang="fa" data-title="نوع داده" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Type_(informatique)" title="Type (informatique) – French" lang="fr" hreflang="fr" data-title="Type (informatique)" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%9E%90%EB%A3%8C%ED%98%95" title="자료형 – Korean" lang="ko" hreflang="ko" data-title="자료형" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%A1%E0%A4%BE%E0%A4%9F%E0%A4%BE_%E0%A4%AA%E0%A5%8D%E0%A4%B0%E0%A4%95%E0%A4%BE%E0%A4%B0" title="डाटा प्रकार – Hindi" lang="hi" hreflang="hi" data-title="डाटा प्रकार" data-language-autonym="हिन्दी" data-language-local-name="Hindi" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hr badge-Q17437796 badge-featuredarticle mw-list-item" title="featured article badge"><a href="https://hr.wikipedia.org/wiki/Tip_podatka_(ra%C4%8Dunarstvo)" title="Tip podatka (računarstvo) – Croatian" lang="hr" hreflang="hr" data-title="Tip podatka (računarstvo)" data-language-autonym="Hrvatski" data-language-local-name="Croatian" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-io mw-list-item"><a href="https://io.wikipedia.org/wiki/Tipo_di_datumi" title="Tipo di datumi – Ido" lang="io" hreflang="io" data-title="Tipo di datumi" data-language-autonym="Ido" data-language-local-name="Ido" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Jenis_data" title="Jenis data – Indonesian" lang="id" hreflang="id" data-title="Jenis data" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/Gagnager%C3%B0" title="Gagnagerð – Icelandic" lang="is" hreflang="is" data-title="Gagnagerð" data-language-autonym="Íslenska" data-language-local-name="Icelandic" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Tipo_di_dato" title="Tipo di dato – Italian" lang="it" hreflang="it" data-title="Tipo di dato" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%98%D7%99%D7%A4%D7%95%D7%A1_%D7%A0%D7%AA%D7%95%D7%A0%D7%99%D7%9D" title="טיפוס נתונים – Hebrew" lang="he" hreflang="he" data-title="טיפוס נתונים" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/%D0%9C%D3%99%D0%BB%D1%96%D0%BC%D0%B5%D1%82%D1%82%D0%B5%D1%80_%D1%82%D0%B8%D0%BF%D1%96" title="Мәліметтер типі – Kazakh" lang="kk" hreflang="kk" data-title="Мәліметтер типі" data-language-autonym="Қазақша" data-language-local-name="Kazakh" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/Datu_tips" title="Datu tips – Latvian" lang="lv" hreflang="lv" data-title="Datu tips" data-language-autonym="Latviešu" data-language-local-name="Latvian" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Duomen%C5%B3_strukt%C5%ABra" title="Duomenų struktūra – Lithuanian" lang="lt" hreflang="lt" data-title="Duomenų struktūra" data-language-autonym="Lietuvių" data-language-local-name="Lithuanian" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Adatt%C3%ADpus" title="Adattípus – Hungarian" lang="hu" hreflang="hu" data-title="Adattípus" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/Jenis_data" title="Jenis data – Malay" lang="ms" hreflang="ms" data-title="Jenis data" data-language-autonym="Bahasa Melayu" data-language-local-name="Malay" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wikipedia.org/wiki/%D3%A8%D0%B3%D3%A9%D0%B3%D0%B4%D0%BB%D0%B8%D0%B9%D0%BD_%D1%82%D3%A9%D1%80%D3%A9%D0%BB" title="Өгөгдлийн төрөл – Mongolian" lang="mn" hreflang="mn" data-title="Өгөгдлийн төрөл" data-language-autonym="Монгол" data-language-local-name="Mongolian" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Datatype" title="Datatype – Dutch" lang="nl" hreflang="nl" data-title="Datatype" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%83%87%E3%83%BC%E3%82%BF%E5%9E%8B" title="データ型 – Japanese" lang="ja" hreflang="ja" data-title="データ型" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Datatype" title="Datatype – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="Datatype" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Typ_danych" title="Typ danych – Polish" lang="pl" hreflang="pl" data-title="Typ danych" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Tipo_de_dado" title="Tipo de dado – Portuguese" lang="pt" hreflang="pt" data-title="Tipo de dado" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Tipuri_de_date" title="Tipuri de date – Romanian" lang="ro" hreflang="ro" data-title="Tipuri de date" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%A2%D0%B8%D0%BF_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85" title="Тип данных – Russian" lang="ru" hreflang="ru" data-title="Тип данных" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Data_type" title="Data type – Simple English" lang="en-simple" hreflang="en-simple" data-title="Data type" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/D%C3%A1tov%C3%BD_typ" title="Dátový typ – Slovak" lang="sk" hreflang="sk" data-title="Dátový typ" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Podatkovni_tip" title="Podatkovni tip – Slovenian" lang="sl" hreflang="sl" data-title="Podatkovni tip" data-language-autonym="Slovenščina" data-language-local-name="Slovenian" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D8%AC%DB%86%D8%B1%DB%8C_%D8%AF%D8%B1%D8%A7%D9%88%DB%95" title="جۆری دراوە – Central Kurdish" lang="ckb" hreflang="ckb" data-title="جۆری دراوە" data-language-autonym="کوردی" data-language-local-name="Central Kurdish" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Datatyp" title="Datatyp – Swedish" lang="sv" hreflang="sv" data-title="Datatyp" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%A4%E0%AE%B0%E0%AE%B5%E0%AF%81_%E0%AE%87%E0%AE%A9%E0%AE%AE%E0%AF%8D" title="தரவு இனம் – Tamil" lang="ta" hreflang="ta" data-title="தரவு இனம்" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-te mw-list-item"><a href="https://te.wikipedia.org/wiki/%E0%B0%A1%E0%B1%87%E0%B0%9F%E0%B0%BE_%E0%B0%B0%E0%B0%95%E0%B0%82" title="డేటా రకం – Telugu" lang="te" hreflang="te" data-title="డేటా రకం" data-language-autonym="తెలుగు" data-language-local-name="Telugu" class="interlanguage-link-target"><span>తెలుగు</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Veri_t%C3%BCr%C3%BC" title="Veri türü – Turkish" lang="tr" hreflang="tr" data-title="Veri türü" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%A2%D0%B8%D0%BF_%D0%B4%D0%B0%D0%BD%D0%B8%D1%85" title="Тип даних – Ukrainian" lang="uk" hreflang="uk" data-title="Тип даних" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D9%86%D9%88%D8%B9_%DA%88%DB%8C%D9%B9%D8%A7" title="نوع ڈیٹا – Urdu" lang="ur" hreflang="ur" data-title="نوع ڈیٹا" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Ki%E1%BB%83u_d%E1%BB%AF_li%E1%BB%87u" title="Kiểu dữ liệu – Vietnamese" lang="vi" hreflang="vi" data-title="Kiểu dữ liệu" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E8%B3%87%E6%96%99%E9%A1%9E%E5%9E%8B" title="資料類型 – Cantonese" lang="yue" hreflang="yue" data-title="資料類型" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E8%B3%87%E6%96%99%E9%A1%9E%E5%9E%8B" title="資料類型 – Chinese" lang="zh" hreflang="zh" data-title="資料類型" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q190087#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Data_type" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Data_type" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Data_type"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Data_type&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Data_type&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Data_type"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Data_type&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Data_type&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Data_type" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Data_type" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Data_type&amp;oldid=1274970518" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Data_type&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=Data_type&amp;id=1274970518&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FData_type"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FData_type"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Data_type&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Data_type&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Data_types" hreflang="en"><span>Wikimedia Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-wikifunctions mw-list-item"><a href="https://www.wikifunctions.org/wiki/Z4" hreflang="en"><span>Wikifunctions</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q190087" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Attribute of data</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="/wiki/Data_structure" title="Data structure">Data structure</a>.</div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Python_3._The_standard_type_hierarchy-en.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Python_3._The_standard_type_hierarchy-en.svg/220px-Python_3._The_standard_type_hierarchy-en.svg.png" decoding="async" width="220" height="314" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Python_3._The_standard_type_hierarchy-en.svg/330px-Python_3._The_standard_type_hierarchy-en.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Python_3._The_standard_type_hierarchy-en.svg/440px-Python_3._The_standard_type_hierarchy-en.svg.png 2x" data-file-width="512" data-file-height="731" /></a><figcaption>The standard type hierarchy of <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a> 3</figcaption></figure> <p>In <a href="/wiki/Computer_science" title="Computer science">computer science</a> and <a href="/wiki/Computer_programming" title="Computer programming">computer programming</a>, a <b>data type</b> (or simply <b>type</b>) is a collection or grouping of <a href="/wiki/Value_(computer_science)" title="Value (computer science)">data values</a>, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these values as machine types.<sup id="cite_ref-FOOTNOTEParnasShoreWeiss1976_1-0" class="reference"><a href="#cite_note-FOOTNOTEParnasShoreWeiss1976-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> A data type specification in a program constrains the possible values that an <a href="/wiki/Expression_(computer_science)" title="Expression (computer science)">expression</a>, such as a variable or a function call, might take. On literal data, it tells the <a href="/wiki/Compiler" title="Compiler">compiler</a> or <a href="/wiki/Interpreter_(computing)" title="Interpreter (computing)">interpreter</a> how the programmer intends to use the data. Most programming languages support basic data types of <a href="/wiki/Integer_(computer_science)" title="Integer (computer science)">integer</a> numbers (of varying sizes), <a href="/wiki/Floating_point" class="mw-redirect" title="Floating point">floating-point</a> numbers (which approximate <a href="/wiki/Real_number" title="Real number">real numbers</a>), <a href="/wiki/Character_(computing)" title="Character (computing)">characters</a> and <a href="/wiki/Boolean_data_type" title="Boolean data type">Booleans</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Concept">Concept</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=1" title="Edit section: Concept"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A data type may be specified for many reasons: similarity, convenience, or to focus the attention. It is frequently a matter of good organization that aids the understanding of complex definitions. Almost all programming languages explicitly include the notion of data type, though the possible data types are often restricted by considerations of simplicity, computability, or regularity. An explicit data type declaration typically allows the compiler to choose an efficient machine representation, but the conceptual organization offered by data types should not be discounted.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> </p><p>Different languages may use different data types or similar types with different semantics. For example, in the <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python programming language</a>, <code>int</code> represents an <a href="/wiki/Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">arbitrary-precision integer</a> which has the traditional numeric operations such as addition, subtraction, and multiplication. However, in the <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java programming language</a>, the type <code>int</code> represents the set of <a href="/wiki/32-bit" class="mw-redirect" title="32-bit">32-bit</a> <a href="/wiki/Integer_(computer_science)" title="Integer (computer science)">integers</a> ranging in value from −2,147,483,648 to 2,147,483,647, with arithmetic operations that wrap on <a href="/wiki/Integer_overflow" title="Integer overflow">overflow</a>. In <a href="/wiki/Rust_(programming_language)" title="Rust (programming language)">Rust</a> this 32-bit integer type is denoted <code>i32</code> and panics on overflow in debug mode.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> </p><p>Most programming languages also allow the programmer to define additional data types, usually by combining multiple elements of other types and defining the valid operations of the new data type. For example, a programmer might create a new data type named "<a href="/wiki/Complex_number" title="Complex number">complex number</a>" that would include real and imaginary parts, or a color data type represented by three <a href="/wiki/Byte" title="Byte">bytes</a> denoting the amounts each of red, green, and blue, and a string representing the color's name. </p><p>Data types are used within <a href="/wiki/Type_system" title="Type system">type systems</a>, which offer various ways of defining, implementing, and using them. In a type system, a data type represents a constraint placed upon the interpretation of data, describing representation, interpretation and structure of <a href="/wiki/Value_(computer_science)" title="Value (computer science)">values</a> or <a href="/wiki/Object_(computer_science)" title="Object (computer science)">objects</a> stored in computer memory. The type system uses data type information to check <a href="/wiki/Correctness_of_computer_programs" class="mw-redirect" title="Correctness of computer programs">correctness of computer programs</a> that access or manipulate the data. A <a href="/wiki/Compiler" title="Compiler">compiler</a> may use the static type of a value to optimize the storage it needs and the choice of algorithms for operations on the value. In many <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> compilers the <code class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><span class="kt">float</span></code> data type, for example, is represented in 32 <a href="/wiki/Bit" title="Bit">bits</a>, in accord with the <a href="/wiki/IEEE_754-2008" class="mw-redirect" title="IEEE 754-2008">IEEE specification for single-precision floating point numbers</a>. They will thus use floating-point-specific <a href="/wiki/Instruction_set" class="mw-redirect" title="Instruction set">microprocessor operations</a> on those values (floating-point addition, multiplication, etc.). </p> <div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=2" title="Edit section: Definition"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="#CITEREFParnasShoreWeiss1976">Parnas, Shore &amp; Weiss (1976)</a> identified five definitions of a "type" that were used—sometimes implicitly—in the literature: </p> <dl><dt>Syntactic</dt> <dd>A type is a purely <a href="/wiki/Syntax" title="Syntax">syntactic</a> label associated with a <a href="/wiki/Variable_(computer_science)" title="Variable (computer science)">variable</a> when it is declared. Although useful for advanced type systems such as <a href="/wiki/Substructural_type_system" title="Substructural type system">substructural type systems</a>, such definitions provide no intuitive meaning of the types.</dd> <dt>Representation</dt> <dd>A type is defined in terms of a composition of more primitive types—often machine types.</dd> <dt>Representation and behaviour</dt> <dd>A type is defined as its representation and a set of <a href="/wiki/Operator_(computer_programming)" title="Operator (computer programming)">operators</a> manipulating these representations.</dd> <dt>Value space</dt> <dd>A type is a set of possible values which a variable can possess. Such definitions make it possible to speak about (<a href="/wiki/Disjoint_union" title="Disjoint union">disjoint</a>) <a href="/wiki/Union_(set_theory)" title="Union (set theory)">unions</a> or <a href="/wiki/Cartesian_product" title="Cartesian product">Cartesian products</a> of types.</dd> <dt>Value space and behaviour</dt> <dd>A type is a set of values which a variable can possess and a set of <a href="/wiki/Function_(computer_science)" class="mw-redirect" title="Function (computer science)">functions</a> that one can apply to these values.</dd></dl> <p>The definition in terms of a representation was often done in imperative languages such as <a href="/wiki/ALGOL" title="ALGOL">ALGOL</a> and <a href="/wiki/Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>, while the definition in terms of a value space and behaviour was used in higher-level languages such as <a href="/wiki/Simula" title="Simula">Simula</a> and <a href="/wiki/CLU_(programming_language)" title="CLU (programming language)">CLU</a>. Types including behavior align more closely with <a href="/wiki/Object-oriented" class="mw-redirect" title="Object-oriented">object-oriented</a> models, whereas a <a href="/wiki/Structured_programming" title="Structured programming">structured programming</a> model would tend to not include code, and are called <a href="/wiki/Plain_old_data_structure" class="mw-redirect" title="Plain old data structure">plain old data structures</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Classification">Classification</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=3" title="Edit section: Classification"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Data types may be categorized according to several factors: </p> <ul><li><i><a href="/wiki/Primitive_data_type" title="Primitive data type">Primitive data types</a></i> or <i>built-in data types</i> are types that are built-in to a language implementation. <i>User-defined data types</i> are non-primitive types. For example, Java's numeric types are primitive, while classes are user-defined.</li> <li>A value of an <i>atomic type</i> is a single data item that cannot be broken into component parts. A value of a <i><a href="/wiki/Composite_type" class="mw-redirect" title="Composite type">composite type</a></i> or <i>aggregate type</i> is a collection of data items that can be accessed individually.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> For example, an integer is generally considered atomic, although it consists of a sequence of bits, while an array of integers is certainly composite.</li> <li><i>Basic data types</i> or <i>fundamental data types</i> are defined axiomatically from fundamental notions or by enumeration of their elements. <i>Generated data types</i> or <i>derived data types</i> are specified, and partly defined, in terms of other data types. All basic types are atomic.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> For example, integers are a basic type defined in mathematics, while an array of integers is the result of applying an array type generator to the integer type.</li></ul> <p>The terminology varies - in the literature, primitive, built-in, basic, atomic, and fundamental may be used interchangeably.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=4" title="Edit section: Examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Machine_data_types">Machine data types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=5" title="Edit section: Machine data types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>All data in computers based on digital electronics is represented as <a href="/wiki/Bit" title="Bit">bits</a> (alternatives 0 and 1) on the lowest level. The smallest addressable unit of data is usually a group of bits called a <a href="/wiki/Byte" title="Byte">byte</a> (usually an <a href="/wiki/Octet_(computing)" title="Octet (computing)">octet</a>, which is 8 bits). The unit processed by <a href="/wiki/Machine_code" title="Machine code">machine code</a> instructions is called a <a href="/wiki/Word_(data_type)" class="mw-redirect" title="Word (data type)">word</a> (as of 2011<sup class="plainlinks noexcerpt noprint asof-tag update" style="display:none;"><a class="external text" href="https://en.wikipedia.org/w/index.php?title=Data_type&amp;action=edit">&#91;update&#93;</a></sup>,<sup class="noprint Inline-Template" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Manual_of_Style/Dates_and_numbers#Chronological_items" title="Wikipedia:Manual of Style/Dates and numbers"><span title="The date of the event predicted near this tag has passed. (July 2024)">needs update</span></a></i>&#93;</sup> typically 32 or 64 bits). </p><p>Machine data types <i>expose</i> or make available fine-grained control over hardware, but this can also expose implementation details that make code less portable. Hence machine types are mainly used in <a href="/wiki/Systems_programming" title="Systems programming">systems programming</a> or <a href="/wiki/Low-level_programming_language" title="Low-level programming language">low-level programming languages</a>. In higher-level languages most data types are <i>abstracted</i> in that they do not have a language-defined machine representation. The <a href="/wiki/C_programming_language" class="mw-redirect" title="C programming language">C programming language</a>, for instance, supplies types such as Booleans, integers, floating-point numbers, etc., but the precise bit representations of these types are implementation-defined. The only C type with a precise machine representation is the <code>char</code> type that represents a byte.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Boolean_type">Boolean type</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=6" title="Edit section: Boolean type"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Boolean_type" class="mw-redirect" title="Boolean type">Boolean type</a> represents the values <a href="/wiki/Logical_truth" title="Logical truth">true</a> and <a href="/wiki/False_(logic)" title="False (logic)">false</a>. Although only two values are possible, they are more often represented as a byte or word rather as a single bit as it requires more machine instructions to store and retrieve an individual bit. Many programming languages do not have an explicit Boolean type, instead using an integer type and interpreting (for instance) 0 as false and other values as true. Boolean data refers to the logical structure of how the language is interpreted to the machine language. In this case a Boolean 0 refers to the logic False. True is always a non zero, especially a one which is known as Boolean 1. </p> <div class="mw-heading mw-heading3"><h3 id="Numeric_types">Numeric types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=7" title="Edit section: Numeric types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Almost all programming languages supply one or more <a href="/wiki/Integer_(computing)" class="mw-redirect" title="Integer (computing)">integer</a> data types. They may either supply a small number of predefined subtypes restricted to certain ranges (such as <code>short</code> and <code>long</code> and their corresponding <code>unsigned</code> variants in C/C++); or allow users to freely define subranges such as 1..12 (e.g. <a href="/wiki/Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>/<a href="/wiki/Ada_(programming_language)" title="Ada (programming language)">Ada</a>). If a corresponding native type does not exist on the target platform, the compiler will break them down into code using types that do exist. For instance, if a 32-bit integer is requested on a 16 bit platform, the compiler will tacitly treat it as an array of two 16 bit integers. </p><p><a href="/wiki/Floating_point" class="mw-redirect" title="Floating point">Floating point</a> data types represent certain fractional values (<a href="/wiki/Rational_numbers" class="mw-redirect" title="Rational numbers">rational numbers</a>, mathematically). Although they have predefined limits on both their maximum values and their precision, they are sometimes misleadingly called reals (evocative of mathematical <a href="/wiki/Real_numbers" class="mw-redirect" title="Real numbers">real numbers</a>). They are typically stored internally in the form <span class="texhtml">a × 2<sup>b</sup></span> (where <span class="texhtml">a</span> and <span class="texhtml">b</span> are integers), but displayed in familiar <a href="/wiki/Decimal" title="Decimal">decimal</a> form. </p><p><a href="/wiki/Fixed_point_(computing)" class="mw-redirect" title="Fixed point (computing)">Fixed point</a> data types are convenient for representing monetary values. They are often implemented internally as integers, leading to predefined limits. </p><p>For independence from architecture details, a <a href="/wiki/Bignum" class="mw-redirect" title="Bignum">Bignum</a> or <a href="/wiki/Arbitrary_precision" class="mw-redirect" title="Arbitrary precision">arbitrary precision</a> <code>numeric</code> type might be supplied. This represents an integer or rational to a precision limited only by the available memory and computational resources on the system. Bignum implementations of arithmetic operations on machine-sized values are significantly slower than the corresponding machine operations.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Enumerations">Enumerations</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=8" title="Edit section: Enumerations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Enumerated_type" title="Enumerated type">enumerated type</a> has distinct values, which can be compared and assigned, but which do not necessarily have any particular concrete representation in the computer's memory; compilers and interpreters can represent them arbitrarily. For example, the four suits in a deck of playing cards may be four enumerators named <i>CLUB</i>, <i>DIAMOND</i>, <i>HEART</i>, <i>SPADE</i>, belonging to an enumerated type named <i>suit</i>. If a variable <i>V</i> is declared having <i>suit</i> as its data type, one can assign any of those four values to it. Some implementations allow programmers to assign integer values to the enumeration values, or even treat them as type-equivalent to integers. </p> <div class="mw-heading mw-heading3"><h3 id="String_and_text_types">String and text types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=9" title="Edit section: String and text types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/String_(computer_science)" title="String (computer science)">Strings</a> are a sequence of <a href="/wiki/Character_(computing)" title="Character (computing)">characters</a> used to store words or <a href="/wiki/Plain_text" title="Plain text">plain text</a>, most often textual <a href="/wiki/Markup_languages" class="mw-redirect" title="Markup languages">markup languages</a> representing <a href="/wiki/Formatted_text" title="Formatted text">formatted text</a>. Characters may be a letter of some <a href="/wiki/Alphabet" title="Alphabet">alphabet</a>, a digit, a blank space, a punctuation mark, etc. Characters are drawn from a character set such as <a href="/wiki/ASCII" title="ASCII">ASCII</a> or <a href="/wiki/Unicode" title="Unicode">Unicode</a>. Character and string types can have different subtypes according to the character encoding. The original 7-bit wide ASCII was found to be limited, and superseded by 8, 16 and 32-bit sets, which can encode a wide variety of non-Latin alphabets (such as <a href="/wiki/Hebrew_language" title="Hebrew language">Hebrew</a> and <a href="/wiki/Chinese_language" title="Chinese language">Chinese</a>) and other symbols. Strings may be of either variable length or fixed length, and some programming languages have both types. They may also be subtyped by their maximum size. </p><p>Since most character sets include the <a href="/wiki/Numerical_digit" title="Numerical digit">digits</a>, it is possible to have a numeric string, such as <code>"1234"</code>. These numeric strings are usually considered distinct from numeric values such as <code>1234</code>, although some languages automatically convert between them. </p> <div class="mw-heading mw-heading3"><h3 id="Union_types">Union types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=10" title="Edit section: Union types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Union_(computer_science)" class="mw-redirect" title="Union (computer science)">Union (computer science)</a></div> <p>A union type definition will specify which of a number of permitted subtypes may be stored in its instances, e.g. "float or long integer". In contrast with a <a href="/wiki/Record_(computer_science)" title="Record (computer science)">record</a>, which could be defined to contain a float <i>and</i> an integer, a union may only contain one subtype at a time. </p><p>A <a href="/wiki/Tagged_union" title="Tagged union">tagged union</a> (also called a <a href="/wiki/Variant_type" class="mw-redirect" title="Variant type">variant</a>, variant record, discriminated union, or disjoint union) contains an additional field indicating its current type for enhanced type safety. </p> <div class="mw-heading mw-heading3"><h3 id="Algebraic_data_types">Algebraic data types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=11" title="Edit section: Algebraic data types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Algebraic_data_type" title="Algebraic data type">Algebraic data type</a></div> <p>An <a href="/wiki/Algebraic_data_type" title="Algebraic data type">algebraic data type</a> (ADT) is a possibly recursive <a href="/wiki/Sum_type" class="mw-redirect" title="Sum type">sum type</a> of <a href="/wiki/Product_type" title="Product type">product types</a>. A value of an ADT consists of a constructor tag together with zero or more field values, with the number and type of the field values fixed by the constructor. The set of all possible values of an ADT is the set-theoretic disjoint union (sum), of the sets of all possible values of its variants (product of fields). Values of algebraic types are analyzed with pattern matching, which identifies a value's constructor and extracts the fields it contains. </p><p>If there is only one constructor, then the ADT corresponds to a product type similar to a tuple or record. A constructor with no fields corresponds to the empty product (unit type). If all constructors have no fields then the ADT corresponds to an <a href="/wiki/Enumerated_type" title="Enumerated type">enumerated type</a>. </p><p>One common ADT is the <a href="/wiki/Option_type" title="Option type">option type</a>, defined in Haskell as <code class="mw-highlight mw-highlight-lang-haskell mw-content-ltr" dir="ltr"><span class="kr">data</span><span class="w"> </span><span class="kt">Maybe</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="kt">Nothing</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="kt">Just</span><span class="w"> </span><span class="n">a</span></code>.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Data_structures">Data structures</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=12" title="Edit section: Data structures"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some types are very useful for storing and retrieving data and are called <a href="/wiki/Data_structure" title="Data structure">data structures</a>. Common data structures include: </p> <ul><li>An <a href="/wiki/Array_data_type" class="mw-redirect" title="Array data type">array</a> (also called vector, <a href="/wiki/List_(abstract_data_type)" title="List (abstract data type)">list</a>, or sequence) stores a number of elements and provides <a href="/wiki/Random_access" title="Random access">random access</a> to individual elements. The elements of an array are typically (but not in all contexts) required to be of the same type. Arrays may be fixed-length or expandable. Indices into an array are typically required to be integers (if not, one may stress this relaxation by speaking about an <a href="/wiki/Associative_array" title="Associative array">associative array</a>) from a specific range (if not all indices in that range correspond to elements, it may be a <a href="/wiki/Sparse_array" class="mw-redirect" title="Sparse array">sparse array</a>).</li> <li><a href="/wiki/Record_(computer_science)" title="Record (computer science)">Record</a> (also called tuple or struct) Records are among the simplest <a href="/wiki/Data_structure" title="Data structure">data structures</a>. A record is a value that contains other values, typically in fixed number and sequence and typically indexed by names. The elements of records are usually called <i>fields</i> or <i>members</i>.</li> <li>An <a href="/wiki/Object_(computer_science)" title="Object (computer science)">object</a> contains a number of data fields, like a record, and also offers a number of subroutines for accessing or modifying them, called <a href="/wiki/Method_(computer_programming)" title="Method (computer programming)">methods</a>.</li> <li>the <a href="/wiki/Singly_linked_list" class="mw-redirect" title="Singly linked list">singly linked list</a>, which can be used to implement a <a href="/wiki/Queue_(abstract_data_type)" title="Queue (abstract data type)">queue</a> and is defined in Haskell as the ADT <code class="mw-highlight mw-highlight-lang-haskell mw-content-ltr" dir="ltr"><span class="kr">data</span><span class="w"> </span><span class="kt">List</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="kt">Nil</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="kt">Cons</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="p">(</span><span class="kt">List</span><span class="w"> </span><span class="n">a</span><span class="p">)</span></code>, and</li> <li>the <a href="/wiki/Binary_tree" title="Binary tree">binary tree</a>, which allows fast searching, and can be defined in Haskell as the ADT <code class="mw-highlight mw-highlight-lang-haskell mw-content-ltr" dir="ltr"><span class="kr">data</span><span class="w"> </span><span class="kt">BTree</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="kt">Nil</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="kt">Node</span><span class="w"> </span><span class="p">(</span><span class="kt">BTree</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="p">(</span><span class="kt">BTree</span><span class="w"> </span><span class="n">a</span><span class="p">)</span></code><sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup></li></ul> <div class="mw-heading mw-heading3"><h3 id="Abstract_data_types">Abstract data types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=13" title="Edit section: Abstract data types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Abstract_data_type" title="Abstract data type">Abstract data type</a></div> <p>An <a href="/wiki/Abstract_data_type" title="Abstract data type">abstract data type</a> is a data type that does not specify the concrete representation of the data. Instead, a formal <i>specification</i> based on the data type's operations is used to describe it. Any <i>implementation</i> of a specification must fulfill the rules given. For example, a <a href="/wiki/Stack_(abstract_data_type)" title="Stack (abstract data type)">stack</a> has push/pop operations that follow a Last-In-First-Out rule, and can be concretely implemented using either a list or an array. Abstract data types are used in formal <a href="/wiki/Semantics_(computer_science)" title="Semantics (computer science)">semantics</a> and program <a href="/wiki/Formal_verification" title="Formal verification">verification</a> and, less strictly, in <a href="/wiki/Design" title="Design">design</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Pointers_and_references">Pointers and references</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=14" title="Edit section: Pointers and references"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Reference_(computer_science)" title="Reference (computer science)">Reference (computer science)</a></div> <p>The main non-composite, derived type is the <a href="/wiki/Pointer_(computer_programming)" title="Pointer (computer programming)">pointer</a>, a data type whose value refers directly to (or "points to") another value stored elsewhere in the <a href="/wiki/Computer_memory" title="Computer memory">computer memory</a> using its <a href="/wiki/Memory_address" title="Memory address">address</a>. It is a primitive kind of <a href="/wiki/Reference_(computer_science)" title="Reference (computer science)">reference</a>. (In everyday terms, a page number in a book could be considered a piece of data that refers to another one). Pointers are often stored in a format similar to an integer; however, attempting to dereference or "look up" a pointer whose value was never a valid memory address would cause a program to crash. To ameliorate this potential problem, a pointer type is typically considered distinct from the corresponding integer type, even if the underlying representation is the same. </p> <div class="mw-heading mw-heading3"><h3 id="Function_types">Function types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=15" title="Edit section: Function types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Function_type" title="Function type">Function type</a></div> <p><a href="/wiki/Functional_programming" title="Functional programming">Functional programming</a> languages treat functions as a distinct datatype and allow values of this type to be stored in variables and passed to functions. Some multi-paradigm languages such as <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> also have mechanisms for treating functions as data.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> Most contemporary <a href="/wiki/Type_systems" class="mw-redirect" title="Type systems">type systems</a> go beyond JavaScript's simple type "function object" and have a family of function types differentiated by argument and return types, such as the type <code>Int -&gt; Bool</code> denoting functions taking an integer and returning a Boolean. In C, a function is not a first-class data type but <a href="/wiki/Function_pointer" title="Function pointer">function pointers</a> can be manipulated by the program. Java and C++ originally did not have function values but have added them in C++11 and Java 8. </p> <div class="mw-heading mw-heading3"><h3 id="Type_constructors">Type constructors</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=16" title="Edit section: Type constructors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Type_constructor" title="Type constructor">Type constructor</a></div> <p>A type constructor builds new types from old ones, and can be thought of as an operator taking zero or more types as arguments and producing a type. Product types, function types, power types and list types can be made into type constructors. </p> <div class="mw-heading mw-heading3"><h3 id="Quantified_types">Quantified types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=17" title="Edit section: Quantified types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Universally-quantified and existentially-quantified types are based on <a href="/wiki/Predicate_logic" class="mw-redirect" title="Predicate logic">predicate logic</a>. Universal quantification is written as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \forall x.f(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">&#x2200;<!-- ∀ --></mi> <mi>x</mi> <mo>.</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \forall x.f(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a2a518f191a78418bd9169bd40b92e10f76a9c02" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.074ex; height:2.843ex;" alt="{\displaystyle \forall x.f(x)}"></span> or <code>forall x. f x</code> and is the intersection over all types <code>x</code> of the body <code>f x</code>, i.e. the value is of type <code>f x</code> for every <code>x</code>. Existential quantification written as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \exists x.f(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">&#x2203;<!-- ∃ --></mi> <mi>x</mi> <mo>.</mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \exists x.f(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ae1ccba7d3e8c6bc504bceae7d48e5c634e95bc5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.074ex; height:2.843ex;" alt="{\displaystyle \exists x.f(x)}"></span> or <code>exists x. f x</code> and is the union over all types <code>x</code> of the body <code>f x</code>, i.e. the value is of type <code>f x</code> for some <code>x</code>. </p><p>In Haskell, universal quantification is commonly used, but existential types must be encoded by transforming <code>exists a. f a</code> to <code>forall r. (forall a. f a -&gt; r) -&gt; r</code> or a similar type. </p> <div class="mw-heading mw-heading3"><h3 id="Refinement_types">Refinement types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=18" title="Edit section: Refinement types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Refinement_type" title="Refinement type">Refinement type</a></div> <p>A refinement type is a type endowed with a predicate which is assumed to hold for any element of the refined type. For instance, the type of natural numbers greater than 5 may be written as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{n\in \mathbb {N} \,|\,n&gt;5\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <mi>n</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">N</mi> </mrow> <mspace width="thinmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mspace width="thinmathspace" /> <mi>n</mi> <mo>&gt;</mo> <mn>5</mn> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{n\in \mathbb {N} \,|\,n&gt;5\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/05fcfbcbdefc1ad08aedb78ecc7cc1d8b7db1efc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.315ex; height:2.843ex;" alt="{\displaystyle \{n\in \mathbb {N} \,|\,n&gt;5\}}"></span> </p> <div class="mw-heading mw-heading3"><h3 id="Dependent_types">Dependent types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=19" title="Edit section: Dependent types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Dependent_type" title="Dependent type">Dependent type</a></div> <p>A dependent type is a type whose definition depends on a value. Two common examples of dependent types are dependent functions and dependent pairs. The return type of a dependent function may depend on the value (not just type) of one of its arguments. A dependent pair may have a second value of which the type depends on the first value. </p> <div class="mw-heading mw-heading3"><h3 id="Intersection_types">Intersection types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=20" title="Edit section: Intersection types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Intersection_type" title="Intersection type">Intersection type</a></div> <p>An intersection type is a type containing those values that are members of two specified types. For example, in <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a> the class <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">Boolean</code> implements both the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">Serializable</code> and the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">Comparable</code> interfaces. Therefore, an object of type <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">Boolean</code> is a member of the type <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">Serializable &amp; Comparable</code>. Considering types as sets of values, the intersection type <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma \cap \tau }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C3;<!-- σ --></mi> <mo>&#x2229;<!-- ∩ --></mo> <mi>&#x03C4;<!-- τ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma \cap \tau }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f1b5fbc85a391ea8ded8940802c28265a131830b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.114ex; height:2.009ex;" alt="{\displaystyle \sigma \cap \tau }"></span> is the set-theoretic <a href="/wiki/Intersection_(set_theory)" title="Intersection (set theory)">intersection</a> of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C3;<!-- σ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/59f59b7c3e6fdb1d0365a494b81fb9a696138c36" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle \sigma }"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \tau }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C4;<!-- τ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \tau }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/38a7dcde9730ef0853809fefc18d88771f95206c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.202ex; height:1.676ex;" alt="{\displaystyle \tau }"></span>. It is also possible to define a dependent intersection type, denoted <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (x:\sigma )\cap \tau }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>x</mi> <mo>:</mo> <mi>&#x03C3;<!-- σ --></mi> <mo stretchy="false">)</mo> <mo>&#x2229;<!-- ∩ --></mo> <mi>&#x03C4;<!-- τ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (x:\sigma )\cap \tau }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1d1582886a9278c7fc635dac09779d9546f7a372" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.19ex; height:2.843ex;" alt="{\displaystyle (x:\sigma )\cap \tau }"></span>, where the type <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \tau }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>&#x03C4;<!-- τ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \tau }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/38a7dcde9730ef0853809fefc18d88771f95206c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.202ex; height:1.676ex;" alt="{\displaystyle \tau }"></span> may depend on the term variable <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span>.<sup id="cite_ref-K03_14-0" class="reference"><a href="#cite_note-K03-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Meta_types">Meta types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=21" title="Edit section: Meta types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Metaclass" title="Metaclass">Metaclass</a></div> <p>Some programming languages represent the type information as data, enabling <a href="/wiki/Type_introspection" title="Type introspection">type introspection</a> and <a href="/wiki/Reflective_programming" title="Reflective programming">reflective programming</a> (reflection). In contrast, <a href="/wiki/Type_constructor" title="Type constructor">higher order</a> <a href="/wiki/Type_system" title="Type system">type systems</a>, while allowing types to be constructed from other types and passed to functions as values, typically avoid basing <a href="/wiki/Computation" title="Computation">computational</a> decisions on them.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (September 2021)">citation needed</span></a></i>&#93;</sup> </p> <div class="mw-heading mw-heading3"><h3 id="Convenience_types">Convenience types</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=22" title="Edit section: Convenience types"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For convenience, high-level languages and databases may supply ready-made "real world" data types, for instance times, dates, and monetary values (currency).<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> These may be built-in to the language or implemented as composite types in a library.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=23" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1184024115">.mw-parser-output .div-col{margin-top:0.3em;column-width:30em}.mw-parser-output .div-col-small{font-size:90%}.mw-parser-output .div-col-rules{column-rule:1px solid #aaa}.mw-parser-output .div-col dl,.mw-parser-output .div-col ol,.mw-parser-output .div-col ul{margin-top:0}.mw-parser-output .div-col li,.mw-parser-output .div-col dd{page-break-inside:avoid;break-inside:avoid-column}</style><div class="div-col"> <ul><li><a href="/wiki/C_data_types" title="C data types">C data types</a></li> <li><a href="/wiki/Data_dictionary" title="Data dictionary">Data dictionary</a></li> <li><a href="/wiki/Kind_(type_theory)" title="Kind (type theory)">Kind</a></li> <li><a href="/wiki/Type_(model_theory)" title="Type (model theory)">Type (model theory)</a></li> <li><a href="/wiki/Type_theory" title="Type theory">Type theory</a> for the mathematical models of types</li> <li><a href="/wiki/Type_conversion" title="Type conversion">Type conversion</a></li> <li><a href="/wiki/ISO/IEC_11404" title="ISO/IEC 11404">ISO/IEC 11404</a>, General Purpose Datatypes</li> <li><a href="/wiki/Statistical_data_type" title="Statistical data type">Statistical data type</a></li></ul> </div> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=24" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-FOOTNOTEParnasShoreWeiss1976-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEParnasShoreWeiss1976_1-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFParnasShoreWeiss1976">Parnas, Shore &amp; Weiss 1976</a>.</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1041539562">.mw-parser-output .citation{word-wrap:break-word}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}</style><span class="citation foldoc"> <a rel="nofollow" class="external text" href="https://foldoc.org/type">type</a> at the <i><a href="/wiki/Free_On-line_Dictionary_of_Computing" title="Free On-line Dictionary of Computing">Free On-line Dictionary of Computing</a></i> </span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFShaffer2011" class="citation book cs1">Shaffer, C. A. (2011). <i>Data Structures &amp; Algorithm Analysis in C++</i> (3rd&#160;ed.). Mineola, NY: Dover. 1.2. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-486-48582-9" title="Special:BookSources/978-0-486-48582-9"><bdi>978-0-486-48582-9</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Data+Structures+%26+Algorithm+Analysis+in+C%2B%2B&amp;rft.place=Mineola%2C+NY&amp;rft.pages=1.2&amp;rft.edition=3rd&amp;rft.pub=Dover&amp;rft.date=2011&amp;rft.isbn=978-0-486-48582-9&amp;rft.aulast=Shaffer&amp;rft.aufirst=C.+A.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFScott1976" class="citation journal cs1">Scott, Dana (September 1976). "Data Types as Lattices". <i>SIAM Journal on Computing</i>. <b>5</b> (3): <span class="nowrap">540–</span>541. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2F0205037">10.1137/0205037</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=SIAM+Journal+on+Computing&amp;rft.atitle=Data+Types+as+Lattices&amp;rft.volume=5&amp;rft.issue=3&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E540-%3C%2Fspan%3E541&amp;rft.date=1976-09&amp;rft_id=info%3Adoi%2F10.1137%2F0205037&amp;rft.aulast=Scott&amp;rft.aufirst=Dana&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md">"Rust RFCs - Integer Overflow"</a>. The Rust Programming Language. 12 August 2022.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Rust+&#82;FCs+-+Integer+Overflow&amp;rft.pub=The+Rust+Programming+Language&amp;rft.date=2022-08-12&amp;rft_id=https%3A%2F%2Fgithub.com%2Frust-lang%2Frfcs%2Fblob%2Fmaster%2Ftext%2F0560-integer-overflow.md&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDaleWeemsHeadington1998" class="citation book cs1">Dale, Nell B.; Weems, Chip; Headington, Mark R. (1998). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=yy2qKCf2_UYC&amp;pg=PA349"><i>Programming in C++</i></a>. Jones &amp; Bartlett Learning. p.&#160;349. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-7637-0537-4" title="Special:BookSources/978-0-7637-0537-4"><bdi>978-0-7637-0537-4</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Programming+in+C%2B%2B&amp;rft.pages=349&amp;rft.pub=Jones+%26+Bartlett+Learning&amp;rft.date=1998&amp;rft.isbn=978-0-7637-0537-4&amp;rft.aulast=Dale&amp;rft.aufirst=Nell+B.&amp;rft.au=Weems%2C+Chip&amp;rft.au=Headington%2C+Mark+R.&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3Dyy2qKCf2_UYC%26pg%3DPA349&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><a href="/wiki/ISO/IEC_11404" title="ISO/IEC 11404">ISO/IEC 11404</a>, 6.4</span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBHATNAGAR2008" class="citation book cs1">BHATNAGAR, SEEMA (19 August 2008). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=bjE5EHw35DkC&amp;pg=PA182"><i>TEXTBOOK OF COMPUTER SCIENCE FOR CLASS XI</i></a>. PHI Learning Pvt. Ltd. p.&#160;182. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-81-203-2993-5" title="Special:BookSources/978-81-203-2993-5"><bdi>978-81-203-2993-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=TEXTBOOK+OF+COMPUTER+SCIENCE+FOR+CLASS+XI&amp;rft.pages=182&amp;rft.pub=PHI+Learning+Pvt.+Ltd.&amp;rft.date=2008-08-19&amp;rft.isbn=978-81-203-2993-5&amp;rft.aulast=BHATNAGAR&amp;rft.aufirst=SEEMA&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DbjE5EHw35DkC%26pg%3DPA182&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf">"SC22/WG14 N2176"</a> <span class="cs1-format">(PDF)</span>. Wayback Machine. Section 6.2.6.2. Archived from <a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 30 December 2018. <q>Which of [sign and magnitude, two's complement, one's complement] applies is implementation-defined</q></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=SC22%2FWG14+N2176&amp;rft.pages=Section+6.2.6.2&amp;rft.pub=Wayback+Machine&amp;rft_id=http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg14%2Fwww%2Fabq%2Fc17_updated_proposed_fdis.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://bluescarni.github.io/mppp/integer_benchmarks.html">"Integer benchmarks — mp++ 0.27 documentation"</a>. <i>bluescarni.github.io</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=bluescarni.github.io&amp;rft.atitle=Integer+benchmarks+%E2%80%94+mp%2B%2B+0.27+documentation&amp;rft_id=https%3A%2F%2Fbluescarni.github.io%2Fmppp%2Finteger_benchmarks.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1250006.1.8">"6 Predefined Types and Classes"</a>. <i>www.haskell.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-06-15</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=www.haskell.org&amp;rft.atitle=6+Predefined+Types+and+Classes&amp;rft_id=https%3A%2F%2Fwww.haskell.org%2Fonlinereport%2Fhaskell2010%2Fhaskellch6.html%23x13-1250006.1.8&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSuresh" class="citation web cs1">Suresh, S P. <a rel="nofollow" class="external text" href="https://www.cmi.ac.in/~spsuresh/teaching/prgh19/lectures/lecture22.pdf">"Programming in Haskell: Lecture 22"</a> <span class="cs1-format">(PDF)</span>. Chennai Mathematical Institute<span class="reference-accessdate">. Retrieved <span class="nowrap">10 August</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Programming+in+Haskell%3A+Lecture+22&amp;rft.pub=Chennai+Mathematical+Institute&amp;rft.aulast=Suresh&amp;rft.aufirst=S+P&amp;rft_id=https%3A%2F%2Fwww.cmi.ac.in%2F~spsuresh%2Fteaching%2Fprgh19%2Flectures%2Flecture22.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFlanagan1997" class="citation book cs1">Flanagan, David (1997). "6.2 Functions as Data Types". <i>JavaScript: the definitive guide</i> (2nd&#160;ed.). Cambridge: O'Reilly &amp; Associates. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9781565922341" title="Special:BookSources/9781565922341"><bdi>9781565922341</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=6.2+Functions+as+Data+Types&amp;rft.btitle=JavaScript%3A+the+definitive+guide&amp;rft.place=Cambridge&amp;rft.edition=2nd&amp;rft.pub=O%27Reilly+%26+Associates&amp;rft.date=1997&amp;rft.isbn=9781565922341&amp;rft.aulast=Flanagan&amp;rft.aufirst=David&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-K03-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-K03_14-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKopylov2003" class="citation conference cs1">Kopylov, Alexei (2003). "Dependent intersection: A new way of defining records in type theory". <i>18th IEEE Symposium on Logic in Computer Science</i>. LICS 2003. IEEE Computer Society. pp.&#160;<span class="nowrap">86–</span>95. <a href="/wiki/CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&#160;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.89.4223">10.1.1.89.4223</a></span>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FLICS.2003.1210048">10.1109/LICS.2003.1210048</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=Dependent+intersection%3A+A+new+way+of+defining+records+in+type+theory&amp;rft.btitle=18th+IEEE+Symposium+on+Logic+in+Computer+Science&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E86-%3C%2Fspan%3E95&amp;rft.pub=IEEE+Computer+Society&amp;rft.date=2003&amp;rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.89.4223%23id-name%3DCiteSeerX&amp;rft_id=info%3Adoi%2F10.1109%2FLICS.2003.1210048&amp;rft.aulast=Kopylov&amp;rft.aufirst=Alexei&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWest2020" class="citation web cs1">West, Randolph (27 May 2020). <a rel="nofollow" class="external text" href="https://bornsql.ca/blog/how-sql-server-stores-data-types-money/">"How SQL Server stores data types: money"</a>. <i>Born SQL</i><span class="reference-accessdate">. Retrieved <span class="nowrap">28 January</span> 2022</span>. <q>Some time ago I described MONEY as a "convenience" data type which is effectively the same as DECIMAL(19,4), [...]</q></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Born+SQL&amp;rft.atitle=How+SQL+Server+stores+data+types%3A+money&amp;rft.date=2020-05-27&amp;rft.aulast=West&amp;rft.aufirst=Randolph&amp;rft_id=https%3A%2F%2Fbornsql.ca%2Fblog%2Fhow-sql-server-stores-data-types-money%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://support.microsoft.com/en-us/office/introduction-to-data-types-and-field-properties-30ad644f-946c-442e-8bd2-be067361987c">"Introduction to data types and field properties"</a>. <i>support.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">28 January</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=support.microsoft.com&amp;rft.atitle=Introduction+to+data+types+and+field+properties&amp;rft_id=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fintroduction-to-data-types-and-field-properties-30ad644f-946c-442e-8bd2-be067361987c&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWickham2017" class="citation book cs1">Wickham, Hadley (2017). <a rel="nofollow" class="external text" href="https://r4ds.had.co.nz/dates-and-times.html">"16 Dates and times"</a>. <i>R for data science: import, tidy, transform, visualize, and model data</i>. Sebastopol, CA. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1491910399" title="Special:BookSources/978-1491910399"><bdi>978-1491910399</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">28 January</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=16+Dates+and+times&amp;rft.btitle=R+for+data+science%3A+import%2C+tidy%2C+transform%2C+visualize%2C+and+model+data&amp;rft.place=Sebastopol%2C+CA&amp;rft.date=2017&amp;rft.isbn=978-1491910399&amp;rft.aulast=Wickham&amp;rft.aufirst=Hadley&amp;rft_id=https%3A%2F%2Fr4ds.had.co.nz%2Fdates-and-times.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span><span class="cs1-maint citation-comment"><code class="cs1-code">{{<a href="/wiki/Template:Cite_book" title="Template:Cite book">cite book</a>}}</code>: CS1 maint: location missing publisher (<a href="/wiki/Category:CS1_maint:_location_missing_publisher" title="Category:CS1 maint: location missing publisher">link</a>)</span></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=25" title="Edit section: Further reading"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFParnasShoreWeiss1976" class="citation book cs1"><a href="/wiki/David_Parnas" title="David Parnas">Parnas, David L.</a>; Shore, John E.; Weiss, David (1976). "Abstract types defined as classes of variables". <i>Proceedings of the 1976 conference on Data&#160;: Abstraction, definition and structure -</i>. pp.&#160;<span class="nowrap">149–</span>154. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F800237.807133">10.1145/800237.807133</a></span>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:14448258">14448258</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Abstract+types+defined+as+classes+of+variables&amp;rft.btitle=Proceedings+of+the+1976+conference+on+Data+%3A+Abstraction%2C+definition+and+structure+-&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E149-%3C%2Fspan%3E154&amp;rft.date=1976&amp;rft_id=info%3Adoi%2F10.1145%2F800237.807133&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A14448258%23id-name%3DS2CID&amp;rft.aulast=Parnas&amp;rft.aufirst=David+L.&amp;rft.au=Shore%2C+John+E.&amp;rft.au=Weiss%2C+David&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCardelliWegner1985" class="citation journal cs1"><a href="/wiki/Luca_Cardelli" title="Luca Cardelli">Cardelli, Luca</a>; <a href="/wiki/Peter_Wegner_(computer_scientist)" title="Peter Wegner (computer scientist)">Wegner, Peter</a> (December 1985). <a rel="nofollow" class="external text" href="http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf">"On Understanding Types, Data Abstraction, and Polymorphism"</a> <span class="cs1-format">(PDF)</span>. <i><a href="/wiki/ACM_Computing_Surveys" title="ACM Computing Surveys">ACM Computing Surveys</a></i>. <b>17</b> (4): <span class="nowrap">471–</span>523. <a href="/wiki/CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&#160;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.695">10.1.1.117.695</a></span>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F6041.6042">10.1145/6041.6042</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&#160;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0360-0300">0360-0300</a>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:2921816">2921816</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20081203071429/http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2008-12-03.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=ACM+Computing+Surveys&amp;rft.atitle=On+Understanding+Types%2C+Data+Abstraction%2C+and+Polymorphism&amp;rft.volume=17&amp;rft.issue=4&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E471-%3C%2Fspan%3E523&amp;rft.date=1985-12&amp;rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.117.695%23id-name%3DCiteSeerX&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A2921816%23id-name%3DS2CID&amp;rft.issn=0360-0300&amp;rft_id=info%3Adoi%2F10.1145%2F6041.6042&amp;rft.aulast=Cardelli&amp;rft.aufirst=Luca&amp;rft.au=Wegner%2C+Peter&amp;rft_id=http%3A%2F%2Flucacardelli.name%2FPapers%2FOnUnderstanding.A4.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCleaveland1986" class="citation book cs1">Cleaveland, J. Craig (1986). <i>An Introduction to Data Types</i>. Addison-Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0201119404" title="Special:BookSources/978-0201119404"><bdi>978-0201119404</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=An+Introduction+to+Data+Types&amp;rft.pub=Addison-Wesley&amp;rft.date=1986&amp;rft.isbn=978-0201119404&amp;rft.aulast=Cleaveland&amp;rft.aufirst=J.+Craig&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AData+type" class="Z3988"></span></li></ul> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Data_type&amp;action=edit&amp;section=26" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Commons-logo.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/12px-Commons-logo.svg.png" decoding="async" width="12" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/18px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/24px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></a></span> Media related to <a href="https://commons.wikimedia.org/wiki/Category:Data_types" class="extiw" title="commons:Category:Data types">Data types</a> at Wikimedia Commons</li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Data_types177" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Data_types" title="Template:Data types"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Data_types" title="Template talk:Data types"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Data_types" title="Special:EditPage/Template:Data types"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Data_types177" style="font-size:114%;margin:0 4em"><a class="mw-selflink selflink">Data types</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Units_of_information" title="Units of information">Uninterpreted</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bit" title="Bit">Bit</a></li> <li><a href="/wiki/Byte" title="Byte">Byte</a></li> <li><a href="/wiki/Ternary_numeral_system" title="Ternary numeral system">Trit</a></li> <li><a href="/wiki/Ternary_numeral_system#Tryte" title="Ternary numeral system">Tryte</a></li> <li><a href="/wiki/Word_(computer_architecture)" title="Word (computer architecture)">Word</a></li> <li><a href="/wiki/Bit_array" title="Bit array">Bit array</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Numeric</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">Arbitrary-precision or bignum</a></li> <li><a href="/wiki/Complex_data_type" title="Complex data type">Complex</a></li> <li><a href="/wiki/Decimal_data_type" title="Decimal data type">Decimal</a></li> <li><a href="/wiki/Fixed-point_arithmetic" title="Fixed-point arithmetic">Fixed point</a></li> <li><a href="/wiki/Floating-point_arithmetic" title="Floating-point arithmetic">Floating point</a> <ul><li>Reduced precision <ul><li><a href="/wiki/Minifloat" title="Minifloat">Minifloat</a></li> <li><a href="/wiki/Half-precision_floating-point_format" title="Half-precision floating-point format">Half precision</a></li> <li><a href="/wiki/Bfloat16_floating-point_format" title="Bfloat16 floating-point format">bfloat16</a></li></ul></li> <li><a href="/wiki/Single-precision_floating-point_format" title="Single-precision floating-point format">Single precision</a></li> <li><a href="/wiki/Double-precision_floating-point_format" title="Double-precision floating-point format">Double precision</a></li> <li><a href="/wiki/Quadruple-precision_floating-point_format" title="Quadruple-precision floating-point format">Quadruple precision</a></li> <li><a href="/wiki/Octuple-precision_floating-point_format" title="Octuple-precision floating-point format">Octuple precision</a></li> <li><a href="/wiki/Extended_precision" title="Extended precision">Extended precision</a> <ul><li><a href="/wiki/Long_double" title="Long double">Long double</a></li></ul></li></ul></li> <li><a href="/wiki/Integer_(computer_science)" title="Integer (computer science)">Integer</a> <ul><li><a href="/wiki/Signedness" title="Signedness">signedness</a></li></ul></li> <li><a href="/wiki/Interval_arithmetic#Implementations" title="Interval arithmetic">Interval</a></li> <li><a href="/wiki/Rational_data_type" title="Rational data type">Rational</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Pointer_(computer_programming)" title="Pointer (computer programming)">Pointer</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Memory_address" title="Memory address">Address</a> <ul><li><a href="/wiki/Physical_address" title="Physical address">physical</a></li> <li><a href="/wiki/Virtual_address_space" title="Virtual address space">virtual</a></li></ul></li> <li><a href="/wiki/Reference_(computer_science)" title="Reference (computer science)">Reference</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Plain_text" title="Plain text">Text</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Character_(computing)" title="Character (computing)">Character</a></li> <li><a href="/wiki/String_(computer_science)" title="String (computer science)">String</a> <ul><li><a href="/wiki/Null-terminated_string" title="Null-terminated string">null-terminated</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Composite_data_type" title="Composite data type">Composite</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Algebraic_data_type" title="Algebraic data type">Algebraic data type</a> <ul><li><a href="/wiki/Generalized_algebraic_data_type" title="Generalized algebraic data type">generalized</a></li></ul></li> <li><a href="/wiki/Array_data_type" class="mw-redirect" title="Array data type">Array</a></li> <li><a href="/wiki/Associative_array" title="Associative array">Associative array</a></li> <li><a href="/wiki/Class_(computer_programming)" title="Class (computer programming)">Class</a></li> <li><a href="/wiki/Dependent_type" title="Dependent type">Dependent</a></li> <li><a href="/wiki/Intuitionistic_type_theory#Equality_type" title="Intuitionistic type theory">Equality</a></li> <li><a href="/wiki/Inductive_type" title="Inductive type">Inductive</a></li> <li><a href="/wiki/Intersection_type" title="Intersection type">Intersection</a></li> <li><a href="/wiki/List_(abstract_data_type)" title="List (abstract data type)">List</a></li> <li><a href="/wiki/Object_(computer_science)" title="Object (computer science)">Object</a> <ul><li><a href="/wiki/Metaobject" title="Metaobject">metaobject</a></li></ul></li> <li><a href="/wiki/Option_type" title="Option type">Option type</a></li> <li><a href="/wiki/Product_type" title="Product type">Product</a></li> <li><a href="/wiki/Record_(computer_science)" title="Record (computer science)">Record or Struct</a></li> <li><a href="/wiki/Refinement_type" title="Refinement type">Refinement</a></li> <li><a href="/wiki/Set_(abstract_data_type)" title="Set (abstract data type)">Set</a></li> <li><a href="/wiki/Union_type" title="Union type">Union</a> <ul><li><a href="/wiki/Tagged_union" title="Tagged union">tagged</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Boolean_data_type" title="Boolean data type">Boolean</a></li> <li><a href="/wiki/Bottom_type" title="Bottom type">Bottom type</a></li> <li><a href="/wiki/Container_(abstract_data_type)" title="Container (abstract data type)">Collection</a></li> <li><a href="/wiki/Enumerated_type" title="Enumerated type">Enumerated type</a></li> <li><a href="/wiki/Exception_handling" title="Exception handling">Exception</a></li> <li><a href="/wiki/Function_type" title="Function type">Function type</a></li> <li><a href="/wiki/Opaque_data_type" title="Opaque data type">Opaque data type</a></li> <li><a href="/wiki/Recursive_data_type" title="Recursive data type">Recursive data type</a></li> <li><a href="/wiki/Semaphore_(programming)" title="Semaphore (programming)">Semaphore</a></li> <li><a href="/wiki/Stream_(computing)" title="Stream (computing)">Stream</a></li> <li><a href="/wiki/Strongly_typed_identifier" title="Strongly typed identifier">Strongly typed identifier</a></li> <li><a href="/wiki/Top_type" title="Top type">Top type</a></li> <li><a href="/wiki/Type_class" title="Type class">Type class</a></li> <li><a href="/wiki/Empty_type" title="Empty type">Empty type</a></li> <li><a href="/wiki/Unit_type" title="Unit type">Unit type</a></li> <li><a href="/wiki/Void_type" title="Void type">Void</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related<br />topics</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Abstract_data_type" title="Abstract data type">Abstract data type</a></li> <li><a href="/wiki/Boxing_(computer_science)" class="mw-redirect" title="Boxing (computer science)">Boxing</a></li> <li><a href="/wiki/Data_structure" title="Data structure">Data structure</a></li> <li><a href="/wiki/Generic_programming" title="Generic programming">Generic</a></li> <li><a href="/wiki/Kind_(type_theory)" title="Kind (type theory)">Kind</a> <ul><li><a href="/wiki/Metaclass" title="Metaclass">metaclass</a></li></ul></li> <li><a href="/wiki/Parametric_polymorphism" title="Parametric polymorphism">Parametric polymorphism</a></li> <li><a href="/wiki/Primitive_data_type" title="Primitive data type">Primitive data type</a></li> <li><a href="/wiki/Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">Interface</a></li> <li><a href="/wiki/Subtyping" title="Subtyping">Subtyping</a></li> <li><a href="/wiki/Type_constructor" title="Type constructor">Type constructor</a></li> <li><a href="/wiki/Type_conversion" title="Type conversion">Type conversion</a></li> <li><a href="/wiki/Type_system" title="Type system">Type system</a></li> <li><a href="/wiki/Type_theory" title="Type theory">Type theory</a></li> <li><a href="/wiki/Variable_(computer_science)" title="Variable (computer science)">Variable</a></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"><style data-mw-deduplicate="TemplateStyles:r1038841319">.mw-parser-output .tooltip-dotted{border-bottom:1px dotted;cursor:help}</style></div><div role="navigation" class="navbox authority-control" aria-label="Navbox997" style="padding:3px"><table class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Help:Authority_control" title="Help:Authority control">Authority control databases</a>: National <span class="mw-valign-text-top noprint" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q190087#identifiers" title="Edit this at Wikidata"><img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20" /></a></span></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/4011149-0">Germany</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh2015001723">United States</a></span></li><li><span class="uid"><span class="rt-commentedText tooltip tooltip-dotted" title="datové typy"><a rel="nofollow" class="external text" href="https://aleph.nkp.cz/F/?func=find-c&amp;local_base=aut&amp;ccl_term=ica=ph317222&amp;CON_LNG=ENG">Czech Republic</a></span></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://kopkatalogs.lv/F?func=direct&amp;local_base=lnc10&amp;doc_number=000296699&amp;P_CON_LNG=ENG">Latvia</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007412495605171">Israel</a></span></li></ul></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐698c79758b‐vhlbm Cached time: 20250225120549 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.471 seconds Real time usage: 0.675 seconds Preprocessor visited node count: 2812/1000000 Post‐expand include size: 63426/2097152 bytes Template argument size: 3130/2097152 bytes Highest expansion depth: 15/100 Expensive parser function count: 24/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 77586/5000000 bytes Lua time usage: 0.278/10.000 seconds Lua memory usage: 7505760/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 517.603 1 -total 29.21% 151.201 1 Template:Reflist 18.35% 94.969 7 Template:Cite_book 13.62% 70.488 1 Template:Data_types 13.21% 68.400 1 Template:Navbox 11.42% 59.092 1 Template:Short_description 6.49% 33.604 2 Template:Pagetype 6.19% 32.040 1 Template:Needs_update 6.10% 31.549 1 Template:Authority_control 6.05% 31.314 2 Template:Fix --> <!-- Saved in parser cache with key enwiki:pcache:93817:|#|:idhash:canonical and timestamp 20250225120549 and revision id 1274970518. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&amp;type=1x1&amp;usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Data_type&amp;oldid=1274970518">https://en.wikipedia.org/w/index.php?title=Data_type&amp;oldid=1274970518</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Data_types" title="Category:Data types">Data types</a></li><li><a href="/wiki/Category:Programming_language_concepts" title="Category:Programming language concepts">Programming language concepts</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:CS1_maint:_location_missing_publisher" title="Category:CS1 maint: location missing publisher">CS1 maint: location missing publisher</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Articles_with_example_C_code" title="Category:Articles with example C code">Articles with example C code</a></li><li><a href="/wiki/Category:Articles_containing_potentially_dated_statements_from_2011" title="Category:Articles containing potentially dated statements from 2011">Articles containing potentially dated statements from 2011</a></li><li><a href="/wiki/Category:All_articles_containing_potentially_dated_statements" title="Category:All articles containing potentially dated statements">All articles containing potentially dated statements</a></li><li><a href="/wiki/Category:Wikipedia_articles_in_need_of_updating_from_July_2024" title="Category:Wikipedia articles in need of updating from July 2024">Wikipedia articles in need of updating from July 2024</a></li><li><a href="/wiki/Category:All_Wikipedia_articles_in_need_of_updating" title="Category:All Wikipedia articles in need of updating">All Wikipedia articles in need of updating</a></li><li><a href="/wiki/Category:Articles_with_example_Haskell_code" title="Category:Articles with example Haskell code">Articles with example Haskell code</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_September_2021" title="Category:Articles with unsourced statements from September 2021">Articles with unsourced statements from September 2021</a></li><li><a href="/wiki/Category:Commons_category_link_is_on_Wikidata" title="Category:Commons category link is on Wikidata">Commons category link is on Wikidata</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 10 February 2025, at 09:33<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Data_type&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/static/images/footer/wikimedia-button.svg" width="84" height="29"><img src="/static/images/footer/wikimedia.svg" width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy"></picture></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" width="25" height="25" loading="lazy"></picture></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia"> <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">Data type</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>53 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-698c79758b-m78xc","wgBackendResponseTime":135,"wgPageParseReport":{"limitreport":{"cputime":"0.471","walltime":"0.675","ppvisitednodes":{"value":2812,"limit":1000000},"postexpandincludesize":{"value":63426,"limit":2097152},"templateargumentsize":{"value":3130,"limit":2097152},"expansiondepth":{"value":15,"limit":100},"expensivefunctioncount":{"value":24,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":77586,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 517.603 1 -total"," 29.21% 151.201 1 Template:Reflist"," 18.35% 94.969 7 Template:Cite_book"," 13.62% 70.488 1 Template:Data_types"," 13.21% 68.400 1 Template:Navbox"," 11.42% 59.092 1 Template:Short_description"," 6.49% 33.604 2 Template:Pagetype"," 6.19% 32.040 1 Template:Needs_update"," 6.10% 31.549 1 Template:Authority_control"," 6.05% 31.314 2 Template:Fix"]},"scribunto":{"limitreport-timeusage":{"value":"0.278","limit":"10.000"},"limitreport-memusage":{"value":7505760,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFBHATNAGAR2008\"] = 1,\n [\"CITEREFCardelliWegner1985\"] = 1,\n [\"CITEREFCleaveland1986\"] = 1,\n [\"CITEREFDaleWeemsHeadington1998\"] = 1,\n [\"CITEREFFlanagan1997\"] = 1,\n [\"CITEREFKopylov2003\"] = 1,\n [\"CITEREFParnasShoreWeiss1976\"] = 1,\n [\"CITEREFScott1976\"] = 1,\n [\"CITEREFShaffer2011\"] = 1,\n [\"CITEREFSuresh\"] = 1,\n [\"CITEREFWest2020\"] = 1,\n [\"CITEREFWickham2017\"] = 1,\n}\ntemplate_list = table#1 {\n [\"!\"] = 3,\n [\"As of\"] = 1,\n [\"Authority control\"] = 1,\n [\"C-lang\"] = 1,\n [\"Citation needed\"] = 1,\n [\"Cite book\"] = 7,\n [\"Cite conference\"] = 1,\n [\"Cite journal\"] = 2,\n [\"Cite web\"] = 7,\n [\"Code\"] = 5,\n [\"Commons category-inline\"] = 1,\n [\"DEFAULTSORT:Data Type\"] = 1,\n [\"Data types\"] = 1,\n [\"Distinguish\"] = 1,\n [\"Div col\"] = 1,\n [\"Div col end\"] = 1,\n [\"FOLDOC\"] = 1,\n [\"Harvtxt\"] = 1,\n [\"Haskell\"] = 3,\n [\"Main\"] = 10,\n [\"Math\"] = 3,\n [\"Needs update\"] = 1,\n [\"Reflist\"] = 1,\n [\"Sfn\"] = 1,\n [\"Short description\"] = 1,\n}\narticle_whitelist = table#1 {\n}\nciteref_patterns = table#1 {\n}\n"},"cachereport":{"origin":"mw-web.codfw.main-698c79758b-vhlbm","timestamp":"20250225120549","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Data type","url":"https:\/\/en.wikipedia.org\/wiki\/Data_type","sameAs":"http:\/\/www.wikidata.org\/entity\/Q190087","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q190087","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-09-28T13:37:47Z","dateModified":"2025-02-10T09:33:56Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/c\/c4\/Python_3._The_standard_type_hierarchy-en.svg","headline":"Wikidata metaclass of data, including classification type of data in computer science"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10