TIntList, an Integer List

[Home]   [Puzzles & Projects]    [Delphi Techniques]   [Math topics]   [Library]   [Utilities]

 

 

Search

Search WWW

Search DelphiForFun.org

As of October, 2016, Embarcadero is offering a free release of Delphi (Delphi 10.1 Berlin Starter Edition ).     There are a few restrictions, but it is a welcome step toward making more programmers aware of the joys of Delphi.  They do say "Offer may be withdrawn at any time", so don't delay if you want to check it out.  Please use the feedback link to let me know if the link stops working.

 

Support DFF - Shop

 If you shop at Amazon anyway,  consider using this link. 

     

We receive a few cents from each purchase.  Thanks

 


Support DFF - Donate

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

Mensa® Daily Puzzlers

For over 15 years Mensa Page-A-Day calendars have provided several puzzles a year for my programming pleasure.  Coding "solvers" is most fun, but many programs also allow user solving, convenient for "fill in the blanks" type.  Below are Amazon  links to the two most recent years.

Mensa® 365 Puzzlers  Calendar 2017

Mensa® 365 Puzzlers Calendar 2018

(Hint: If you can wait, current year calendars are usually on sale in January.)

Contact

Feedback:  Send an e-mail with your comments about this program (or anything else).

Search DelphiForFun.org only

 

 

 

 

For several years, I've wanted an integer list analog of TStringlist.   I finally decided to write one yesterday and here it is, TIntList.  Most of the code is adapted from TStringlist.  I've tried to include the main features of TStringlist.   You can use it like you would use TStringlist, but with Int64 type integers as the list elements instead of strings.  

I haven't included a Register procedure to make it a component.  For non-visual components, the main disadvantage is that you must manually include the unit name, UIntList, in the Uses statement of your program.

A simple test project is included which generates and displays 100 random integers, sorted or unsorted, with a choice of how duplicates are handled. 

Addendum: October 10, 2001 - Test program extended to include SaveToFile and LoadFromFile buttons to test saving and restoring Integer Lists.  

Addendum March 30, 2005:  The test program was enhanced in several ways.  

bulletThe test lists of integers now have attached objects containing  the numbers written as words. 
bulletCustom Sort  examples show how to sort  the list in alternative sequences.
bulletFind, Add, and Delete function tests are included.
bulletAn exception handler detects and diagnoses attempt to add numbers to a list with Sorted property set to true when the Duplicates property is set to DupError.
bulletThis is the initial program using the DFF Library to obtain the UIntList unit containing the TIntList class definition.   All this means is that UIntList is not included in the zipped source file for the test program.  It is contained in the zipped library file.   

 

Download TIntList Test Source (Requires DFFLIBV02 or later to compile)

Download DFF Library Source  (Current version DFFLibV15 )

 

 

Created: February 21, 2001

Modified: May 12, 2018

 

 

 
  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2018, Gary Darby    All rights reserved.