[fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Paul Ishenin
Hello, FPC-Pascal users discussions I want to notify you that fpc trunk has extensions for the class syntax. Class can have now the next sections: 1. 'var' sections to start regular fields declaration. 'var' can be used after other sections and after methods 2. 'class var' sections to start

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread dmitry boyarintsev
Are these features available for {$mode delphi} only? thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Need help to fix a bug

2010-01-13 Thread JoshyFun
Hello FPC-Pascal, I wish to fix this bug http://bugs.freepascal.org/view.php?id=15460 but I had found serious problems to understand how data is structured in the TBufIndex and descendant classes, specially the TDoubleLinkedBufIndex. Can somebody help me ? From TBufDataset.BuildIndex I think

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread David Emerson
Thank you for this message! This stuff sounds really cool. In particular, I have been itching for class constants. A few questions come to mind: a. 'var' sections -- I assume that 'var' is optional when declaring fields that occur first (i.e. directly after private, public, etc) b. What does

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Doug Chamberlin
David Emerson wrote: b. What does strict private mean, as opposed to private without strict? (My best guess is that it would be accessible only within the methods+properties of that class within the unit, as opposed to being available anywhere in the same unit where the class is

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread David Emerson
Doug Chamberlin wrote: Class methods allow you to call the method without instantiating the class first. For example, Result := TMyClass.MyClassFunction; Oh, that is so cool! I suppose that probably means that class methods can only reference class variables/methods/properties. Cheers, David

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Doug Chamberlin
David Emerson wrote: Doug Chamberlin wrote: Class methods allow you to call the method without instantiating the class first. For example, Result := TMyClass.MyClassFunction; Oh, that is so cool! I suppose that probably means that class methods can only reference class

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Anthony Walter
Yup! Of course, there are pros and cons to all this. Our once simple, straightforward language is not littered with convenience features that are not necessary at all. For example, what is the big advantage of class methods over simple functions and procedures? Class methods can be

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Aleksa Todorovic
On Wed, Jan 13, 2010 at 19:13, David Emerson dle...@angelbase.com wrote: d.2. wrt class methods, can they be virtual? (This strikes me as being closely related to d.1) Definitely, yes! (and I believe that was available before class vars/consts) I use this great feature for (de)serialization

RE: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Cox, Stuart TRAN:EX
-Original Message- From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Doug Chamberlin Sent: Wednesday, January 13, 2010 11:21 AM To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] FPC class syntax was extended to support

[fpc-pascal] [OT] which editor - Vim and Exuberant Ctags?

2010-01-13 Thread johanns
On Sun, Jan 10, 2010 at 02:44:46PM +0100, Hans-Peter Suter wrote: I'm on a mac and use TextMate currently. As it doesn't jump between declaration and implementation and ist mac-only, I am looking for a replacement. Is Emacs a good choice? Does it work well with FPC? I do my Pascal

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Paul Ishenin
dmitry boyarintsev wrote: Are these features available for {$mode delphi} only? No. For objfpc too. Best regards, Paul Ishenin. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Doug Chamberlin
Cox, Stuart TRAN:EX wrote: Some operations (procedures/functions) just go naturally with Classes but don't belong to any particular instance of that class. An example might be calculating the area of overlap between two geographic polygons (instances of the class) where the function returning

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread Paul Ishenin
David Emerson wrote: a. 'var' sections -- I assume that 'var' is optional when declaring fields that occur first (i.e. directly after private, public, etc) Yes. b. What does strict private mean, as opposed to private without strict? (My best guess is that it would be accessible only within

[fpc-pascal] Swopping two items in TCollection

2010-01-13 Thread Wimpie Nortje
Hi list I have a class derived from Tcollection, holding items derived from TCollectionItem. How do I swop two items in the collection? FItem is of type TList which has an exchange function, but that is private and not accessable to me. ___