{"title":"Integer data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/integer/integer-data-type/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/integer/integer-data-type, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/integer/integer-data-type","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Stores whole numbers with values that range from -2,147,483,647 to 2,147,483,647.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Instance methods","slug":"instance-methods","at":142,"chars":214},{"level":2,"title":"Remarks","slug":"remarks","at":356,"chars":591},{"level":2,"title":"Example 1","slug":"example-1","at":947,"chars":79},{"level":2,"title":"Example 2","slug":"example-2","at":1026,"chars":85},{"level":2,"title":"Related information","slug":"related-information","at":1111,"chars":117}],"text":"> Version: _Available or changed with runtime version 1.0._\nStores whole numbers with values that range from -2,147,483,647 to 2,147,483,647.\n## Instance methods\nThe following methods are available on instances of the Integer data type.\nMethod name|Description\ninteger-totext-method|Converts the value to a text. Equivalent to calling Format(value, 0, 0).\n## Remarks\nIn addition to representing whole numbers in this range, you can use integers to represent Boolean values. For Boolean values, 1 represents true and 0 represents false.\nIf you assign -2,147,483,648 directly to an Integer variable, then you get an error when you try to compile the code. However, you can indirectly assign -2,147,483,648 to an Integer variable by using the following code.\n```al\nIntegerVar := -2147483647;\nIntegerVar -= 1;\n```\nIf you try to indirectly assign a value that is smaller than -2,147,483,648 or larger than 2,147,483,647, then you get a run-time error.\n## Example 1\nThe following are examples of integer values.\n```al\n546\n-3425\n```\n## Example 2\nThe following example is a decimal and not an integer.\n```al\n342.45\n```\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}