Re: [fpc-pascal] Generic with inheritance - fpc 3.0
On Mon, 30 Nov 2015, Sven Barth wrote: Am 30.11.2015 15:55 schrieb "Torsten Bonde Christiansen": Hi. The docs for 3.0 does not directly mention generics and inheriting from another generic class, but I tried out with the code below. It compiled, ran and worked fine but since the docs do not explicit mention it as a posibility I am a little reluctant to go forward using this strategy if is not meant to work... Yes, that's supposed to work :) I will add this to the documentation. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Generic with inheritance - fpc 3.0
Hi. The docs for 3.0 does not directly mention generics and inheriting from another generic class, but I tried out with the code below. It compiled, ran and worked fine but since the docs do not explicit mention it as a posibility I am a little reluctant to go forward using this strategy if is not meant to work... (ps. i know this is incomplete code, but it should illustrate my point)type type { TMyType } generic TMyType = class private Item: T; public constructor Create; virtual; end; { TMyDerivedType } generic TMyDerivedType = class(specialize TMyType) private Count: Integer; public constructor Create; override; end; TMyIntClass = specialize TMyDerivedType; [...snipped both Create implementations...] var IC: TMyIntClass; begin M := TMyIntClass.Create(); M.Item := 20; M.Count := 2; M.Free; end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generic with inheritance - fpc 3.0
Am 30.11.2015 15:55 schrieb "Torsten Bonde Christiansen": > > Hi. > > The docs for 3.0 does not directly mention generics and inheriting from another generic class, but I tried out with the code below. > It compiled, ran and worked fine but since the docs do not explicit mention it as a posibility I am a little reluctant to go forward using this strategy if is not meant to work... Yes, that's supposed to work :) Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Beautifier for freepascal
I am happy owner of an old Version OREGON PASCAL Compiler (running under Unix 68...), who has also a splendid Beautifier included. With this excellent tool is it possible to get a very clear output of the printed .pas Programme Especially are the begin and end signs in such a manner arranged so that errors can be very easily found. Is there any plan to create such a very helpful tool??? By the way the price for a.m Compiler+ Beautifier was ca.5000.- DM in 1986! Kind regards G.W.Herbold ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Beautifier for freepascal
G.W. Herbold wrote: Is there any plan to create such a very helpful tool??? FPC comes with the "ptop" tool that can be used to format/beatify your code. The Lazarus IDE (http://www.lazarus-ide.org ) also comes with a built-in code formatter. Jonas PS: please mention in the mails you send that you are not subscribed, so people replying know that they have to CC you. While it happens automatically for the direct replies since you added a Reply-To header, that's not the case for replies further down the thread. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Building kernel modules using fpc (for fun)
Hello Paul, On 28/11/15 21:42, Paul Breneman wrote: > On 01/23/2011 08:15 AM, Lukasz Sokol wrote: >> Lukasz Sokolwrites: >> >> I decided to put the result of my fiddling back onto the wiki >> http://wiki.freepascal.org/linux/kernel/module_development as the pastebin >> seems to have disappeared mysteriously. >> >> Enjoy! >> >> Lukasz > > I couldn't find anything but the above wiki page which is almost 5 years old. > I might want to make an example for this wiki page: > http://wiki.freepascal.org/Small_Virtual_Machines > > Any suggestions or links? > Wow... it's been years since I did anything in this area. All I ever tried or knew, and the example module using printk, is only on that one page. Contributors are welcome... (I never had communicated anything with the original author, Mazen Neifer, if he's still around - which I think so - he could link / keyword you more, I suppose) > Regards, > Paul > www.ControlPascal.com Lukasz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC 3.0.0-rc1 release
Martin Schreiber wrote: In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by apt-get install fpc Then I extracted fpc_eabihf_3_0_1.tar.gz to /home/pi/fpc. cd to the svn fixes_3_0 checkout, " make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all " Thought a status report might be useful here. Using Raspbian 4.1 "Jessie" dated 2015-11-21 from https://www.raspberrypi.org/downloads/raspbian/ I find fpc_eabihf_3_0_1 from http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ installs and runs with no further prerequisites, and is able to build the standard 3.0.0 sources. There are some minor complaints that Subversion is missing, but that can be trivially fixed. The new Jessie "Lite" similarly runs 3.0.1 and builds 3.0.0, there are no missing prerequisites so it is not necessary to start off at 2.6.x. On "full fat" Jessie, Lazarus 1.4.4 compiles but requires libgtk2.0-dev as a prerequisite. The result doesn't run reliably but this is a Jessie issue which I believe is being addressed. Adding libqt4pas-dev and building Lazarus for Qt results in something that works fine. I have not tried building Lazarus on Jessie Lite, since I see it as mainly being useful for embedded systems based on the original Rpi or the new RPi Zero. I don't anticipate significant problems other than caused by limited memory (Lazarus requires at least 512Mb RAM+swap to build). Using standard RPi2 Debian (i.e. not Raspbian) from http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/ with the addition of a fairly standard collection of packages using tasksel followed by the build-essential, gdb and subversion packages runs 3.0.1 and builds 3.0.0 in essentially the same way as is described above. On standard RPi2 Debian, FPC 3.0.0 fails to build Lazarus 1.4.4 with errors like paswstring.pas(425,46) Error: Incompatible types: got "procedure(PChar;var UnicodeString;LongInt);StdCall>" expected "TUnicodeStringManager.procedure(PChar;Word;var UnicodeString;LongInt);StdCall>" paswstring.pas(439) Fatal: There were 4 errors compiling module, stopping Fatal: Compilation aborted Makefile:2276: recipe for target 'lazutils.ppu' failed I'm not intending to pursue this at the moment, since I've hacked a lot of stuff onto the top of the supplied "lean and mean" distro ("Adde parvum parvo magnus acervus erit") and my guess is that the Unicode stuff is inadequately configured probably impacting on FPC. I mention it here entirely as a "heads up" for anybody attempting a similar combination. In all of the above cases, /etc/fpc.cfg should contain a line -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal