Re: [fpc-pascal] Please someone explain this to me

2016-02-15 Thread Jürgen Hestermann
Am 2016-02-15 um 18:21 schrieb Andreas Schneider: > Am 2016-02-14 12:42, schrieb Jürgen Hestermann: >> Here we differ: >> I expect that a documentation *fully* explains >> a behaviour of a certain function (or something else), >> not just some part of it. > IMHO that would be insane. To a programm

Re: [fpc-pascal] Please someone explain this to me

2016-02-15 Thread Andreas Schneider
Am 2016-02-14 12:42, schrieb Jürgen Hestermann: Here we differ: I expect that a documentation *fully* explains a behaviour of a certain function (or something else), not just some part of it. IMHO that would be insane. To a programmer (like you and me) the RTL and the Compiler are just interfa

Re: [fpc-pascal] Please someone explain this to me

2016-02-14 Thread Michael Van Canneyt
On Sun, 14 Feb 2016, Jürgen Hestermann wrote: Am 2016-02-11 um 14:21 schrieb Sven Barth: If they are just learning the language then they shouldn't poke around in the core units anyway. That's what the documentation and help is for. Back when I started learning TP I didn't have the internet

Re: [fpc-pascal] Please someone explain this to me

2016-02-14 Thread Jürgen Hestermann
Am 2016-02-11 um 14:21 schrieb Sven Barth: > If they are just learning the language then they shouldn't poke around in the core units anyway. That's what the documentation and help is for. > Back when I started learning TP I didn't have the internet and I didn't have the sources of the units. I

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Mattias Gaertner
On Wed, 10 Feb 2016 05:10:55 -0500 Anthony Walter wrote: >[...] > Additionally, and in a different scenario, when the identifier IS defined > and several units are in the uses clause the goto declaration can jump to > an include file without any information pertaining to which of the units is > i

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread wkitty42
On 02/11/2016 06:51 AM, Michael Van Canneyt wrote: On Thu, 11 Feb 2016, Mattias Gaertner wrote: Michael Van Canneyt hat am 11. Februar 2016 um 04:27 geschrieben: [...] Lazarus IDE shows a tooltip when you hover over an identifier with the mouse. I suspect it will take one on the team less than

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Sven Barth
Am 11.02.2016 11:41 schrieb "Anthony Walter" : > > > This won't be changed. Period. > > Sven, not to be argumentative, but you do get that for a long time programmers have learned how to write code and use libraries by examining them? My goal is simply to make it easier for the people who would wan

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Graeme Geldenhuys
On 2016-02-11 11:51, Michael Van Canneyt wrote: > It's a coder... It's a hacker... it's SuperMattias ! :-D LOL G. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Michael Van Canneyt
On Thu, 11 Feb 2016, Mattias Gaertner wrote: Michael Van Canneyt hat am 11. Februar 2016 um 04:27 geschrieben: [...] Lazarus IDE shows a tooltip when you hover over an identifier with the mouse. I suspect it will take one on the team less than 10-minutes to add the unit name to the tooltip, i

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Mattias Gaertner
> Michael Van Canneyt hat am 11. Februar 2016 um 04:27 > geschrieben: >[...] > Lazarus IDE shows a tooltip when you hover over an identifier with the mouse. > I suspect it will take one on the team less than 10-minutes to add the unit > name to the tooltip, in addition to the package and source fi

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Michael Van Canneyt
On Thu, 11 Feb 2016, Anthony Walter wrote: This won't be changed. Period. Sven, not to be argumentative, Funny. You _are_ argumentative, considering the answers you got and number of posts :-) (no offense intended) but you do get that for a long time programmers have learned how to writ

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Michael Van Canneyt
On Thu, 11 Feb 2016, Anthony Walter wrote: Michael, a question: How much of the interface section of units differ per platform? Is it 1% of the code? Is it 5% of the code? With the xml2 unit it's 0%, yet all of the declarations are nested in several layers of include files: Numbers are irre

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Anthony Walter
> This won't be changed. Period. Sven, not to be argumentative, but you do get that for a long time programmers have learned how to write code and use libraries by examining them? My goal is simply to make it easier for the people who would want to pick up and start using Lazarus. Organizing thing

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Adriaan van Os
Michael Van Canneyt wrote: he fact that you're the first to complain in 20 years (at least I cannot remember any others, and I've been around for a while) gives you an indication of the relative importance of your problem. I do share Anthony's (strong) dislike of include files (but I am not

Re: [fpc-pascal] Please someone explain this to me

2016-02-11 Thread Sven Barth
Am 11.02.2016 00:23 schrieb "Anthony Walter" : > > For those who didn't understand what I meant by using regions in the interface section rather than include files, here is an image of what is essentially in SysUtils currently: > > http://cache.getlazarus.org/images/sysutils-include.gif > > Notice

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Michael, a question: How much of the interface section of units differ per platform? Is it 1% of the code? Is it 5% of the code? With the xml2 unit it's 0%, yet all of the declarations are nested in several layers of include files: http://cache.getlazarus.org/images/xml2-unit.gif http://cache.get

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Graeme Geldenhuys wrote: On 2016-02-10 19:20, Michael Van Canneyt wrote: You just need to look at the system or sysutils units from recent delphis to see why include files are the better option, As someone that doesn't have access to recent Delphi versions, would you m

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Anthony Walter wrote: What about the interface section includes and {$region} option I described. Does anyone care to discuss that option? Please go back a few messages and read what I wrote. It is not an option. As said: not everyone uses lazarus. Michael. ___

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Anthony Walter wrote: For those who didn't understand what I meant by using regions in the interface section rather than include files, here is an image of what is essentially in SysUtils currently: You are forgetting that not everyone uses Lazarus. The RTL is part of Fr

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
For those who didn't understand what I meant by using regions in the interface section rather than include files, here is an image of what is essentially in SysUtils currently: http://cache.getlazarus.org/images/sysutils-include.gif Notice the unit file is opened the almost none of what it declar

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Sven Barth
Am 10.02.2016 21:03 schrieb "Anthony Walter" : > But to ask again, what's the purpose of using include files for the interface section of units when most everything in the interface sections remain unchanged among different platforms? Surely we can move all those the parts back to the unit interfac

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Marco van de Voort
In our previous episode, Tomas Hajny said: > at platform level, sometimes it makes sense to use a common include file > for a set of targets sharing a common set of characteristics (various MS > Windows targets or Unix targets) in order to simplify the maintenance, > etc. Trying to cover that in on

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Tomas Hajny
On Wed, February 10, 2016 22:04, Anthony Walter wrote: > What about the interface section includes and {$region} option I > described. > Does anyone care to discuss that option? Please go back a few messages and > read what I wrote. I don't get your $region idea, but as a maintainer of one of the

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
What about the interface section includes and {$region} option I described. Does anyone care to discuss that option? Please go back a few messages and read what I wrote. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.o

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Graeme Geldenhuys
On 2016-02-10 19:45, Juha Manninen wrote: > Thus, Lazarus editor fully understands include files unlike Delphi' editor. The knock-on affect of include files, is that pascal parsers are much more complex to write. Luckily we already have quite a few pascal parsers available, which already work with

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Dmitry Boyarintsev
On Wed, Feb 10, 2016 at 3:32 PM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2016-02-10 19:20, Michael Van Canneyt wrote: > > You just need to look at the system or sysutils units from recent > delphis to > > see why include files are the better option, > As someone that doesn't

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Graeme Geldenhuys
On 2016-02-10 19:12, Anthony Walter wrote: > I think the thing is I can't help but feel there should be a better system > for organizing implementations for different systems. Often some clever usage of design patterns can help, but more often than not, using include files are just a faster and ea

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Graeme Geldenhuys
On 2016-02-10 19:20, Michael Van Canneyt wrote: > You just need to look at the system or sysutils units from recent delphis to > see why include files are the better option, As someone that doesn't have access to recent Delphi versions, would you mind sharing a small example if you can. I'm not a

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Mattias Gaertner
> Sven Barth hat am 10. Februar 2016 um 15:09 > geschrieben: > [...] > > The {%...} directive is a comment in other contexts and can be used safely. > > What about include files included by other include files? That is no problem for the MainUnit directive. The directive tells the codetools the

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Oh and when the MainUnit directive is included at the top of an include file, how does this affect include files where the declaration is another include files, or include files which next other include files? ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Juha, Okay then, maybe everyone should make a mental note and remember add the MainUnit directive to the include files they are editing if it doesn't already exist. But to ask again, what's the purpose of using include files for the interface section of units when most everything in the interface

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Juha Manninen
On Wed, Feb 10, 2016 at 9:12 PM, Anthony Walter wrote: > And could the IDE be enhanced to should which unit is > ultimately including a file? Obviously the CodeTools already knows, it was > able to deduce the identifier exists and that it has a declaration by > looking through the units in the use

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Anthony Walter wrote: Thanks everyone for taking notice in the include file problem. I'm note sure about other people, but to me its a problem that sometimes limits me from following the source code. Ideally there should be one file per unit with an interface section and a

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Thanks everyone for taking notice in the include file problem. I'm note sure about other people, but to me its a problem that sometimes limits me from following the source code. Ideally there should be one file per unit with an interface section and an implementation section and no include files, b

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Sven Barth
Am 10.02.2016 15:55 schrieb "Juha Manninen" : > > On Wed, Feb 10, 2016 at 4:09 PM, Sven Barth wrote: > > What about include files included by other include files? > > Ok, that is a nasty situation. I think it should be avoided. Welcome to the RTL. ;) Regards, Sven ___

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Juha Manninen wrote: On Wed, Feb 10, 2016 at 4:09 PM, Sven Barth wrote: What about include files included by other include files? Ok, that is a nasty situation. I think it should be avoided. Happens regularly in the RTL units, though. Michael. __

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Juha Manninen
On Wed, Feb 10, 2016 at 4:09 PM, Sven Barth wrote: > What about include files included by other include files? Ok, that is a nasty situation. I think it should be avoided. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Marco van de Voort
In our previous episode, Juha Manninen said: [ Charset UTF-8 unsupported, converting... ] > On Wed, Feb 10, 2016 at 2:01 AM, Vojt?ch ?ih?k wrote: > > There exists IDE directive > > > > {%MainUnit ***.pas} > > > > and include files should contain it. > > Yes, that is the solution for Anthony's pro

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Sven Barth
Am 10.02.2016 14:09 schrieb "Juha Manninen" : > > On Wed, Feb 10, 2016 at 2:01 AM, Vojtěch Čihák wrote: > > There exists IDE directive > > > > {%MainUnit ***.pas} > > > > and include files should contain it. > > Yes, that is the solution for Anthony's problem. Most include files > used by LCL unit

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Juha Manninen
On Wed, Feb 10, 2016 at 2:01 AM, Vojtěch Čihák wrote: > There exists IDE directive > > {%MainUnit ***.pas} > > and include files should contain it. Yes, that is the solution for Anthony's problem. Most include files used by LCL units have it but FPC libraries may not. When the directive is set, L

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread leledumbo
> So my question is, how do the rest of you deal with include files and locating the unit including them? I don't know what "deal" here refers to, so I can't answer that. I seldom use include files except when I have to deal with what the compiler/rtl face: platform dependent implementation of cer

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Marc Santhoff
On Mi, 2016-02-10 at 05:10 -0500, Anthony Walter wrote: > Marc, > > Your suggestions only work if a unit declaring the function is in your uses > clauses. In the scenario I described that is clearly not the case. > > Additionally, and in a different scenario, when the identifier IS defined > and

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Sven Barth
Am 10.02.2016 11:11 schrieb "Anthony Walter" : > > Marc, > > Your suggestions only work if a unit declaring the function is in your uses clauses. In the scenario I described that is clearly not the case. > > Additionally, and in a different scenario, when the identifier IS defined and several units

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Anthony Walter
Marc, Your suggestions only work if a unit declaring the function is in your uses clauses. In the scenario I described that is clearly not the case. Additionally, and in a different scenario, when the identifier IS defined and several units are in the uses clause the goto declaration can jump to

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Graeme Geldenhuys
On 2016-02-10 00:01, Vojtěch Čihák wrote: > There exists IDE directive > {%MainUnit ***.pas} > and include files should contain it. That is not an include file requirement, plus that functionality is a Lazarus-only trick. Any other editor and the FPC compiler sees that as a simple code comment. Pl

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Marc Santhoff
On Di, 2016-02-09 at 18:46 -0500, Anthony Walter wrote: > Ralf, > > A couple of points. > > 1) As I explained there are times when I, and probably other people as > well, need to find the declaration of a function, constant, record, or some > other identifier. We may not know if the function even

Re: [fpc-pascal] Please someone explain this to me

2016-02-09 Thread Anthony Walter
Sven, Thanks for clarifying that particular issue. I assumed the functions had been moved to System but wasn't sure when. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Please someone explain this to me

2016-02-09 Thread Sven Barth
Am 10.02.2016 00:32 schrieb "Ralf Quint" : > > On 2/9/2016 2:58 PM, Anthony Walter wrote: >> >> I really don't like the include files with Lazarus and Free Pascal for the following reason: >> >> How the am I supposed to know which file is including an include file? >> >> Often times I am tryin

Re: [fpc-pascal] Please someone explain this to me

2016-02-09 Thread Vojtěch Čihák
ns" Datum: 10.02.2016 00:06 Předmět: [fpc-pascal] Please someone explain this to me I really don't like the include files with Lazarus and Free Pascal for the following reason:How the am I supposed to know which file is including an include file?Often times I am trying to find a funct

Re: [fpc-pascal] Please someone explain this to me

2016-02-09 Thread Anthony Walter
Ralf, A couple of points. 1) As I explained there are times when I, and probably other people as well, need to find the declaration of a function, constant, record, or some other identifier. We may not know if the function even exists or has been declared in Pascal, for example when attempting to

Re: [fpc-pascal] Please someone explain this to me

2016-02-09 Thread Ralf Quint
On 2/9/2016 2:58 PM, Anthony Walter wrote: I really don't like the include files with Lazarus and Free Pascal for the following reason: How the am I supposed to know which file is including an include file? Often times I am trying to find a function or class or some other identifier an

[fpc-pascal] Please someone explain this to me

2016-02-09 Thread Anthony Walter
I really don't like the include files with Lazarus and Free Pascal for the following reason: How the am I supposed to know which file is including an include file? Often times I am trying to find a function or class or some other identifier and I search files on disk for the name. Then it tu