Mail Archives: djgpp/2000/04/13/15:24:17
Do DOT Taddei AT agora DOT stm DOT it:
> [help] Converting borland turbo pascal sources to c
sources for djgpp
> I have pascal sources but I don't know pascal and do
not have a pascal
> compiler! I want translate those sources in ansi c
and I want compile them
> with djgpp.
> do you know something for this purpose?
> pheraps in the djgpp faq is mentionned something for
to convert tex, or
> if you know any perl script for this work.
> thanks in advanced! answer me in e-mail too, please!
> excuse me for my bad english!
ciao.
(Italian translation follows)
There is also a djgpp gnu pascal compiler. It should be
able to compile pascal source to .o files, which can be
linked together with other gcc-compiled .o files.
If you really need to translate to C for later
manintenance, it could be helpful anyway, in case gpc
is not a full compiler and translates pascal to C,
passing C source to gcc. I don't have it installed on
my PC so I can't tell for sure. :-(
There's also a problem: I think gpc is quite old and
has not been updated for years, I don't know if it is
fully compatible with newer releases of djgpp.
---
Tra i pacchetti djgpp c'e' anche un compilatore gnu
pascal, dovrebbe consentire di compilare i sorgenti in
pascal in .o in modo da poterli linkare con gli altri
.o generati con il compilatore C.
Se invece hai proprio bisogno di tradurli in C per poi
poterli eventualmnete modificare o compilare con un
diverso compilatore C, puo' darsi che vada bene lo
stesso, bisognerebbe vedere se si tratta di un
compilatore completo oppure traduce il pascal in C e
poi lancia gcc per ottenere l'eseguibile.
L'unico dubbio e' che si tratta di un pacchetto un po'
vecchio e puo' darsi che non sia perfettamente
compatibile con le ultime versioni del gcc.
Esistono anche delle utility non-djgpp che traducono
pascal in C, ne ho provate alcune ma facevano
abbastanza schifo. Se vuoi posso mandarti altre
informazioni (prova intanto su altavista a cercare
"tp2qc" o "turbo2qc" o "tptc" per iniziare...
ciao
Giacomo
-------------------------------------------------
Giacomo Degli Esposti - pad2369 AT iperbole DOT bologna DOT it
- Raw text -