Re: [fpc-pascal]FPC Problem with reAllocMem...

2003-02-10 Thread James Mills
Another interesting thing to note as well which I think is rather strange... if you change in datanicks.pas lien 65, reAllocMem(nicks, sizeOf(TNick) * nNicks); to getMem(nicks, sizeOf(TNick) * nNicks); It will crash the same way as before, but at the 5th call of addNick cheers James ___

[fpc-pascal]FPC Problem with reAllocMem...

2003-02-10 Thread James Mills
Hi all, I've annoyed you guys enough with pointers, objects and clases :P I'm sorry :) This bugs me though as to why this program crashes at the 4th call to addNick(nick: String); Here is the gdb results, and attached is the source code if anyone is willing to have a look. thank you very much :

Re: [fpc-pascal]MySQL code...

2003-02-10 Thread Gene Buckle
Thanks - I've got that installed already. g. On Tue, 11 Feb 2003, Anton Tichawa wrote: > On Monday 10 February 2003 19:47, you wrote: > > Can someone point me to some example code that shows access to MySQL via > > http://www.freepascal.org/contrib/db.php3?category=Database > > -- > > -

Re: [fpc-pascal]MySQL code...

2003-02-10 Thread Anton Tichawa
On Monday 10 February 2003 19:47, you wrote: > Can someone point me to some example code that shows access to MySQL via http://www.freepascal.org/contrib/db.php3?category=Database -- -- "Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben."

Re: [fpc-pascal]Macros in FPC

2003-02-10 Thread Anton Tichawa
Hello! > Hi, > > I was wondering if I could do something like this with a macro in FPC: > > const HASH_TABLE_MASK = $ff; > function GetHashIndex ( hash :dword) :integer; > begin >result := hash AND HASH_TABLE_MASK; > end; > > it's kind of a helper funcion so I don't want to perform the functio

Re: [fpc-pascal]Understanding the compiler sources

2003-02-10 Thread Anton Tichawa
Hello! > Hi, > I want to understand how a compiler works. So I thought I could search a > little open source Compiler (FreePascal is very big and I think I had a > better overview with a smaller one). > So I decided to understand FreePascal. I found „Free Pascal 1.0.x > Internal documentation vers

Re: [fpc-pascal] there's need for static uninitialized objects

2003-02-10 Thread Anton Tichawa
Hello, List! The postings converning Classes/Objects/Pointers / Pointer Help I've read miss one point: There's need for uninitialized, static objects that are usable without calling a constructor. We use static objects to build dynamic ones; but dynamic objects cannot be used to build static o

Re: [fpc-pascal]MySQL code...

2003-02-10 Thread Gene Buckle
On Mon, 10 Feb 2003, Preben Mikael Bohn wrote: > Hi Gene, have a look at http://www.freepascal.org/packages/mysql.html > > It should be included in your FPC, I think... > > Best regards Preben > That's a great example of reading, now I need a snippet that shows a write operation. Ideas? tnx.

Re: [fpc-pascal]MySQL code...

2003-02-10 Thread Preben Mikael Bohn
Hi Gene, have a look at http://www.freepascal.org/packages/mysql.html It should be included in your FPC, I think... Best regards Preben Gene Buckle mumbled something about: > Can someone point me to some example code that shows access to MySQL via > FPC? > > tnx. > > g. > > > >

[fpc-pascal]OpenBSD snapshot uploaded.

2003-02-10 Thread Marco van de Voort
Pierre and me managed to fix a lot of bugs in the *BSD platforms. As a result, even though still a bit raw, the OpenBSD port starts to get usable. A snapshot was uploaded to the FTP site ( ftp://ftp.freepascal.org/pub/fpc/snapshot/v10/openbsd/snapshot-openbsd-1.0.7.tar.bz2 The file is 16 MB (5

[fpc-pascal]Understanding the compiler sources

2003-02-10 Thread Holger Peters
Hi, I want to understand how a compiler works. So I thought I could search a little open source Compiler (FreePascal is very big and I think I had a better overview with a smaller one). So I decided to understand FreePascal. I found „Free Pascal 1.0.x Internal documentation version 1.0“ on freepasc

[fpc-pascal]MySQL code...

2003-02-10 Thread Gene Buckle
Can someone point me to some example code that shows access to MySQL via FPC? tnx. g. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal]Macros in FPC

2003-02-10 Thread Iván Montes
Hi, I was wondering if I could do something like this with a macro in FPC: const HASH_TABLE_MASK = $ff; function GetHashIndex ( hash :dword) :integer; begin result := hash AND HASH_TABLE_MASK; end; it's kind of a helper funcion so I don't want to perform the function call in the code. Would t

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Thomas Schatzl
From: "Matt Emson" <[EMAIL PROTECTED]> Sent: Monday, February 10, 2003 3:41 PM Subject: RE: [fpc-pascal]Classes/Objects/Pointers / Pointer Help > RE: Dynamic arrays, What about using the Tcollection? Is there any > dis-advantage? I know a lot of TP Programmers swear by them. No, if you mean the

RE: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Matt Emson
RE: Dynamic arrays, What about using the Tcollection? Is there any dis-advantage? I know a lot of TP Programmers swear by them. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Thomas Schatzl
From: "James Mills" <[EMAIL PROTECTED]> Sent: Monday, February 10, 2003 2:04 PM Subject: Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help Hi, > Yes ok, fair enough, this much is in my knowledge of Pascal :) hehe, but > the real question is, how do you create these objects on the fly in a >

RE: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Matt D. Emson
> Basically, the > first step towards objects is ENCAPSULATION, which is PURE > SYTNAX, i. e. there are no constructors / destructors required. An Object is an Instance of a Class. A class needs to be constructed. Even C++ stack based instances have a constructor. What you want is for the cons

Re: [fpc-pascal]graph unit and the mouse

2003-02-10 Thread Klaus Hartnegg
> highest resolution possible for any machine. However, the mouse unit > offers only "character" granularity resolution which won't work in a > hi-res graphics environment...I need the mouse resolution to be at the > pixel level, as it is in any modern GUI. Did you init the mouse driver before or

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Matt D. Emson
-Original Message- From: Matt Emson [mailto:[EMAIL PROTECTED]] Sent: 10 February 2003 13:29 To: '[EMAIL PROTECTED]' Subject: RE: [fpc-pascal]Classes/Objects/Pointers / Pointer Help This is where Classes are better than objects... This will only work if you don't reference any thing th

RE: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Matt Emson
This is where Classes are better than objects... This will only work if you don't reference any thing that is instantiated by the constructor, i.e. all Methods and fields. > *** > type TmyObject = object > procedure test; > end; type TMyClass = class class procedure test; end; > proce

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Anton Tichawa
Hello, James! > Yes ok, fair enough, this much is in my knowledge of Pascal :) hehe, but > the real question is, how do you create these objects on the fly in a > program, ie: dynamic array... The object TmyObject from our previous example uses no space at all. If your object contains fields, yo

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread James Mills
On Mon, Feb 10, 2003 at 01:10:41PM -, Matt D. Emson wrote: > James, > > One important question... If you are using Delphi source (as you implied > in the pointers thread), why use Turbo Pascal style objects in your > conversion? If you used classes, it would be much easier on yourself. No > po

RE: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Matt D. Emson
James, One important question... If you are using Delphi source (as you implied in the pointers thread), why use Turbo Pascal style objects in your conversion? If you used classes, it would be much easier on yourself. No pointer notation needed etc, could use the Tinifile class (I assume this is i

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread James Mills
On Mon, Feb 10, 2003 at 03:55:45PM +0100, Anton Tichawa wrote: > Hello, James! > > Personally, I would prefer an even simpler way - but that depends on the > future development and backwards compatibility of Free Pascal. Basically, the > first step towards objects is ENCAPSULATION, which is PURE

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Anton Tichawa
Hello, James! Personally, I would prefer an even simpler way - but that depends on the future development and backwards compatibility of Free Pascal. Basically, the first step towards objects is ENCAPSULATION, which is PURE SYTNAX, i. e. there are no constructors / destructors required. Your ex

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread James Mills
On Mon, Feb 10, 2003 at 01:24:05PM +0100, Anton Tichawa wrote: > Hello! > > If TNick is a class - I don't have the declarations - it must be initialized > with > > nicks := new(TNick, init(nick, hops, signon, ident, host, server, unused, > name)); > > That's correct because TNick is alre

[fpc-pascal]Re: Amiga snapshot uploaded.

2003-02-10 Thread Balogh, Karoly (Charlie/iNQ)
Hi, On 2003-02-10, Sasu Purola wrote: > I will try it tonight, but please include rtl sources to that baseami.lha > next time. It would help me kill bugs if there is any :) What about using the CVS sources instead? :) Amiga has a really cool CVS client port! :) Bye, -- Charlie/iNQ .:%[ Cyberne

Re: [fpc-pascal]graph unit and the mouse

2003-02-10 Thread Michael . VanCanneyt
On Sun, 9 Feb 2003, Mark Emerson wrote: > Florian Klaempfl wrote: > > > > Mark Emerson wrote: > > > Does anybody know a way to read the mouse at pixel resolution while > > > using the graph unit? > > > > > > > You mean for go32v2? It depends on your mouse driver I think. > > > Please excuse my i

RE: [fpc-pascal]Amiga snapshot uploaded.

2003-02-10 Thread Sasu Purola
I will try it tonight, but please include rtl sources to that baseami.lha next time. It would help me kill bugs if there is any :) -Original Message- From: Carl Eric Codere [mailto:[EMAIL PROTECTED]] Sent: Monday, February 10, 2003 12:30 PM To: [EMAIL PROTECTED] Subject: [fpc-pascal]Ami

[fpc-pascal]Amiga snapshot uploaded.

2003-02-10 Thread Carl Eric Codere
>> Greetings, >> I've uploaded a new snapshot for the amiga,which is >> available at this url: >> >> ftp://ftp.freepascal.org/pub/fpc/snapshot/v10/amiga/m68k/baseami.lha > >Thanks for that, I`ll check and try it out. > >Regards Greetings, Please let me know if you have any probl

Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Help

2003-02-10 Thread Anton Tichawa
Hello! If TNick is a class - I don't have the declarations - it must be initialized with nicks := new(TNick, init(nick, hops, signon, ident, host, server, unused, name)); That's correct because TNick is already a pointer, not an object, and init is required to call TNick's constructor.

Re: [fpc-pascal]Pointer Help

2003-02-10 Thread Jonas Maebe
On zondag, feb 9, 2003, at 15:06 Europe/Brussels, Anton Tichawa wrote: That's exactly what I meant: I'm not sure if fpc is able to keep track of the destruction of the strings in case of AnsiString. It is, as long as the type of the variable is clear when getmem/freemem is called (getmem also