[fpc-devel] wrong line for deprecated
Just noticed the following program Project1; var a: integer deprecated; begin if 1 = a then writeln; end. project1.lpr(5,3) Warning: Symbol a is deprecated Which points to the then on the line after a is used. (even if the lines a joined, it always points to the next token) If a is declared as function, the message points to the begin of a While absolutely minor, and not a problem = shall I put it in mantis? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
Have you looked at target embedded ? Just took a look at it it's still quite big/huge and uses arm ? For what specific platform are you contemplating this for ? None, redcode, cuda. Mini-fpc could be reduced to show proportions that it becomes virtual, an exercise at seperating the processing of the pascal language and giving meaning/sense to the tokens so it becomes ready for assembling. It could be reduced to such a level that it becomes a question of plugging in the lower parts, so it could also become more moduler. It's also important to reduce code size and code files as much as possible, just searching all files for a certain keyword already takes multiple seconds. Mini-fpc would be ment to learn how free pascal works and also to be able to port it to other pascal languages for example Delphi, so further experimentation can be done. (i.e. what specific need is driving this question ?) Understanding for example how free pascal compiles itself, which units it needs as a minimum, so far it seems to need system.pas, objpas.pas and sysinit.pas. Something like that. sysinitpas.pas contains some routines in implementation section which must apperently be present, some functions are made public via special directives. There is also another compiler directive for example compilerproc which remains undocumented, and then there are these things aliases and such. Free Pascal seems to allow to compile a user supplied system.pas unlike Delphi where this is not allowed, so this could give some problems how to port Free Pascal to Delphi. Mini-FPC would also be a helpfull tool to see if it's possible or not and which self-compiling features free pascal has which Delphi might be missing. Perhaps there could be work arounds for Delphi how to still compile it. It implements a very minimal set of things, basically the minimum necessary to support the language core, and the minimum necessary to support a given processor and it's system unit. I wouldn't call that minimal in any sense. Minimal would be: redcode support. Also the free pascal/delphi language has become bloated with a lot of stuff... it could be further interesting to reduce it... just for a learning project, but perhaps that should be called: Slim-FPC or so ;) or Nano-FPC lol. Nano would be: One integer type, one string type, branch support, loop support, basic support, object orientation support, property support, array support, virtual methods support. (Or maybe multiple integer types, just to make it a bit more usuable, and then also very maybe floating type or multiple floating types but this could again make it too complex, and keep it simple). Only two platforms support to show how to support different assemblers, and how to swap rtl's or so. A minimum ammount of files and code. Bye, Skybuck. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
3 comments: 1) Floating point support is necessary for the compiler to compile/build itself, because floating point number support needs to be available in the compiler itself (otherwise source files containing floating point numbers cannot be processed by the compiler). Why would a basic/core compiler which does not support floating point numbers need floating point numbers ? Doesn't make much sense to me. Surely free pascal can be reduced so far to integers only. I can only imagine math.pas containing PI but math.pas should not be part of a basic/core compiler anyway. So this argument of yours seems to make little sense unless you can give a very convincing example of floats being used inside the core of free pascal compiler. 2) Needs of different users vary considerably. A user interested in compiling a simple console 'hello world' program using procedural Pascal needs only unit System and nothing else, a user creating 'hello world' in a GUI window using Object Pascal has much broader needs (broader than the compiler itself). No, calling the windows gui requires a windows api. It has nothing to do with compiler technology. So again this argument of yours makes little sense. 3) Everyone is free to create a special installation package for his own needs, but I can hardly imagine something like that becoming part of the general FPC distribution. The mini-fpc should be a side-project for those people interested in compiler technology only and not everything else. Bye, Skybuck. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] the new resourcestring in const translation
On 09.09.2011 18:27, Sergei Gorelkin wrote: 09.09.2011 18:36, Martin пишет: fpc recently added the ability to translate const Foo: String = resourcestring; if resourcestring changes so does Foo Any way to work around this? Probably only by duplicating the literal value which is used to initialize. because in C:\lazarus_latest\components\synedit\syneditstrconst.pp there are a lot of strings initialized that way with the intend of the old behaviour = keep an untranslated copy. Also: Is that intended for typed const? Foo in above could have been changed by user in the meantime. Yes, trying to be Delphi-compatible. In Delphi, such consts are translated. Delphi translates them once during initialization, but in FPC this is impossible to do because translation typically happens later, so the only way is to hook into SetResourceStrings. Personally I don't think this is a valuable feature, but the matter of fact is all Delphi features are implemented in FPC sooner or later - so why not to do it sooner... Regards, Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel This being translated always and is Delphi compatible resourcestring sString1='Some localizable constant' sString2='Another localizable constant' const sStrings:array[0..1] of PResStringRec=(@sString1,@sString2); Regards, Anton ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] the new resourcestring in const translation
In our previous episode, Anton Kavalenka said: This being translated always and is Delphi compatible It is if you use Delphi based resources for translating. It is not if you use thirdparty translation packages udner Delphi like e.g. dxgettext ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
On 9 Sep 11, at 14:15, Skybuck Flying wrote: 1) Floating point support is necessary for the compiler to compile/build itself, because floating point number support needs to be available in the compiler itself (otherwise source files containing floating point numbers cannot be processed by the compiler). Why would a basic/core compiler which does not support floating point numbers need floating point numbers ? Doesn't make much sense to me. Surely free pascal can be reduced so far to integers only. OK, it's certainly possible to create a simple Pascal compiler without most of current features. Such compilers surely exist even now. What does it have to do with FPC then though? If you want to create a very simple compiler for the purpose of education about compiler techniques (my original understanding about your target was slightly different but apparently wrong judging from your response to my comments), it's probably better to start from scratch or e.g. use the old FPK 0.5 sources than trying to reduce the existing very wide features of FPC to a very small set. I can only imagine math.pas containing PI but math.pas should not be part of a basic/core compiler anyway. Indeed, math.pas is a bit more advanced stuff. Excluding floating points obviously means excluding much simpler stuff like standard division. So this argument of yours seems to make little sense unless you can give a very convincing example of floats being used inside the core of free pascal compiler. OK, sorry, I clearly misunderstood your intention (my original understanding was that you were suggesting reduction of the amount of units to avoid possible confusion with newcomers starting to program in Pascal, not for people interested in learning how compilers work or how they may be created). . . 3) Everyone is free to create a special installation package for his own needs, but I can hardly imagine something like that becoming part of the general FPC distribution. The mini-fpc should be a side-project for those people interested in compiler technology only and not everything else. OK, anyone can use FPC sources for such an activity, although I believe that there would be better options for achieving that as mentioned above. Personally, I don't think that floating point numbers are a major complexity driver from the compiler point of view but that doesn't really matter. Tomas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] the new resourcestring in const translation
On 10.09.2011 12:05, Marco van de Voort wrote: In our previous episode, Anton Kavalenka said: This being translated always and is Delphi compatible It is if you use Delphi based resources for translating. It is not if you use thirdparty translation packages udner Delphi like e.g. dxgettext ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel Lazarus default translator would work with this as well. string is TResStringRec structure I keep the pointer of the structure but not of the string data content (which is structure member) - so translating content won't affect the structure pointer. regards, Anton ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
Skybuck Flying schrieb: Nano would be: One integer type, one string type, branch support, loop support, basic support, object orientation support, property support, array support, virtual methods support. You'll have much trouble in *removing* existing features from FPC, affecting parser, error handling, intermediate representation, code generation and more at the same time. DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
If a mini-FPC were to be created to help popularize the Pascal language and get beginners interested and up to speed, it would be more useful to provide a simple IDE than a stripped-down compiler. The console FP IDE has never worked well for me (crashes a lot) and Lazarus is very large and intimidatingly complex. I'd rather see some effort put into an easy-to-install beginner's programming environment than in pulling features out of the compiler. I know this isn't the forum for that discussion, but I did want to make the suggestion. --73-- --Jeff Duntemann Colorado Springs, Colorado On 9/10/2011 6:12 AM, Hans-Peter Diettrich wrote: Skybuck Flying schrieb: Nano would be: One integer type, one string type, branch support, loop support, basic support, object orientation support, property support, array support, virtual methods support. You'll have much trouble in *removing* existing features from FPC, affecting parser, error handling, intermediate representation, code generation and more at the same time. DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
On Sat, 10 Sep 2011, Jeff Duntemann wrote: If a mini-FPC were to be created to help popularize the Pascal language and get beginners interested and up to speed, it would be more useful to provide a simple IDE than a stripped-down compiler. The console FP IDE has never worked well for me (crashes a lot) and Lazarus is very large and intimidatingly complex. I'd rather see some effort put into an easy-to-install beginner's programming environment than in pulling features out of the compiler. I know this isn't the forum for that discussion, but I did want to make the suggestion. Maybe more effort should be put in the 'education' version of lazarus. Someone already started this. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
Am 10.09.2011 15:42, schrieb Jeff Duntemann: If a mini-FPC were to be created to help popularize the Pascal language and get beginners interested and up to speed, it would be more useful to provide a simple IDE than a stripped-down compiler. The console FP IDE has never worked well for me (crashes a lot) and Lazarus is very large and intimidatingly complex. I'd rather see some effort put into an easy-to-install beginner's programming environment than in pulling features out of the compiler. May I recommend MSEide? http://developer.berlios.de/projects/mseide-msegui/ Martin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
On Sat, 10 Sep 2011 16:51:36 +0200 (CEST) Michael Van Canneyt mich...@freepascal.org wrote: On Sat, 10 Sep 2011, Jeff Duntemann wrote: If a mini-FPC were to be created to help popularize the Pascal language and get beginners interested and up to speed, it would be more useful to provide a simple IDE than a stripped-down compiler. The console FP IDE has never worked well for me (crashes a lot) and Lazarus is very large and intimidatingly complex. I'd rather see some effort put into an easy-to-install beginner's programming environment than in pulling features out of the compiler. I know this isn't the forum for that discussion, but I did want to make the suggestion. Maybe more effort should be put in the 'education' version of lazarus. Someone already started this. See here: http://wiki.lazarus.freepascal.org/Lazarus_for_education Any help and ideas are welcome. Mattias ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
RE : [fpc-devel] Project Idea: Mini-FPC
None, redcode, cuda. Mini-fpc could be reduced to show proportions that it becomes virtual, an exercise at seperating the processing of the pascal language and giving meaning/sense to the tokens so it becomes ready for assembling. It could be reduced to such a level that it becomes a question of plugging in the lower parts, so it could also become more moduler. It's also important to reduce code size and code files as much as possible, just searching all files for a certain keyword already takes multiple seconds. Mini-fpc would be ment to learn how free pascal works and also to be able to port it to other pascal languages for example Delphi, so further experimentation can be done. Have a look at the P4 pascal compiler http://homepages.cwi.nl/~steven/pascal/ . The whole compiler is written in pascal and is only 4000 lines in 1 file. It generates a high level pcode and comes with a pcode interpreter (1000 lines of pascal in a second file). Simpler you can't get. Cross platform. Only standard pascal though, no objects, etc. Ludo ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
Michael Van Canneyt wrote: On Sat, 10 Sep 2011, Jeff Duntemann wrote: If a mini-FPC were to be created to help popularize the Pascal language and get beginners interested and up to speed, it would be more useful to provide a simple IDE than a stripped-down compiler. The console FP IDE has never worked well for me (crashes a lot) and Lazarus is very large and intimidatingly complex. I'd rather see some effort put into an easy-to-install beginner's programming environment than in pulling features out of the compiler. I know this isn't the forum for that discussion, but I did want to make the suggestion. Maybe more effort should be put in the 'education' version of lazarus. Someone already started this. I was hoping to put some time into the IDE, but in practice am using Lazarus now even for console apps. One thing that does occur to me is that the sort of cut-down compiler that the OP has suggested is probably very similar to a minimal compiler+libraries combination that would be a useful timesaver when trying to get a new port or version to the Hello, World! stage. Is there a makefile target that will do this? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: RE : [fpc-devel] Project Idea: Mini-FPC
Have a look at the P4 pascal compiler http://homepages.cwi.nl/~steven/pascal/ . The whole compiler is written in pascal and is only 4000 lines in 1 file. It generates a high level pcode and comes with a pcode interpreter (1000 lines of pascal in a second file). Simpler you can't get. Cross platform. Only standard pascal though, no objects, etc. Maybe we could/should put a fpc compilable version of this into the fpc docs, and into the fpc distribution? Can't imagine that one could do anything smaller or more portable? John ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Build error on Win32 - SVN Trunk
Hi, I'm trying to compile the SVN Trunk version using FPC 2.5.1 to bootstrap. I'm working on Windows 32 bits. Usually I just do this: e: cd fpc svn upmake clean all PP=e:\pp\bin\i386-win32\ppc386.exe make install And it worked without problems until today. I do this process once a month. When I do make clean all PP=e:\pp\bin\i386-win32\ppc386.exe the compiling process starts, and after a while, I get this error message: process_begin: CreateProcess((null), __missing_command_CMP -i218 ppc3.exe ppc386.exe, ...) failed. Is this a bug?, or I have use another compiler to bootstrap?. Leonardo M. Ramé http://leonardorame.blogspot.com___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Build error on Win32 - SVN Trunk
On 10 Sep 2011, at 20:52, Leonardo M. Ramé wrote: Hi, I'm trying to compile the SVN Trunk version using FPC 2.5.1 to bootstrap. This is wrong. It has always been wrong and will always be wrong. Bootstrapping has always only been supported and will always only be supported when starting with the latest official release. There was a thread on this list just two days ago in which I repeated that again two times: * http://lists.freepascal.org/lists/fpc-devel/2011-September/025951.html * http://lists.freepascal.org/lists/fpc-devel/2011-September/025953.html And it worked without problems until today. I do this process once a month. When I do make clean all PP=e:\pp\bin\i386-win32\ppc386.exe the compiling process starts, and after a while, I get this error message: process_begin: CreateProcess((null), __missing_command_CMP -i218 ppc3.exe ppc386.exe, ...) failed. Is this a bug?, or I have use another compiler to bootstrap?. You have to have the directory with the binaries of a *full install* of the latest release in your path for bootstrapping to be supported. Not a snapshot. Not a self-compiled version. Not just a compiler binary. The complete install of the latest release. Jonas___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: RE : [fpc-devel] Project Idea: Mini-FPC
In our previous episode, John Lee said: Maybe we could/should put a fpc compilable version of this into the fpc docs, and into the fpc distribution? Can't imagine that one could do anything smaller or more portable? P4 is not FPC compilable. It uses ISO style filehandling iirc. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
RE : RE : [fpc-devel] Project Idea: Mini-FPC
Maybe we could/should put a fpc compilable version of this into the fpc docs, and into the fpc distribution? Can't imagine that one could do anything smaller or more portable? P4 is not FPC compilable. It uses ISO style filehandling iirc. Correct. And it uses also the ISO new(p, t,..., tn) syntax for dynamic allocation where tn are variant record tag types. Ludo ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: RE : RE : [fpc-devel] Project Idea: Mini-FPC
Maybe we could/should put a fpc compilable version of this into the fpc docs, and into the fpc distribution? Can't imagine that one could do anything smaller or more portable? P4 is not FPC compilable. It uses ISO style filehandling iirc. Correct. And it uses also the ISO new(p, t,..., tn) syntax for dynamic allocation where tn are variant record tag types. Of course, it isn't fpc! - but if folks want a really simple fpc, it could be made compilable by some fpc'ite couldn't it? Don't we support some iso pascal stuff anyway? J Ludo ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] FPDoc and inherited methods
Hans-Peter Diettrich schrieb: It looks like FPDoc links to an inherited item (method), when only a short description is provided for an overridden method. Is this intended behaviour? (see Controls.TDragControlObject) I also have the impression that FPDoc does not (always) overwrite existing HTML files. DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
That just may do the job. Three years ago I started rewriting my BP7 Pascal book for FPC, but the issue of which IDE would be better for beginners drove me nuts. I looked around for something simple and reliable and eventually set the project aside. Lazarus is really the way to go for an IDE, but it's a lot to grasp all at once for students and newcomers. Don't get me wrong; I love it--but it really wasn't designed for absolute beginners. The book is an intro to Pascal and not to Lazarus, but I'd really like to use Lazarus as the example IDE, even though all the example code runs in a console. I'll take a look at Lazarus for Education this week and see whether it could work for the book. Thanks for pointing it out to me. --73-- --Jeff Duntemann Colorado Springs, Colorado On 9/10/2011 9:28 AM, Mattias Gaertner wrote: On Sat, 10 Sep 2011 16:51:36 +0200 (CEST) Michael Van Canneytmich...@freepascal.org wrote: On Sat, 10 Sep 2011, Jeff Duntemann wrote: If a mini-FPC were to be created to help popularize the Pascal language and get beginners interested and up to speed, it would be more useful to provide a simple IDE than a stripped-down compiler. The console FP IDE has never worked well for me (crashes a lot) and Lazarus is very large and intimidatingly complex. I'd rather see some effort put into an easy-to-install beginner's programming environment than in pulling features out of the compiler. I know this isn't the forum for that discussion, but I did want to make the suggestion. Maybe more effort should be put in the 'education' version of lazarus. Someone already started this. See here: http://wiki.lazarus.freepascal.org/Lazarus_for_education Any help and ideas are welcome. Mattias ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Project Idea: Mini-FPC
On Sat, Sep 10, 2011 at 11:34 PM, Jeff Duntemann j...@duntemann.com wrote: Three years ago I started rewriting my BP7 Pascal book for FPC, but the issue of which IDE would be better for beginners drove me nuts. I looked around for something simple and reliable and eventually set the project aside. Lazarus is really the way to go for an IDE, but it's a lot to grasp all at once for students and newcomers. Don't get me wrong; I love it--but it really wasn't designed for absolute beginners. I have already worked with 13 students from my university, all of which had never worked with Pascal before and using Lazarus was never an issue. I just explained how to install it correctly (because my projects requires Lazarus from svn) and that's all. I didn't need to say a word about how to use the form designer and people could use it. I didn't need to say a word about how to add files to a project, everyone could do it. When using the stable version I didn't even need to explain them how to install it so did you really have a problematic experience involving Lazarus and newbies? -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Request to merge commit 18230 (STABS fix) to FPC 2.6
Hello. Can the commit nr 18230 be merged into FPC 2.6 ? http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revrevision=18230 Fixes bug: http://bugs.freepascal.org/view.php?id=20003 -- cobines ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel