On 7 Jan 2006 at 10:41, Chris Hicks wrote:
There are a number of programs that do translation from C to Pascal: http://c2pas.sourceforge.net/ http://www.synaptics.com/people/daveg/
and from Pascal to C http://www.rocketaware.com/spec/softdev/lang/pascal/
I have not tried these out - just found them on Google. It might be worth giving them a try with some short bits of code.
Thanks. I was aware of those kinds of tools, but not of the sourceforge project (seems dead now). Trying it on the code produced something less useful than I could translate myself!
Actually, the only part of the code I am not sure of is this: for(; length; length >>= 8) crc =(crc << 8) ^ crctab[((crc >> 24) ^ length) & 0xFF];
Which I have half-translated into this: for (; length; length + (length shr 8)) do crc := (crc shl 8) XOR crctab[((crc shr 24) XOR length) AND $FF];
As you can see, I don't understand the for-loop ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/