c to pascal converter

jomixl
Benutzer
Avatar
Geschlecht:
Beiträge: 229
Dabei seit: 02 / 2008
Betreff:

c to pascal converter

 · 
Gepostet: 14.12.2010 - 19:56 Uhr  ·  #1
hallo zusammen,
bin auf der suche nach einem guten c to pascal converter, die die ich bisher im netz gefunden habe
fand ich nicht so toll ....
hat irgendjemand einen tip für mich wo ich ein funktionierendes tei finden kann?

danke ,
und viele grüsse joachim
miparo
Schreiberling
Avatar
Geschlecht:
Herkunft: Germany
Alter: 59
Beiträge: 988
Dabei seit: 09 / 2007
Betreff:

Re: c to pascal converter

 · 
Gepostet: 14.12.2010 - 22:44 Uhr  ·  #2
Hi,
da habe ich auch lange nach gesucht und nichts gefunden.
Am besten ist der Human konverter :)
Da habe ich mit abgefunden.

Im Prinzip ist es ja nichts anderes als Pascal, nur schmuddelliger geschrieben.

Gruß
miparo
Schattenlied
Benutzer
Avatar
Geschlecht:
Alter: 67
Homepage: deepsky.at
Beiträge: 28
Dabei seit: 07 / 2009
Betreff:

Re: c to pascal converter

 · 
Gepostet: 15.12.2010 - 00:54 Uhr  ·  #3
Nabend
Da wirst Du lange suchen und nichts vernünftiges finden. Ich habe mich mal vor etlichen Jahren mit dem Thema beschäftigt, bereits bei den grundsätzlichen Überlegungen hatte ich gröber Kopfweh bekommen. Nach ein paar Versuchen habe ich dann das Projekt einschlafen lassen.
Ohne hier einen Sprachenkrieg zu entfesseln, C ist einfach zu schlampig, Typenconversion, usw ... I
Danke nein, da bin ich von Hand aus schneller.

MfG
Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1473
Dabei seit: 03 / 2005
Betreff:

Re: c to pascal converter

 · 
Gepostet: 15.12.2010 - 11:13 Uhr  ·  #4
Like Scattenlied I also considered writing a converter because I could find nothing out there. I gave up quite quickly. It was not just that C itself was the problem, but that C programmers make extensive use of the precompiler to do fundamentally different things. Scattenlied is right that C is sloppy and can be made virtually unreadable, but even well written C is almost impossible to convert automatically. I believe that it may doable, but simply not worth the effort. I guess that is why there is nothing out there.

It doesn't seem to be around now but there used to be a group of C programmers called the Obfucation Society who held an annual competition to write the most useful and complete C program in a single statement. Obviously the result was always unreadable (hence the name, I suppose).

Merlin.
jomixl
Benutzer
Avatar
Geschlecht:
Beiträge: 229
Dabei seit: 02 / 2008
Betreff:

Re: c to pascal converter

 · 
Gepostet: 15.12.2010 - 13:33 Uhr  ·  #5
thanks to all,
i gave up!

jomixl
Avra
Schreiberling
Avatar
Geschlecht:
Herkunft: Belgrade, Serbia
Alter: 54
Homepage: rs.linkedin.com/in…
Beiträge: 653
Dabei seit: 07 / 2002
Betreff:

Re: c to pascal converter

 · 
Gepostet: 16.12.2010 - 15:06 Uhr  ·  #6
There isn't 100% C to Pascal converter, but there are converters that could help you a lot. For example, although I have developed a lot of C code for Linux, I was always running away from this conversion and I always had some other work around as an excuse to avoid converting headers for some C library that I needed. I was a little pessimistic about results when recently I had no other choice but to try to convert PI API C headers for OsiSoft PI server (world #1 industrial historian) to CodeTyphon/Lazarus/FreePascal, but with help of tools mentioned below about 70-80% of work was done automatically. I had to make corrections and sometimes I had to combine results of 2 converters, but the biggest time consumer was testing of DLL functions, and not the conversion process.

C To Pascal Converter: http://cc.embarcadero.com/item/26951
Dr. Bob's HeadConv: http://www.drbob42.com/delphi/headconv.htm
Rudy's Conversion Helper Package: http://rvelthuis.de/programs/convertpack.html

The biggest tip I can give you is to try to find Visual Basic 6 header translation if it exists, and use Marco Cantu's VB converter at http://www.marcocantu.com/tools/vb2delphi.htm. This will probably give you almost 100% automatic conversion (if you are converting just DLL headers, of course). There is also commercial VBto converter but trial demo is quite enough for conversion of VB DLL headers to Pascal. Download it here: http://www.vbto.net

Other tips for serious conversion from C:
http://rvelthuis.de/articles/articles-convert.html
http://rvelthuis.de/articles/articles-pchars.html
http://rvelthuis.de/articles/articles-cobjs.html
http://rvelthuis.de/articles/articles-cppobjs.html
http://www.awitness.org/delphi_pascal_tutorial/c++_delphi
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   106   120 · Page-Gen-Time: 0.030101s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI