1. Computing
in Delphi TIPS :: In Delphi, the TStrings is the base class for objects that represent a list of strings. Examples include Lines property of a TMemo, Items property of a TListBox or TComboBox, etc.
When you need to add integer values, boolean values or any other non-string values to the list you need to use some of the RTL's conversion routines (from int to string for example).

Wouldn't it be better if you can simply say "Add(2008)" or "Add(True)"?

Read the full article to learn how to Implement a Class Helper for Delphi's TStrings: Add(Variant)


November 3, 2008 at 6:23 am
(1) Fred says:

Hi, the link for this article seems to have a problem !

November 3, 2008 at 6:34 am
(2) Zarko Gajic says:


Thanks, fixed.

Note that the title is also the link to that article.

November 4, 2008 at 7:38 pm
(3) surfbored says:

Is it possible to use this same approach with Ordinals (like color lists and such)?

If so, how would this look?

November 6, 2008 at 3:59 am
(4) Jens Borrisholt says:

surfbored>>I’m not quite sure exactly what you wand .. Perhaps you could be al ilttle more specific …

You can contact me at : jens@borrisholt.com

Jens Borrsiholt

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.