[fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Hi, Why is the usage of 'deprecated' inconsistent, depending where you use it. I'm using the ObjFPC compiler mode. TRGBTriple = record Red: word; Green: word; Blue: word; Alpha: word; end deprecated;// - Note: no semi-colon after 'end'. vs TRGBTriple = record

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: Why is the usage of 'deprecated' inconsistent, depending where you use it. As always, because Delphi does. See the recently submitted fcl-passrc bugreports for more examples. ___ fpc-pascal maillist

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Marco van de Voort het geskryf: In our previous episode, Graeme Geldenhuys said: Why is the usage of 'deprecated' inconsistent, depending where you use it. As always, because Delphi does. See the recently submitted fcl-passrc bugreports for more examples. Shouldn't that inconsistent syntax

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Jonas Maebe
On 29 Apr 2010, at 10:52, Graeme Geldenhuys wrote: Marco van de Voort het geskryf: In our previous episode, Graeme Geldenhuys said: Why is the usage of 'deprecated' inconsistent, depending where you use it. As always, because Delphi does. See the recently submitted fcl-passrc bugreports

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: As always, because Delphi does. See the recently submitted fcl-passrc bugreports for more examples. Shouldn't that inconsistent syntax be limited to the Delphi compiler mode only? Like many other things are. IMHO no.

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Jonas Maebe het geskryf: Conversely, adding it before the semicolon in case of procedure/ function declarations would be inconsistent with how other modifiers have always been used there. I don't have problems with it's usage in procedures, functions or methods. The modifier appearing

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Michael Van Canneyt
On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: Jonas Maebe het geskryf: Conversely, adding it before the semicolon in case of procedure/ function declarations would be inconsistent with how other modifiers have always been used there. I don't have problems with it's usage in procedures,

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Michael Van Canneyt het geskryf: Jonas tried to explain that this is not possible. Yes, but it is still very easy to detect the difference... I'll use your example: Consider the following - what you propose - statements: Var A : Integer; deprecated : Boolean; The compiler

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Jonas Maebe
On 29 Apr 2010, at 12:00, Graeme Geldenhuys wrote: Michael Van Canneyt het geskryf: Consider the following - what you propose - statements: Var A : Integer; deprecated : Boolean; The compiler cannot decide whether the 'deprecated' is a modifier or the Yes it can, because in your

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 12:39, Jonas Maebe jonas.ma...@elis.ugent.be wrote: The compiler uses only a single lookahead token, while disambiguating your example would require two. I did look at the links you posted and still couldn't see the problem. The paragraph above gives the key information - the

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Michael Van Canneyt
On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: On 29 April 2010 12:39, Jonas Maebe jonas.ma...@elis.ugent.be wrote: The compiler uses only a single lookahead token, while disambiguating your example would require two. I did look at the links you posted and still couldn't see the problem.

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Florian Klaempfl
Michael Van Canneyt schrieb: On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: On 29 April 2010 12:39, Jonas Maebe jonas.ma...@elis.ugent.be wrote: The compiler uses only a single lookahead token, while disambiguating your example would require two. I did look at the links you posted and

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 14:51, Florian Klaempfl flor...@freepascal.org wrote: Having a bigger lookahead makes a lot more things far more complex epecially in combination with include files, macros, generics. Why? You only apply the extra lookaheads where needed (code that could be ambiguous). All

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 14:48, Michael Van Canneyt mich...@freepascal.org wrote: As far as I remember, this was one of the key strengths of the Pascal Language: that parsing is possible using a single lookahead token. (it makes for faster parsing) And because of that age old statement, we now have

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: On 29 April 2010 14:51, Florian Klaempfl flor...@freepascal.org wrote: Having a bigger lookahead makes a lot more things far more complex epecially in combination with include files, macros, generics. Why? Because you've always to take care of the possible extra

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Aleksa Todorovic
During my experiments with FPC, I had to to exactly that - support two lookahead symbols - to implement (in)famous semicolon before 'else'. One of problems I had was combination of macros and include files with two lookahead symbols - I fixed it in a dirty way, but I'm not completely sure that

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Flávio Etrusco
On Thu, Apr 29, 2010 at 6:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Thu, 29 Apr 2010, Graeme Geldenhuys wrote: Jonas Maebe het geskryf: (...) Jonas tried to explain that this is not possible. Consider the following - what  you propose - statements: Var  A : Integer;  

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: Language: that parsing is possible using a single lookahead token. (it makes for faster parsing) And because of that age old statement, we now have to live with inconsistent syntax. And get better quality errormessages in return. Way more

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Matt Emson
Graeme Geldenhuys wrote: On 29 April 2010 14:51, Florian Klaempfl flor...@freepascal.org wrote: Having a bigger lookahead makes a lot more things far more complex epecially in combination with include files, macros, generics. Why? You only apply the extra lookaheads where needed

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
Marco van de Voort het geskryf: And get better quality errormessages in return. Way more important IMHO. And we just ignore the docs that can't describe the syntax? :-) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: And get better quality errormessages in return. Way more important IMHO. And we just ignore the docs that can't describe the syntax? :-) If you think there is a problem in the latex package, feel free to fix/enhance it.

[fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-29 Thread Bihar Anwar
Delphi has StringRefCount() function (I'm not aware since what version it was introduced). I just curious, is there a function equivalent to it in FPC? Currently, I just steal a portion of code from System unit: type PAnsiRec = ^TAnsiRec; TAnsiRec = packed record Ref, Len :

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-29 Thread Anton Tichawa
On Thu, 2010-04-29 at 10:30 -0700, Bihar Anwar wrote: Delphi has StringRefCount() function (I'm not aware since what version it was introduced). I just curious, is there a function equivalent to it in FPC? Currently, I just steal a portion of code from System unit: type PAnsiRec =

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 17:23, Marco van de Voort mar...@stack.nl wrote: If you think there is a problem in the latex package, feel free to fix/enhance it. Its got nothing to do with the latex package. Trying to describe the inconsistent syntax of Hint Directives in a syntax diagram (like used in the

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 29 April 2010 17:23, Marco van de Voort mar...@stack.nl wrote: Its got nothing to do with the latex package. Trying to describe the inconsistent syntax of Hint Directives in a syntax diagram (like used in the FPC Language Reference doc) just seems impossible. From

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Graeme Geldenhuys
On 29 April 2010 21:57, Vincent Snijders vsnijd...@vodafonevast.nl wrote: I don't see the issue, it gets a bit more complicated, but not impossible. I am just bad in ascii graphics, but I can imagine how it looks like. I'm sure Michael will welcome your patch, and I'll be eager to see it too.

Re: [fpc-pascal] deprecated syntax is inconsistent.

2010-04-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 29 April 2010 21:57, Vincent Snijders vsnijd...@vodafonevast.nl wrote: I don't see the issue, it gets a bit more complicated, but not impossible. I am just bad in ascii graphics, but I can imagine how it looks like. I'm sure Michael will welcome your patch, and

[fpc-pascal] Two questions Widechar

2010-04-29 Thread Luis Fernando Del Aguila Mejía
For this program : http://www.conoce3000.com/prueba.pp Why not show the Euro?. The shell is in Win-1252 and the source code on Win-1252 Does WideChar only used with Unicode BMP Plane 0 ó UCS-4? thanks.___ fpc-pascal maillist -

[fpc-pascal] Re: What project management tool does FPC developers use?

2010-04-29 Thread Frank Church
I think it will be a good idea. I have been experimenting with Redmine, and though I haven't used it intensively, it makes me see how useful a project management tool can be in a project with a lot of contributors and interested users. Perhaps some of the major developers could try something

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-29 Thread Bihar Anwar
Thanks Anton for your suggestion, I will apply it. I hope FPC developers will include StringRefCount() to the RTL. By the way, how do I call internal compiler functions directly (maybe using a tricky way) such as system.fpc_ansistr_incr_ref() and system.fpc_ansistr_decr_ref? I couldn't call