Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On 2017-02-13 22:02, fredvs wrote: > PS: I wish that one day fpc will publish the complete list of all the > {$something ...} that fpc can deal. There has always been one for local and global directives. Take a look at the official "Programmers Guide" PDF and see section 1.2 (Local Directives) and section 1.3 (Global Directives). They are all listed there with detailed descriptions. http://www.freepascal.org/docs.var Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On Mon, 13 Feb 2017, fredvs wrote: I guess you are searching for {$unitpath Documents} Yes, it is a excellent solution. but then some units might not rebuild automatically, It is not a problem, all that units are part of ../src and users should not touch it when compiling demos. Many thanks Mathias for this pearl. PS: I wish that one day fpc will publish the complete list of all the {$something ...} that fpc can deal. This list has always existed. I wrote it: http://www.freepascal.org/docs-html/current/prog/prog.html Your remark shows how hard you looked for it. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
> Your remark shows how hard you looked for it. Is it the war ? I never imagined that such local and global directives to define path of units could exist. In my mind, it was not possible that fpc could read units without that the path was defined before all. So only a fpc parameter could be used. I never ask for that (I was afraid for answer-reaction like yours) nor seek to find it And indeed, when Mattias came with {$unitpath Documents} it was a big surprise for me. It is a difficult task to speak with gurus. That makes me always nervous. Sadly, sometimes when I do not find a solution, I ask it here. But, trust me, it is always scared. I hope that I will not annoy you anymore (but where to ask then). Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626p5727661.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] MSEide+MSEgui 4.4 for Free Pascal 3.0.2
Hi, MSEide+MSEgui 4.4 for Free Pascal 3.0.2 has been released: https://sourceforge.net/projects/mseide-msegui/ There are also new versions of the ARM (Raspberry Pi) cross and native environments for Free Pascal: https://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ https://sourceforge.net/projects/mseide-msegui/files/fpcarm/ and new versions of MSEgit, MSEspice and MSErun: https://sourceforge.net/projects/mseuniverse/ Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On 14/02/17 20:00, fredvs wrote: It is a difficult task to speak with gurus. Nah, it's not. They are also people... I think.. Actually, I've never seen proof that they all are, so some may actually be chimps. :) Anyway, some are standing on such a high pedestal that they feel everyone is beneath them. I speak from personal experience (yes, I've been egocentric and ignorant before and yes, I met someone who was worse.. much worse). But then I guess true wisdom is to know the extent of one's own ignorance. :) So just ask. Yeah sometimes you may get a rude response. I've had a few. So what. Their attitude is their problem, getting your question answered is yours. They help you with your answer, you help them with their attitude. You learn through the experience, they don't. That makes me always nervous. Don't be. Who are they to judge you? You think they never took the easy way out and ask a mailing list or forum instead of using google? At least I will admit I have once or twice. (Oh sorry guys, no I don't claim to be a guru, sorry sorry, yes yes, you are the masters. Bow, bow, kneel, kneel ;) ) Sadly, sometimes when I do not find a solution, I ask it here. Perhaps the reason why you're not finding a solution, is because it seems to me you have a preference for a non-standard solution (at least in this occurrence). As a result, you may be searching in the wrong direction and hence, you're not finding any clear answers. (Unless I misunderstood something). But I don't fully understand your situation. I don't know what you've learned so far and what knowledge and experience you have. So I won't judge. But, trust me, it is always scared. I hope that I will not annoy you anymore (but where to ask then). On the contrary; I found it quite amusing. ;) Greetz, Tim. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
Am 2017-02-14 um 16:02 schrieb Tim Veldhuizen: On 14/02/17 20:00, fredvs wrote: It is a difficult task to speak with gurus. Nah, it's not. They are also people... I think.. Actually, I've never seen proof that they all are, so some may actually be chimps. :) Anyway, some are standing on such a high pedestal that they feel everyone is beneath them. I speak from personal experience (yes, I've been egocentric and ignorant before and yes, I met someone who was worse.. much worse). But then I guess true wisdom is to know the extent of one's own ignorance. :) So just ask. Yeah sometimes you may get a rude response. I've had a few. So what. Their attitude is their problem, getting your question answered is yours. They help you with your answer, you help them with their attitude. You learn through the experience, they don't. That makes me always nervous. Don't be. Who are they to judge you? You think they never took the easy way out and ask a mailing list or forum instead of using google? At least I will admit I have once or twice. (Oh sorry guys, no I don't claim to be a guru, sorry sorry, yes yes, you are the masters. Bow, bow, kneel, kneel ;) ) Sadly, sometimes when I do not find a solution, I ask it here. Perhaps the reason why you're not finding a solution, is because it seems to me you have a preference for a non-standard solution (at least in this occurrence). As a result, you may be searching in the wrong direction and hence, you're not finding any clear answers. (Unless I misunderstood something). But I don't fully understand your situation. I don't know what you've learned so far and what knowledge and experience you have. So I won't judge. But, trust me, it is always scared. I hope that I will not annoy you anymore (but where to ask then). On the contrary; I found it quite amusing. ;) Very well and eloquently written and exactly my opinion too! ;-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On Tue, 14 Feb 2017, fredvs wrote: Your remark shows how hard you looked for it. Is it the war ? No. It just means I established you didn't look in the documentation before embarking on a mission to request a compiler extension. No more, no less. When I learn new tools, I always read the documentation first. I admit, there is quite some for FPC, but the list of directives is something most (if not all) programmers should be aware of. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
>> I hope that I will not annoy you anymore (but where to ask then). > On the contrary; I found it quite amusing. ;) Yep, thanks Tim, I feel better now, I will continue to amuse you (and Michael too, see follow) ;-) > ... embarking on a mission to request a compiler extension. No more, no > less. Yes and that mission is to adapt that un-liked "in" for something more needed. I propose this: uses myunit in '../src/myunit.pas'; => like now, do not touch anything at compiler. uses myunit in '../src/'; => when no filename is defined but only a directory, add this directory in search-path like it was -Fumyunit and threat myunit like other units without "in". Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626p5727666.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On Tue, 14 Feb 2017, fredvs wrote: I hope that I will not annoy you anymore (but where to ask then). On the contrary; I found it quite amusing. ;) Yep, thanks Tim, I feel better now, I will continue to amuse you (and Michael too, see follow) ;-) ... embarking on a mission to request a compiler extension. No more, no less. Yes and that mission is to adapt that un-liked "in" for something more needed. I propose this: uses myunit in '../src/myunit.pas'; => like now, do not touch anything at compiler. uses myunit in '../src/'; => when no filename is defined but only a directory, add this directory in search-path like it was -Fumyunit and threat myunit like other units without "in". Please simply use "{$unitpath }" or use a lazarus project or fpc. If anything, I would like to see "in 'xyz';" removed from the compiler. Definitely not expanded. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
Oops, in previous mail, please read: ... -Fu../src ...in place of... -Fumyunit ... Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626p5727668.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
> Please simply use "{$unitpath }" Huh, Mattias present me yesterday a beautiful "{$unitpath }". We played together all the night, without any trouble. And this morning Matt said that I may not trust in {$unitpath }, that I will only have problems, that I should think at something else. ;-( > or use a lazarus project or fpc. The game is to do everything inside code, without external tools. (for old-way people like me that love to use console and old-fashion editors). Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626p5727669.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On Tue, 14 Feb 2017, fredvs wrote: Please simply use "{$unitpath }" Huh, Mattias present me yesterday a beautiful "{$unitpath }". We played together all the night, without any trouble. And this morning Matt said that I may not trust in {$unitpath }, that I will only have problems, that I should think at something else. ;-( He is correct. But you insist on doing things wrong (in my opinion), so I oblige you by presenting you what I consider to be the least harmful option that still has a chance of earning your approval. or use a lazarus project or fpc. The game is to do everything inside code, without external tools. (for old-way people like me that love to use console and old-fashion editors). I am also old-way, and I also use the console. But configuration management simply does not belong in the source code. You can use fpmake if you want to write pascal code for your configuration management. It exists for this exact purpose, and I should know, I invented it. So, you already have plenty of options to do what you want in a file: - lazarus project (lazbuild can perfectly be used outside the IDE) - fppkg - fpmake - $unitpath - use a per-project config file. Also a very recommended option (see e.g. fpgui) - Probably mseide also gives you some extra options. Given this wide range of existing tried-and-tested options, there is really no need to burden the compiler with another option. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?
On 15 Feb 2017 04:47, Michael Van Canneyt wrote: > > > > On Tue, 14 Feb 2017, fredvs wrote: > > >> Please simply use "{$unitpath }" > > > > Huh, Mattias present me yesterday a beautiful "{$unitpath }". > > > > We played together all the night, without any trouble. Just because things work now, doesn't mean they always will. Do you make software to "play" and keep yourself busy, or do you want to get to business and do something useful? If the latter option, then i think you'll want to make sure things don't break because of wrong decisions in the past. And i believe you'll want to keep things managable, simple and reusable. These are the principles that form the basis for keeping configuration such as unit search paths out of the source code. I once restored a backup of my current project to a different directory than it used to be in and had to fix many path references as a result. (Yes even in sourcecode, because my project generates pascal code and calls fpc, so it also generates a -Fu parameter and it used an absolute path because I'm stupid and used an easy quick-fix at the time ;) ) Would you want to do that for every source file you've got? > > And this morning Matt said that I may not trust in {$unitpath }, that I > > will > > only have problems, that I should think at something else. ;-( > > He is correct. And i agree. You're not talking about a bunch of shell scripts here you see. While they are interpreted, units are compiled and some things are included into the object file which means you'd need to recompile the unit in order to use it in a safe, predictable and understandable way. The compiler usually figures out which units need to be recompiled. Configuration is therefore not something you want to put into sourcecode, as this may confuse the compiler. This may result to it not recompiling a unit, which may lead to unpredictable behaviour. That would mean your program does things that the source code cannot explain. Believe me, this is hell, I've been there. (In a project about 10 years ago, a class was being rewritten from scratch. When debugging some weird error, I noticed a variable that "magically" changed value even though it was not assigned anywhere in the source code appart from the initialisation by the constructor. It turned out to be an incorrect static cast to the old class type, in a unit that was not being recompiled so the object (of the new type) was used by that unit as if it was the old type. It cost me three days to debug this nice little beasty and because debug info was not available, i had to trace in assembly even. The cause? Configuration options incorrect. The unit was implicitly linked..) Greetz, Tim ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] TProcess interacting with Octave 4.2 on Win32
I am having trouble reading/writing to Octave through a TProcess on Win32. Full source and primitive demo here: http://forum.lazarus.freepascal.org/index.php/topic,35823.0.html Is there some way to do this successfully? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal