c to pascal converter

jomixl
Benutzer
Avatar
Gender:
Posts: 227
Registered: 02 / 2008
Subject:

c to pascal converter

 · 
Posted: 14.12.2010 - 19:56  ·  #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
Administrator
Avatar
Gender:
Location: Germany
Age: 58
Posts: 959
Registered: 09 / 2007
Subject:

Re: c to pascal converter

 · 
Posted: 14.12.2010 - 22:44  ·  #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
Gender:
Age: 66
Homepage: deepsky.at
Posts: 28
Registered: 07 / 2009
Subject:

Re: c to pascal converter

 · 
Posted: 15.12.2010 - 00:54  ·  #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
Gender:
Age: 25
Posts: 1411
Registered: 03 / 2005
Subject:

Re: c to pascal converter

 · 
Posted: 15.12.2010 - 11:13  ·  #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
Gender:
Posts: 227
Registered: 02 / 2008
Subject:

Re: c to pascal converter

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

jomixl
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: c to pascal converter

 · 
Posted: 16.12.2010 - 15:06  ·  #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
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   105   119 · Page-Gen-Time: 0.038484s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI