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

2003-02-12 Thread Anton Tichawa
Hello! > 3 generate n programs & compile them, o/p any compile errors > 4 run tests (eg those in the cvs ??? or the ones in the program we are > Sounds as if 3 & 4 are the difficult bits... But I actually do step 3 on my PC, under linux. I tried the same before under a popular operating system,

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

2003-02-12 Thread Lee, John
il (timeout or ctrl/c or ???); Sounds as if 3 & 4 are the difficult bits... Regards John -Original Message- From: Anton Tichawa [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 04:18 To: [EMAIL PROTECTED] Subject: Re: [fpc-pascal]Classes/Objects/Pointers / Pointer Hel

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

2003-02-12 Thread Jonas Maebe
On woensdag, feb 12, 2003, at 04:17 Europe/Brussels, Anton Tichawa wrote: i long to be a member of the free pascal development team. comments are welcome. are there any rites involved, such as programming a 4d-visualization of the fourier transform or creating an aboriginal version of the VCL?

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

2003-02-11 Thread Anton Tichawa
Hello, John! > can also contribute eg a (non OO) FP test unit? if you like. Any ideas > about how to define the 'features' to be tested? Regards John *** procedure define; begin lock; // (?) brainstorm; .. *** well, my first contribution to a brainstorming of features to be tested is - *

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

2003-02-11 Thread Anton Tichawa
On Tuesday 11 February 2003 15:24, you wrote: > I suggest you check out the tests; it does all you describe. ok. > In no particular order: i long to be a member of the free pascal development team. comments are welcome. are there any rites involved, such as programming a 4d-visualization of t

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

2003-02-11 Thread Marco van de Voort
> On Tue, 11 Feb 2003, Jonas Maebe wrote: > > > > > On dinsdag, feb 11, 2003, at 15:39 Europe/Brussels, Anton Tichawa wrote: > > > > > What about a standard test application that uses every feature of Free > > > Pascal, > > > > Do you want to write that? :) > > > > > compares it's own results to s

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

2003-02-11 Thread Matt Emson
Before you go and write one, DUnit might fit that bill. I think it's on sourceforge, but will also be somewhere in the JEDI pages too. We just *need* a complete VCL drop in to use it 'as is', but it could be used as a basis for FPCUnit though, I guess. Or at least TPUnit. > What about a standard

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

2003-02-11 Thread Michael Van Canneyt
On Tue, 11 Feb 2003, Anton Tichawa wrote: > Hello! > > > If you keep it runnnable on windoze and go32v2, I'll help you to test it. I > > Well, the test program I think of needs to: > > 1. create pascal sources and configuration files & write them to disk > > 2. start the compiler and review it's

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

2003-02-11 Thread Anton Tichawa
Hello! > If you keep it runnnable on windoze and go32v2, I'll help you to test it. I Well, the test program I think of needs to: 1. create pascal sources and configuration files & write them to disk 2. start the compiler and review it's console output 3. start the created application 4. check

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

2003-02-11 Thread Lee, John
If you keep it runnnable on windoze and go32v2, I'll help you to test it. I can also contribute eg a (non OO) FP test unit? if you like. Any ideas about how to define the 'features' to be tested? Regards John -Original Message- Hello, List! > Do you want to write that? :) If nobody els

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

2003-02-11 Thread Jonas Maebe
On dinsdag, feb 11, 2003, at 14:06 Europe/Brussels, Michael Van Canneyt wrote: We have a test suite, with about 1000 test programs, which test every aspect of the compiler. Make that "most aspects" :) Jonas ___ fpc-pascal maillist - [EMAIL PROTE

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

2003-02-11 Thread Michael Van Canneyt
On Tue, 11 Feb 2003, Jonas Maebe wrote: > > On dinsdag, feb 11, 2003, at 15:39 Europe/Brussels, Anton Tichawa wrote: > > > What about a standard test application that uses every feature of Free > > Pascal, > > Do you want to write that? :) > > > compares it's own results to standard results and

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

2003-02-11 Thread Michael Van Canneyt
On Tue, 11 Feb 2003, Anton Tichawa wrote: > Hello, List! > > > Not really, but it's simply a possibility to introduce bugs into code > > that works correctly. The gain is not really worth it at this time imho. > > What about a standard test application that uses every feature of Free > Pascal, c

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

2003-02-11 Thread Anton Tichawa
Hello, List! > Do you want to write that? :) If nobody else does, I do. But I'd prefer doing it for linux only. Anton. -- "Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben." Doris Langley Moore: Ada, Countess of Lovelace (London 1977).

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

2003-02-11 Thread Jonas Maebe
On dinsdag, feb 11, 2003, at 15:39 Europe/Brussels, Anton Tichawa wrote: What about a standard test application that uses every feature of Free Pascal, Do you want to write that? :) compares it's own results to standard results and produces a list of newly introduced bugs? We already have

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

2003-02-11 Thread Anton Tichawa
Hello, List! > Not really, but it's simply a possibility to introduce bugs into code > that works correctly. The gain is not really worth it at this time imho. What about a standard test application that uses every feature of Free Pascal, compares it's own results to standard results and produce

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

2003-02-11 Thread Jonas Maebe
On dinsdag, feb 11, 2003, at 14:56 Europe/Brussels, Anton Tichawa wrote: It's possible to make range checks inline, but at a first glance it seems to me that this would require reworking of very old (legacy?) parts of the compiler. Not really, but it's simply a possibility to introduce bugs in

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

2003-02-11 Thread Anton Tichawa
Hello, List! > > Regarding Performance: range checks and especially the array > > access etc. could be inlined, saving an indirect call for every access. > > [Don't know the FPC implementation]. > > Accesses are inlined, range checks are not. It's possible to make range checks inline, but at a fi

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

2003-02-11 Thread Jonas Maebe
On maandag, feb 10, 2003, at 18:37 Europe/Brussels, Thomas Schatzl wrote: Regarding Performance: range checks and especially the array access etc. could be inlined, saving an indirect call for every access. [Don't know the FPC implementation]. Accesses are inlined, range checks are not. Jona

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

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 o

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]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 refe

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

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.

[fpc-pascal]Classes/Objects/Pointers

2003-02-09 Thread James Mills
Hi all, Sorry to bother you again, can't seem to see what I'm doing wrong it's the same as my dynamic code for strings... var nicks: PNick; nNicks: Integer; procedure initialiseDataNicks; procedure addNick(data: String); procedure updateNick(index: Integer; nick: pNick); function getNi