J K Kunil
J K Kunil

Reputation: 571

"Delphi Fundamentals" in Delphi 2009

Has anybody used/converted "Delphi Fundamentals" in Delphi 2009? - http://fundementals.sourceforge.net/

I'm using Dictionaries (cArrays.pas,cDictionaries.pas,cStrings.pas,cTypes.pas) in my project and now i have some troubles on upgrading code.

I'll be highly obliged if anybody can convert the above mentioned units in Delphi 2009. I'm quite new to Delphi, started working with 2007 and 2009 has been released, I just cannot help myself...

Thank you

Upvotes: 11

Views: 1579

Answers (2)

Wouter van Nifterick
Wouter van Nifterick

Reputation: 24116

I use cUtils, cDateTime and cStrings in a project.

After a 30 minute session of searching and replacing like a madman I got them to compile in Delphi 2009, with just a couple of warnings left to fix.

  • Char>>>>AnsiChar
  • String>>>>AnsiString
  • PChar>>>>PAnsiChar
  • PString>>>>PAnsiString

It passes all of its selftests, and so far things seem to work fine. I've shared it here: http://www.xs4all.nl/~niff/Fundamentals_UtilsD2009.zip

Update I've added a ported cDataStructs.pas to the zipfile, which contains the dictionary classes. This one still has a lot of compiler warnings that you might want to fix, but the self-tests pass, so you could try and see if it works for you..

Upvotes: 10

ulrichb
ulrichb

Reputation: 20054

There is no official version of Delphi Fundamentals for D2009 (and I think there never will be any).

I think it would be the best option to rewrite the dictionary code using the Delphi-native TDictionary<TKey,TValue> class inside Generics.Collections.pas, or using the delphilhlplib (Collections/DeHL.Collections.Dictionary.pas).

Upvotes: 3

Related Questions