[fpc-pascal] CRT unit and Windows' terminal
Hi, I want to create console app that's using box drawing characters from unicode. Before CRT unit is used, it's all fine and my program could draw table beautifully. But once I put CRT unit, those characters became garbages. But strangely, it's only happen on Windows' terminal (win10). I tried the same exact program in Mac and Linux, using each CRT unit, and they all run fine. I need CRT unit to make my console program more interactive (i.e. cursor positioning, keyboard handling, text coloring, etc). So, what's wrong with CRT unit on Windows? Can anybody explain the strange behaviour and how to solve the problem? Thank you. -- Regards, –Mr Bee ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Getting reason for failure with SendToRaw()
I'm using SendToRaw() from a console application to send an email back to myself with attachments to aid in technical support. It always works find when I send the mail to myself. I run SendToRaw() a second time with my customers email address instead of mine so I can go over things with them, but sometimes it fails, but I don't know why. SendToRaw() returns a true if successful or false if it fails, but I don't know the reason for failures. Is there some way to get an error code so I can figure out what's wrong? Or is there a better method for sending email that would give me an error code? I'm running from a single thread console application. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
Reported at https://bugs.freepascal.org/view.php?id=32538. I didn’t say much but I think that should be enough. Thanks. > On Oct 12, 2017, at 7:22 PM, Sven Barth via fpc-pascal >wrote: > > Wow, okay, that's a nasty one O.o Considering that the "AbstractError" is in > the System unit it's safe to assume that the compiler is getting confused > there. > Would you please open a bug report with this as a full example? > > But I'm glad that you found the issue... > Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
Am 12.10.2017 13:59 schrieb "Ryan Joseph": > > > > > On Oct 12, 2017, at 5:35 PM, Michael Van Canneyt wrote: > > > > Normally not :) > > > > What Sven wanted to ascertain was why you get this error, which is totally abnormal. > > Ok did some tests and here’s an example of how to reproduce it. It’s the name “system” which is doing it and if I remove that name the error goes away. > > type > TAbstractClass = class > function GetLocation (system: TObject): TPoint; virtual; abstract; > end; Wow, okay, that's a nasty one O.o Considering that the "AbstractError" is in the System unit it's safe to assume that the compiler is getting confused there. Would you please open a bug report with this as a full example? But I'm glad that you found the issue... Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
> On Oct 12, 2017, at 5:35 PM, Michael Van Canneyt> wrote: > > Normally not :) > > What Sven wanted to ascertain was why you get this error, which is totally > abnormal. Ok did some tests and here’s an example of how to reproduce it. It’s the name “system” which is doing it and if I remove that name the error goes away. type TAbstractClass = class function GetLocation (system: TObject): TPoint; virtual; abstract; end; Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
On Thu, 12 Oct 2017, Ryan Joseph wrote: On Oct 12, 2017, at 4:19 PM, Sven Barth via fpc-pascalwrote: Could you try whether a test program with an abstract method that you call compiles correctly? Thanks that was the tip I needed. That unit had an abstract method and after removing it the problem went away. Are abstract methods broken or something? Normally not :) What Sven wanted to ascertain was why you get this error, which is totally abnormal. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
Am 12.10.2017 10:37 schrieb "Ryan Joseph": > > > > > On Oct 12, 2017, at 12:59 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > > > AbstractError() is the name of the function the compiler uses to replace abstract methods with (so that they generate an exception when called). Thus something very strange is going on with your installation :/ > > Is there anything I can do to track it down? It has been there for 6 months now preventing me from upgrading (I was using 3.1.1 until I got this bad version and went back to 3.0.2). If I start removing parts of the program piece by piece I may be able to figure it out but that’s obviously a last resort and I’ve avoided it for 6 months now. ;) Could you try whether a test program with an abstract method that you call compiles correctly? Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
> On Oct 12, 2017, at 12:59 PM, Sven Barth via fpc-pascal >wrote: > > AbstractError() is the name of the function the compiler uses to replace > abstract methods with (so that they generate an exception when called). Thus > something very strange is going on with your installation :/ Is there anything I can do to track it down? It has been there for 6 months now preventing me from upgrading (I was using 3.1.1 until I got this bad version and went back to 3.0.2). If I start removing parts of the program piece by piece I may be able to figure it out but that’s obviously a last resort and I’ve avoided it for 6 months now. ;) Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Resource compilation
Am 11.10.2017 um 11:24 schrieb Sven Barth via fpc-pascal: > The point of our own resource compiler would be to avoid external > dependencies. True. And having a general-purpose preprocessor would come in useful anyway. Fun fact: windres also just calls gcc, which is probably why we deploy it: #define DEFAULT_PREPROCESSOR "gcc -E -xc -DRC_INVOKED" But it would be a replacement of a somewhat obscure dependency (windres seems to be a crossbinutils thing) with just keeping a standard one. -- Regards, Martok Ceterum censeo b32079 esse sanandam. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AbstractError in 3.1.1
Am 12.10.2017 04:34 schrieb "Ryan Joseph": > > I just built the ppcx64 trunk version 3.1.1 so I could try the memory management operator overloads we talked about but I’m getting a compiler error in my project that doesn’t make sense. > > On the last line of one unit (literally at end.) I get: error: identifier idents no member “AbstractError”. What does this mean? There is just the last line of the unit so presumably it occurred higher up but I don’t have any other information to go on. AbstractError() is the name of the function the compiler uses to replace abstract methods with (so that they generate an exception when called). Thus something very strange is going on with your installation :/ Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal