Re: [fpc-pascal] C translation question

2016-11-18 Thread Marc Santhoff
On Di, 2016-11-15 at 22:38 -0700, Lars wrote: > I just wish CVS and SVN had as nice of a GUI front end (like github). > That's the one thing I really like about git is the nice GUI access, > simple readme system for projects etc. With CVS and SVN gui's and website > front ends I never found

Re: [fpc-pascal] C translation question

2016-11-15 Thread Lars
On Sun, November 13, 2016 2:50 am, Bo Berglund wrote: > On Sun, 30 Oct 2016 21:15:03 -0600, "Lars" > wrote: > > >> The issue with github is that it encourages a lot of forking rather >> than working together as CVS did. > > We still use CVS I just wish CVS and SVN had as nice

Re: [fpc-pascal] C translation question

2016-11-13 Thread Bo Berglund
On Sun, 30 Oct 2016 21:15:03 -0600, "Lars" wrote: >The issue with github is that it encourages a lot of forking rather than >working together as CVS did. We still use CVS and its ability to handle multiple developers on the same code files is one important thing. As is the

Re: [fpc-pascal] C translation question

2016-10-30 Thread Lars
On Sun, October 30, 2016 4:40 pm, Graeme Geldenhuys wrote: > On 2016-10-30 21:12, Lars wrote: > >> as github is hot with the new kids on the block these days. > > Yes, for good reason! Though I would correct your statement as "Git is > hot...". You don't have to use GitHub or any other public Git

Re: [fpc-pascal] C translation question

2016-10-30 Thread Graeme Geldenhuys
On 2016-10-30 21:12, Lars wrote: > as github is hot with the new kids on the block these days. Yes, for good reason! Though I would correct your statement as "Git is hot...". You don't have to use GitHub or any other public Git repository hosting environment. Regards, Graeme

Re: [fpc-pascal] C translation question

2016-10-30 Thread Lars
On Tue, October 25, 2016 3:31 pm, José Mejuto wrote: > El 25/10/2016 a las 3:56, Lars escribió: > > >>> If you want to test it I can provide .exe or source code, but do not >>> expect it to translate anything far than some trivial functions. >> Do you have github account... or sourceforge, I

Re: [fpc-pascal] C translation question

2016-10-25 Thread José Mejuto
El 25/10/2016 a las 3:56, Lars escribió: If you want to test it I can provide .exe or source code, but do not expect it to translate anything far than some trivial functions. Do you have github account... or sourceforge, I think a few other people may find it useful... Hello, No sorry, no

Re: [fpc-pascal] C translation question

2016-10-24 Thread Ryan Joseph
I just got back to this problem now. Yes, changing it to a while loop fixed the little bug and cleans things up in the translation for sure. Thanks for the tip. > On Oct 24, 2016, at 3:20 AM, Bernd Oppolzer > wrote: > > int pnpoly (int nvert, float *vertx, float

Re: [fpc-pascal] C translation question

2016-10-24 Thread Lars
On Mon, October 24, 2016 5:20 am, José Mejuto wrote: > El 24/10/2016 a las 1:40, Lars escribió: > > >> Hi, what is the status of automated conversion tools? Last I remember >> reading about them was when I read a delphi page on how to convert >> header files. Are you saying that nowadways you can

Re: [fpc-pascal] C translation question

2016-10-24 Thread Lars
I previously wrote: > >> Are you saying that nowadways you can actually convert >> plain C code to fpc, Found this too: http://c2pas.sourceforge.net/ It says it can convert a large portion, but not all, obviously ___ fpc-pascal maillist -

Re: [fpc-pascal] C translation question

2016-10-24 Thread Lars
On Mon, October 24, 2016 8:00 pm, Lars wrote: > I previously wrote: > >> >>> Are you saying that nowadways you can actually convert >>> plain C code to fpc, > > Found this too: > > > http://c2pas.sourceforge.net/ > And there is also this interesting find: http://cc.embarcadero.com/item/26951

Re: [fpc-pascal] C translation question

2016-10-24 Thread José Mejuto
El 24/10/2016 a las 1:40, Lars escribió: Hi, what is the status of automated conversion tools? Last I remember reading about them was when I read a delphi page on how to convert header files. Are you saying that nowadways you can actually convert plain C code to fpc, not just header files but

Re: [fpc-pascal] C translation question

2016-10-23 Thread Lars
On Sun, October 23, 2016 2:31 pm, Bernd Oppolzer wrote > But if you translate the C for loop to a while loop first, Agree! For loops, are not nearly as flexible and powerful as while loops. For loops can get you stuck in a certain mode of thinking and you try to develop hacks to manipulate the

Re: [fpc-pascal] C translation question

2016-10-23 Thread Lars
On Sat, October 22, 2016 4:44 am, José Mejuto wrote: > Hello, > > > It is at the end of the loop for sure, it points to the "previous" point > in the polygon and in the case of the first testing point the "previous" > one is the last one. > > So the correct code is: > > > j := i; > > This is my

Re: [fpc-pascal] C translation question

2016-10-23 Thread Bernd Oppolzer
What I wanted to say: when translating the for loop to Pascal, you are in danger of introducing logic errors, because the Pascal for loop is kind of restricted compared to the C for loop (which is in fact simply a while loop with another notation). But if you translate the C for loop to a

Re: [fpc-pascal] C translation question

2016-10-23 Thread Bernd Oppolzer
it might help if I translate the C for loop into an equivalent while loop for you, (and eliminating the ++ construct), simply mechanically, without knowing anything about the application. This results in: int pnpoly (int nvert, float *vertx, float *verty, float testx, float testy) { int i, j,

Re: [fpc-pascal] C translation question

2016-10-22 Thread José Mejuto
El 22/10/2016 a las 11:59, Ryan Joseph escribió: j := i + 1; might want this at the end of the loop. Doing that defiantly broke it. I think “j” is being set inside the for() construct and before each pass of the loop. The author explains the for loop even but the fact it requires an

Re: [fpc-pascal] C translation question

2016-10-22 Thread Ryan Joseph
> On Oct 22, 2016, at 4:45 PM, C Western wrote: > >> j := i + 1; > might want this at the end of the loop. Doing that defiantly broke it. I think “j” is being set inside the for() construct and before each pass of the loop. The author explains the for loop even but the

Re: [fpc-pascal] C translation question

2016-10-22 Thread C Western
On 22/10/16 10:06, Ryan Joseph wrote: j := i + 1; might want this at the end of the loop. Colin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal