Re: [fpc-pascal] Part of OOo Linux is written in FPC?

2009-01-07 Thread Jonas Maebe
On 07 Jan 2009, at 05:23, leledumbo wrote: I've read this in a discussion forum somewhere, is it true? There's no Pascal code in Open Office according to Ohloh: http://www.ohloh.net/p/openoffice/analyses/latest Jonas ___ fpc-pascal maillist -

[fpc-pascal] for .. in loop implementation

2009-01-07 Thread leledumbo
OK, I've read http://wiki.freepascal.org/Modernised_Pascal this (and the FAQ as well). I disagree with any statement saying that for .. in loop is only a type-saver. It's a good language extension and should be included (since Delphi already have this, it will also be a good idea). Consider the

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread Marco van de Voort
In our previous episode, leledumbo said: The latter one has iteration overheads, while the former can be optimized to loop as many as needed. I'm not saying I'm the best Pascal programmer, but in case there's a (better) solution to this (rather than extending the language) please tell me.

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread Vincent Snijders
leledumbo schreef: OK, I've read http://wiki.freepascal.org/Modernised_Pascal this (and the FAQ as well). I disagree with any statement saying that for .. in loop is only a type-saver. It's a good language extension and should be included (since Delphi already have this, it will also be a good

Re: [fpc-pascal] Library Project raises Linker Error Hints at -fPIC option

2009-01-07 Thread Jonas Maebe
On 07 Jan 2009, at 03:46, Andrew Brunner wrote: Can anyone tell me why this would be a problem or what I need to do to get FPC to build or LD to link properly? It sounds like a bug in the code generator. Please submit a bug report with a compilable library that demonstrates the program.

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread Jürgen Hestermann
I disagree with any statement saying that for .. in loop is only a type-saver. It's a good language extension and should be included (since Delphi already have this, it will also be a good idea). Consider the following example: for d in [Monday,Wednesday,Friday] do ; // versus for

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread Vinzent Höfler
Jürgen Hestermann wrote: I disagree with any statement saying that for .. in loop is only a type-saver. It's a good language extension and should be included (since Delphi already have this, it will also be a good idea). Consider the following example: for d in [Monday,Wednesday,Friday] do ;

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread dmitry boyarintsev
the nice thing about pascal, is that compile support different code compilers syntax: {$mode ...} if anyone likes, he/she can implement additional {$mode} for the compiler, right? this new {$mode} can be included into compiler packages, and if necesssary anyone can rebuild the compiler to support

Re: [fpc-pascal] Writing a compiler

2009-01-07 Thread Felipe Monteiro de Carvalho
3. Handwritten Question: Need some references other than Jack Crenshaw's book Pros: Easier to maintain (someone said, but no prove) Cons: I don't have any practical background on this I have written a very simple Pascal to Java-bytecode compiler. It compiles a very simplified Pascal. I

Re: [fpc-pascal] Library Project raises Linker Error Hints at -fPIC option

2009-01-07 Thread Andrew Brunner
Hi Jonas, I posted bug with source. Here is a link http://bugs.freepascal.org/view.php?id=12940 Thanks, -Andy On Wed, Jan 7, 2009 at 6:09 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 07 Jan 2009, at 03:46, Andrew Brunner wrote: Can anyone tell me why this would be a problem or what

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread Jürgen Hestermann
P.S. Honestly, Pascal (and especially ObjectPascal) already hides quite some stuff from the programmer. Properties, for example, can hide potentially costly procedure calls in simple assignment statements. That's true. But I am not happy about that approach. In the last years lots of things

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread Vinzent Höfler
Jürgen Hestermann wrote: Mantra: First make it work, then make it fast. In general that's true from the programmer's viewpoint. But this does not apply to adding language details because there is no 'first make it work'. Why obscure important implementation details if the only benefit is