Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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

like image 297
J K Kunil Avatar asked Jun 03 '09 18:06

J K Kunil


Video Answer


2 Answers

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..

like image 156
Wouter van Nifterick Avatar answered Oct 28 '22 05:10

Wouter van Nifterick


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).

like image 43
ulrichb Avatar answered Oct 28 '22 04:10

ulrichb