[fpc-pascal] TThreads - COOL!!!

2006-09-19 Thread Jason P Sage
Hey - pardon my gloating in complete utter satisfaction - but I AM now the happy owner of an Excellent working server cross "multiplexer and multi-threading" by using TThreads. It finally clicked on WHY my TThreads were appearing to run SERIAL (Async right? Nomenclature...). Someone responded how

Re: [fpc-pascal] variant part of a record

2006-09-19 Thread Vinzent Höfler
Пётр Косаревский wrote: Yes, you do. :) Nevertheless some_type = record case Something : byte of 1: (x,y: word); 2: (z: longword); end; Thank you, Jonas and Vincent, but I was vague: what I want is blockread'ing, so I have to use record Something: byte; case byte

Re: [fpc-pascal] macros with parameters

2006-09-19 Thread Marc Santhoff
Hi again, I've forgotten to give a pointer: {$define BYTE_ORDER(oc):=((oc)=OCODE_GNOP1 or (oc)=OCODE_GESD)} <---> Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] macros with parameters

2006-09-19 Thread Marc Santhoff
Am Mittwoch, den 20.09.2006, 00:55 +0200 schrieb Michalis Kamburelis: > Marc Santhoff wrote: > > Hi, > > > > the docs only show examples of macros without any parameters. Is it > > possible to use them? > > > > Can I make this work anyhow: > > > > {$MACRO ON} > > {$define HOFFSET(rec,field) := p

[fpc-pascal] macros with more than one parameter

2006-09-19 Thread Marc Santhoff
Hi, how is the correct syntax for macros having more than one parameter? {$define HOFFSET(rec,field):=(pointer(@(rec).(field)) - pointer(@(rec)))} This does not work, even if there is a semicolon between the two parameter names. Trying to use it like this: i := HOFFSET(s1, a); { Line 42 }

Re: [fpc-pascal] macros with parameters

2006-09-19 Thread Michalis Kamburelis
Marc Santhoff wrote: > Hi, > > the docs only show examples of macros without any parameters. Is it > possible to use them? > > Can I make this work anyhow: > > {$MACRO ON} > {$define HOFFSET(rec,field) := pointer(@rec.field) - pointer(@rec)} > > type > s1_t = record > a: lon

[fpc-pascal] macros with parameters

2006-09-19 Thread Marc Santhoff
Hi, the docs only show examples of macros without any parameters. Is it possible to use them? Can I make this work anyhow: {$MACRO ON} {$define HOFFSET(rec,field) := pointer(@rec.field) - pointer(@rec)} type s1_t = record a: longint; b: single;

Re[2]: [fpc-pascal] variant part of a record

2006-09-19 Thread Пётр Косаревский
> Yes, you do. :) > Nevertheless >some_type = record > case Something : byte of > 1: (x,y: word); > 2: (z: longword); >end; Thank you, Jonas and Vincent, but I was vague: what I want is blockread'ing, so I have to use record Something: byte; case byte of 1: (x

Re: [fpc-pascal] is www.freepascal.org out?

2006-09-19 Thread Tomas Hajny
On 19 Sep 06, at 16:09, Fabrício F. Kammer wrote: > Hi all, is the domain www.freepascal.org out? DNS server problem. :-( You can get there by directly going to 62.166.198.202. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://li

Re: [fpc-pascal] is www.freepascal.org out?

2006-09-19 Thread Ketil Thorsen
At 21:09 19.09.2006, you wrote: Hi all, is the domain www.freepascal.org out? I got in there now. -- mvh / with kind regards Ketil Thorsen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc

[fpc-pascal] is www.freepascal.org out?

2006-09-19 Thread Fabrício F. Kammer
Hi all, is the domain www.freepascal.org out? []s Fabrício ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] variant part of a record

2006-09-19 Thread Vinzent Hoefler
On Tuesday 19 September 2006 15:21, Пётр Косаревский wrote: > Do I get it right, that a construction like > record > Something: byte; > case Something of > 1: (x,y: word); > 2: (z: longword); > end; > Is impossible in FPC? Yes, you do. :) Nevertheless some_type =

Re: [fpc-pascal] variant part of a record

2006-09-19 Thread Jonas Maebe
On 19 sep 2006, at 17:21, Пётр Косаревский wrote: Do I get it right, that a construction like record Something: byte; case Something of 1: (x,y: word); 2: (z: longword); end; Is impossible in FPC? You have to write record case Something: byte of 1:

[fpc-pascal] variant part of a record

2006-09-19 Thread Пётр Косаревский
Do I get it right, that a construction like record Something: byte; case Something of 1: (x,y: word); 2: (z: longword); end; Is impossible in FPC? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

Re: [fpc-pascal] Linux Questions

2006-09-19 Thread Rainer Stratmann
Am Dienstag, 19. September 2006 16:14 schrieb Marc Santhoff: > [...] > > h2pas -E > > > > does translate enum's to constants. > > No, in fact it is > > h2pas -e > > but it works. > > Sorry for confusion, > Marc I will try to mount a device with a direct systemcall. In my view it is the best way

Re: [fpc-pascal] Linux Questions

2006-09-19 Thread Marc Santhoff
Am Dienstag, den 19.09.2006, 16:10 +0200 schrieb Marc Santhoff: > Am Dienstag, den 19.09.2006, 15:11 +0200 schrieb Jonas Maebe: > > enum > > { > >MS_RDONLY = 1,/* Mount read-only. */ > > #define MS_RDONLY MS_RDONLY > >MS_NOSUID = 2,/* Ignore suid and s

Re: [fpc-pascal] Linux Questions

2006-09-19 Thread Marc Santhoff
Am Dienstag, den 19.09.2006, 15:11 +0200 schrieb Jonas Maebe: > enum > { >MS_RDONLY = 1,/* Mount read-only. */ > #define MS_RDONLY MS_RDONLY >MS_NOSUID = 2,/* Ignore suid and sgid bits. */ > #define MS_NOSUID MS_NOSUID > etc. > > So that become

Re: [fpc-pascal] gas Assembler

2006-09-19 Thread Jonas Maebe
On 19 sep 2006, at 15:22, Wolfe, Robert wrote: Jonas Maebe wrote: And is it looking for "gas" or "as"? It should look for "gas" only under Solaris, not under Linux. 'gas' I am running Debian on a Sun Ultra 5. Should be fixed. Jonas ___ fpc-pa

Re: [fpc-pascal] gas Assembler

2006-09-19 Thread Dominique Leducq
Wolfe, Robert a écrit : Yes. Robert Wolfe ([EMAIL PROTECTED] / [EMAIL PROTECTED]) Computer Programmer/Analyst & Web Programmer SRDAR, Roswell Park Cancer Institute, Buffalo, New York 716-845-5788 | http://www.srdar.org -Original Message- From: [EMAIL PROTECTED] [mailto:fpc-pascal- [

RE: [fpc-pascal] gas Assembler

2006-09-19 Thread Wolfe, Robert
'gas' I am running Debian on a Sun Ultra 5. Robert Wolfe ([EMAIL PROTECTED] / [EMAIL PROTECTED]) Computer Programmer/Analyst & Web Programmer SRDAR, Roswell Park Cancer Institute, Buffalo, New York 716-845-5788 | http://www.srdar.org > -Original Message- > From: [EMAIL PROTECTED] [mai

Re: [fpc-pascal] gas Assembler

2006-09-19 Thread Jonas Maebe
On 19 sep 2006, at 15:16, Wolfe, Robert wrote: Jonas Maebe wrote: Have you installed the binutils package? (or whatever it's called under Debian) Yes. And is it looking for "gas" or "as"? It should look for "gas" only under Solaris, not under Linux. Jonas

RE: [fpc-pascal] gas Assembler

2006-09-19 Thread Wolfe, Robert
Yes. Robert Wolfe ([EMAIL PROTECTED] / [EMAIL PROTECTED]) Computer Programmer/Analyst & Web Programmer SRDAR, Roswell Park Cancer Institute, Buffalo, New York 716-845-5788 | http://www.srdar.org > -Original Message- > From: [EMAIL PROTECTED] [mailto:fpc-pascal- > [EMAIL PROTECTED] On B

Re: [fpc-pascal] gas Assembler

2006-09-19 Thread Jonas Maebe
On 18 sep 2006, at 16:07, Wolfe, Robert wrote: Hi all! Trying to build the latest FPC 2.1.x source tree for the Sparc Linux platform. However, I ma getting a message saying that the gas assembler cannot be found. I am using Debian 3.1 with all the latest updates and fixes applied. Any sug

Re: [fpc-pascal] Linux Questions

2006-09-19 Thread Jonas Maebe
On 19 sep 2006, at 15:11, Rainer Stratmann wrote: Second question is how to mount and umount for example "/dev/sda1" in a fpc program. Generic solution to this sort of problem: a) look up how it has to be done in C b) if it's a "standard" C function, just translate the prototype to Pascal

RE: [fpc-pascal] Linux Questions

2006-09-19 Thread Wolfe, Robert
> -Original Message- > From: [EMAIL PROTECTED] [mailto:fpc-pascal- > [EMAIL PROTECTED] On Behalf Of Rainer Stratmann > Sent: Tuesday, September 19, 2006 9:12 AM > To: FPC-Pascal users discussions > Subject: [fpc-pascal] Linux Questions > does someone know how to lock the console output in

[fpc-pascal] Linux Questions

2006-09-19 Thread Rainer Stratmann
Hello, does someone know how to lock the console output in Linux? Here is a program that uses Framebuffer (Linux Runlevel 2). It works, but it would be good to lock the console bevor writing to the framebuffer and then to unlock the console at the end of the program. I googled, but can not find a

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Leonardo M. Ram
That's true, because of that i don't use interfaces in FPC, instead i use virtual abstract classes. --- Inoussa OUEDRAOGO <[EMAIL PROTECTED]> wrote: > hi > I reported a bug for interface reference counting at > http://www.freepascal.org/mantis/view.php?id=7281 > > Bellow is the test program. >

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Inoussa OUEDRAOGO
hi I reported a bug for interface reference counting at http://www.freepascal.org/mantis/view.php?id=7281 Bellow is the test program. Regards, Inoussa. program test_intf; {$mode objfpc}{$H+} uses SysUtils; type ITest = interface procedure DoIt(AMsg : string); end;

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Graeme Geldenhuys
Yes I'm using fpc 2.1.1 with 40 bytes reported. Thanks for the update Vincent! PS: I'm grad to report that with my new found knowledge, fpGUI and fpGFX is now memory leak free! :-) Regards, - Graeme - ___ fpc-pascal maillist - fpc-pascal@lists.fre

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Vincent Snijders
Jonas Maebe schreef: On 19 sep 2006, at 09:33, Graeme Geldenhuys wrote: So what is wrong with this code then... When I quit the app, it says I have one memory leak. What am I not freeing? If you compile the rtl with line info, you'll see the non-freed object is in the RTL: Call trace for

Re: [fpc-pascal] Finding the cursor in the IDE

2006-09-19 Thread Пётр Косаревский
Yes, it is a problem. > I often have problems finding the cursor in the IDE. I stopped using IDE after acquiring LCD monitor because of this "feature". It does not use lines longer than 132 symbols even when started in console mode with such dimensions (WinXP-sp2, FPC 2.0.4rc2, I like using 160

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Graeme Geldenhuys
Hi Michael, Try putting everyting in a procedure 'Test' and run that. I did that and still see the unfreed memory error. I think Jonas might be onto something. I used the tiBaseObject unit from tiOPF. It has memory leak detection (derived from the IndySOAP project), but only if your classes

[fpc-pascal] gas Assembler

2006-09-19 Thread Wolfe, Robert
Hi all!  Trying to build the latest FPC 2.1.x source tree for the Sparc Linux platform.  However, I ma getting a message saying that the gas assembler cannot be found.  I am using Debian 3.1 with all the latest updates and fixes applied.  Any suggestions? Robert Wolfe ([EMAIL PROTECTED] /

[fpc-pascal] Finding the cursor in the IDE

2006-09-19 Thread Arjan van Dijk
Hi, I often have problems finding the cursor in the IDE. In insert-mode it is just a slowly blinking underscore in the same colour as the rest. Can I modify the appearance of the cursor? Thanks, Arjan DISCLAIMER: htt

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Jonas Maebe
On 19 sep 2006, at 09:33, Graeme Geldenhuys wrote: So what is wrong with this code then... When I quit the app, it says I have one memory leak. What am I not freeing? If you compile the rtl with line info, you'll see the non-freed object is in the RTL: Call trace for block $00187260 size

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Michael Van Canneyt
On Tue, 19 Sep 2006, Graeme Geldenhuys wrote: So what is wrong with this code then... When I quit the app, it says I have one memory leak. What am I not freeing? Try putting everyting in a procedure 'Test' and run that. Global variables (even temporary ones) may not yet have been deallocat

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Graeme Geldenhuys
So what is wrong with this code then... When I quit the app, it says I have one memory leak. What am I not freeing? - program memleak; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Classes, SysUtils; type

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Graeme Geldenhuys
On 19/09/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: Just add -gh to the compiler command-line. Run your project from a console, so you can see standard output. When the program is finished, it will give you a detailed list of memory leaks. Oops, so all the lines scrolling off the scr

Re: [fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Michael Van Canneyt
On Tue, 19 Sep 2006, Graeme Geldenhuys wrote: Hi, How do you do memory leak detection using FPC? I know about the -gh parameter, but don't know how to use it, or with what other tools. I develop under Linux on x86. Just add -gh to the compiler command-line. Run your project from a consol

[fpc-pascal] memory leak detection using FPC

2006-09-19 Thread Graeme Geldenhuys
Hi, How do you do memory leak detection using FPC? I know about the -gh parameter, but don't know how to use it, or with what other tools. I develop under Linux on x86. Regards, - Graeme - -- There's no place like 127.0.0.1 ___ fpc-pascal maillist