Part of the Programming glossary:

To truncate is to shorten by cutting off. In computer terms, when information is truncated, it is ended abruptly at a certain spot. For example, if a program truncates a field containing the value of pi (3.14159265...) at four decimal places, the field would show 3.1415 as an answer. This is different from rounding, which would result in the answer of 3.1416.

For another example, consider a text entry field in an electronic form. If a program limits the size of the field to 255 characters, it may allow you to continue typing past the maxiumum number of characters. However, when the information is submitted or saved, the program truncates the data to the first 255 characters and any additional characters are disregarded.

Several operating systems or programming languages use truncate as a command or function for limiting the size of a field, data stream, or file. Linux includes a truncate command for rounding integers.

This was last updated in April 2005
Posted by: Margaret Rouse

Related Terms

Definitions

Glossaries

  • Programming

    - Terms related to software programming, including definitions about programming languages and words and phrases about software design, coding, testing and debugging.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question. Find an Answer.Powered by ITKnowledgeExchange.com

Ask An IT Question

Get answers from your peers on your most technical challenges

Ask Question
  • AS/400 Journaling

    Hi,You will get the complete data on single field when you use DSPJRN command.You can copy that to your file (includes Journal fields) using FMTOPT(*NOCHK) on CPYF command.Click Here for quick...

  • Format results of a formula

    Drag the formula from the field / formula list onto the report.Then right-click the formula and select 'format field' - you shouldbe able to format as you want from there.

  • Issue with printing legal portrait report from AS400

    As it turns out, all I had to do was apply the printer file settings at the time of compile and it worked.  Very strange. 

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.