Re: [fpc-pascal]Extension of macros exceeds a depth of 16
04-07-28 21.42, skrev Alan Mead följande: > As a I mentined earlier today in a different thread, I have upgraded > to 1.9.4 and I appreciate the greater checking. > > Most of the new warnings I get are clear but one of my units now > reports "Extension of macros exceeds a depth of 16". What does this ^^ Actually I think the warning message is wrong.. It should imo be "Expanding". I'll fix this. > warning mean and what is the rammification of ignoring it? > > The line number where it reports the warning is an {$if def ...} and > I would assume the warning had something to do with nesting compiler > conditionals... but that's not the case (unless the parser is really > getting lost... but since the code operates, I cannot imagne that > this is happening..). This conditional should be at the "top > level"--it is not nested under anything. It the recursive macro substitution which exceeds a depth of 16. This is probably due to a circular definition of a macro, e g {$DEFINE X = X} So that X is replaced by X, which is replaced by X etc. This is probably not what you want. After 16 replacements the recursion is stoped, thats what it is warned about. Olle ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Programs don't come back
On Tue, 3 Aug 2004 09:35:14 +0200 Jonas Maebe <[EMAIL PROTECTED]> wrote: > > On 3 aug 2004, at 06:34, John Coppens wrote: > > > I more or less gave up on using graph - it's a bit of a headache to > > have > > the video switch modes, particularly while debugging. I don't know if > > there is a more elegant solution, apart from trying to open a new > > window > > with a gnome-canvas in it or so. > > The best solution would be an SDL-based graph unit, I think. Nobody's > working on that though, afaik. > > > Jonas Hi Jonas. I did a 'client-server' type of thing. On the Pascal-side it looks like a Graph-compatible library. But instead of switching modes, it starts a new window, with a gnome-canvas in it. The 'graph' lib then sends its graphic commands through a pipe to the new window. It is far from usable (many things are missing) but the idea has several pluses (in my opinion): 1) The 'remote graph' can be called from other programs as the interface is just the pipe. I could even be called from bash... (never tried) 2) The gnome canvas has nice anti-aliased graphics, and the resulting plots _do_ look very nice. As I said, it is far from complete (eg. no fonts yet) and not very stable either. One thing I haven't found yet is a way to save the gnome-canvas to a graphics file (I just made screen shots). With the experience I had later with gnome-print library, I could image that this could also be combined somehow. Is there interest in this? John -- ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Extension of macros exceeds a depth of 16
Ah. Or "Recursion of macros exceeds..." I'll check my code. -Alan --- Olle Raab <[EMAIL PROTECTED]> wrote: > 04-07-28 21.42, skrev Alan Mead följande: > > > As a I mentined earlier today in a different thread, I have > upgraded > > to 1.9.4 and I appreciate the greater checking. > > > > Most of the new warnings I get are clear but one of my units now > > reports "Extension of macros exceeds a depth of 16". What does > this >^^ > Actually I think the warning message is wrong.. > > It should imo be "Expanding". I'll fix this. > > > warning mean and what is the rammification of ignoring it? > > > > The line number where it reports the warning is an {$if def ...} > and > > I would assume the warning had something to do with nesting > compiler > > conditionals... but that's not the case (unless the parser is > really > > getting lost... but since the code operates, I cannot imagne that > > this is happening..). This conditional should be at the "top > > level"--it is not nested under anything. > > It the recursive macro substitution which exceeds a depth of 16. > > This is probably due to a circular definition of a macro, e g > > {$DEFINE X = X} > > So that X is replaced by X, which is replaced by X etc. This is > probably not > what you want. > > After 16 replacements the recursion is stoped, thats what it is > warned > about. > > Olle > > > ___ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]Delphi/FPC cross-compile
My Delphi experience is limited to going through "Delphi for Dummies" a few years back, I was once a proficient Turbo Pascal 5 programmer. I've been using FPC.. one of the things I really like about it is being able to compile the same code on Windows and Linux. I've been given a copy of Delphi (8, altough I may exchange it for 7) and been asked to create a class that implements some non-visual functionality (it will perform searches on textual data, like Google.com). I'm dreading giving up Linux compatibility. Is it possible that I could create the required class in such a way that it can be compiled by both Delphi 7/8 and also by FPC? If it's possible, is it *reasonable* that I do this as a Delphi novice? Got any tips on things to avoid? I'm not even sure how I will do it without a command line Any recommendations on a good book for my context? Using FPC and the FPC docs, I tried making a class over the weekend and I did something majorly wrong... I don't grok the difference between an object field and a class property. Thanks! -Alan ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Delphi/FPC cross-compile
On Wed, 4 Aug 2004, Alan Mead wrote: > My Delphi experience is limited to going through "Delphi for Dummies" > a few years back, I was once a proficient Turbo Pascal 5 programmer. > I've been using FPC.. one of the things I really like about it is > being able to compile the same code on Windows and Linux. > > I've been given a copy of Delphi (8, altough I may exchange it for 7) > and been asked to create a class that implements some non-visual > functionality (it will perform searches on textual data, like > Google.com). > > I'm dreading giving up Linux compatibility. Is it possible that I > could create the required class in such a way that it can be compiled > by both Delphi 7/8 and also by FPC? If it's possible, is it > *reasonable* that I do this as a Delphi novice? Got any tips on > things to avoid? I'm not even sure how I will do it without a > command line It should be perfectly possible. > > Any recommendations on a good book for my context? I haven't met a good book on Object pascal yet. Most books are focused on Delphi's RAD aspect, and in particular, the GUI aspect. A major shortcoming IMHO, but who am I... > Using FPC and the > FPC docs, I tried making a class over the weekend and I did something > majorly wrong... I don't grok the difference between an object field > and a class property. Let's say that an object field can always be considered a class property, but not the opposite. If the docs are not clear on this point, feel free to send me remarks. Also, if you need assistance in writing cross-platform code, feel free to contact me in private. If I can help, I will. Michael. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]Running 32bit on 64bit suse
I tried running the 32bit fpc on my opteron suse 9.1 64bit, which should be possible, but I get linking problems: Free Pascal Compiler version 1.9.4 [2004/05/30] for i386 Copyright (c) 1993-2004 by Florian Klaempfl Target OS: Linux for i386 Compiling hello.pas Linking hello /usr/bin/ld: skipping incompatible /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o when searching for /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o /usr/bin/ld: cannot find /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o hello.pas(4,1) Error: Error while linking Closing script ppas.sh I get the same error whether I run it 'normally' or do: linux32 fpc hello.pas I also tried 1.0.10 in the same way and got; Free Pascal Compiler version 1.0.10 [2003/06/26] for i386 Copyright (c) 1993-2003 by Florian Klaempfl Target OS: Linux for i386 Compiling hello.pas Assembling hello hello.s: Assembler messages: hello.s:14: Error: suffix or operands invalid for `push' hello.s:20: Error: `-4(%ebp)' is not a valid 64 bit base/index expression hello.s:21: Error: suffix or operands invalid for `push' hello.s:22: Error: `-4(%ebp)' is not a valid 64 bit base/index expression hello.s:23: Error: suffix or operands invalid for `push' hello.s:25: Error: `-4(%ebp)' is not a valid 64 bit base/index expression hello.s:27: Error: suffix or operands invalid for `push' hello.pas(4,4) Error: Error while assembling exitcode 1 hello.pas(4,4) Fatal: There were 2 errors compiling module, stopping I'd be grateful if anyone can tell me a way out of this, other than going back completely to i386 linux. I tried the suse amd64 list but got no answer. Thanks, - Richard. -- Richard Kimber http://www.psr.keele.ac.uk/ ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Running 32bit on 64bit suse
> I tried running the 32bit fpc on my opteron suse 9.1 64bit, which should > be possible, but I get linking problems: > > Free Pascal Compiler version 1.9.4 [2004/05/30] for i386 > Copyright (c) 1993-2004 by Florian Klaempfl > Target OS: Linux for i386 > Compiling hello.pas > Linking hello > /usr/bin/ld: skipping incompatible > /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o when searching for > /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o > /usr/bin/ld: cannot find > /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o hello.pas(4,1) Error: > Error while linking Closing script ppas.sh > > I get the same error whether I run it 'normally' or do: > linux32 fpc hello.pas > > I also tried 1.0.10 in the same way and got; Use fpc -FD/path/to/32bitbinutils ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Delphi/FPC cross-compile
Delphi 7 comes in the box with Delphi 8 so you won't have to exchange it. That was Borland's way of saying sorry for not having Win32 support in Delphi 8. You should be able to make a class that compiles in all three (D7, D8, FPC). Just stick to the basics and it should all be fine. Sly > I've been given a copy of Delphi (8, altough I may exchange it for 7) > and been asked to create a class that implements some non-visual > functionality (it will perform searches on textual data, like > Google.com). > > I'm dreading giving up Linux compatibility. Is it possible that I > could create the required class in such a way that it can be compiled > by both Delphi 7/8 and also by FPC? If it's possible, is it > *reasonable* that I do this as a Delphi novice? Got any tips on > things to avoid? I'm not even sure how I will do it without a > command line > > Any recommendations on a good book for my context? Using FPC and the > FPC docs, I tried making a class over the weekend and I did something > majorly wrong... I don't grok the difference between an object field > and a class property. > > Thanks! > > -Alan ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Delphi/FPC cross-compile
> Any recommendations on a good book for my context? I was a seasoned Java and C++ programmer when I was giving the task of implementing a very complex algorithm with Delphi. I left the Windows world years ago so I always had in mind developing on Delphi but keeping most of the code as FPC compatible as possible. Aside from the UI aspects of the program, the rest of the code works fine both on Delphi and FPC, so I'm happy and my "contractors" (my graduate thesis directors) are happy too. Along the way I used the following books: * Mastering Delphi 6 (non-free) * Essential Pascal (free) www.marcocantu.com * Essential Delphi (free) www.marcocantu.com * ObjectPascal 5 Language Guide (free) www.borland.com (it's somewhere in the site) ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal