Re: [fpc-pascal] Converting code from C++ to FP....

2011-03-19 Thread Aleksa Todorovic
On Sat, Mar 19, 2011 at 06:07, Bo Berglund bo.bergl...@gmail.com wrote: 1) The second line in the loop contains the command std::max, how can that be translated? I have not found any class definition for std with a method max There is function Max in unit Math, so you could say: jBegin

Re: [fpc-pascal] Converting code from C++ to FP....

2011-03-19 Thread Jeppe Johansen
Den 19-03-2011 08:30, Aleksa Todorovic skrev: 2) The parameter into the function is a pointer *A of type double. To me that indicates a value of some kind, but in the code it suddenly seems to appear as an array with indexing. What would be the proper pascal translation of this? Indeed. C

Re: [fpc-pascal] Converting code from C++ to FP....

2011-03-19 Thread Ingemar Ragnemalm
Jeppe Johansen jepj...@es.aau.dk wrote: Den 19-03-2011 08:30, Aleksa Todorovic skrev: 2) The parameter into the function is a pointer *A of type double. To me that indicates a value of some kind, but in the code it suddenly seems to appear as an array with indexing. What would be the proper

Re: [fpc-pascal] Converting code from C++ to FP....

2011-03-19 Thread Jürgen Hestermann
Ingemar Ragnemalm schrieb: Converting bad C code (that means almost any C code) to good FPC code is a great thing to do, converting to bad FPC code is not as much fun. Yes, when already in progress of converting to Pascal then get rid of C design flaws and convert to clear Pascal code.

[fpc-pascal] Converting code from C++ to FP....

2011-03-18 Thread Bo Berglund
I have a bunch of C++ files containing math processing functions, which I need to convert to pascal. But I have never programmed C++ (only ANSI C some 15 years ago) and I am stuck because of the syntax differences. It is all about the handling of data in arrays and I would be grateful for some