Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Borland > Re: How to hand...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 21 Topic 1085 of 1118
Post > Topic >>

Re: How to handle this OOP/inheritance problem?

by Femme Verbeek <fv2006@[EMAIL PROTECTED] > Feb 7, 2008 at 02:02 AM

Jim Leonard schreef:
> On Feb 5, 3:01 pm, Femme Verbeek <fv2...@[EMAIL PROTECTED]
> wrote:
>> If you can get your hands on a copy of Borland Pascal with objects
V7.01
>> I would strongly recommend this instead of TP7. Try to find a legal
>> copy, but for educational projects no one will care if you try to find
>> the BP.Zip installation file somewhere
> 
> I have owned BP7 on CDROM since the day it came out, but I must use
> TP7 because of my target platform, which is... let's just say, very
> small and slow :-)  See my reply to Jason for more details on the
> target platform, which is a driving factor in the design.

In my experience you'll run quite quickly into the limits of the TP IDE, 
whereas BP real mode still gioing strong. The executable will not differ 
in size.
I made a complete 3d cad-cam system in BP, which compiles to less than 
400kB. I can still compile and run in real mode BP, which is handy for 
using the built-in debugger, but not in TP7.

> 
>> E.g. A note and a tone have the parameter "duration" in common, but a
>> note has the added parameters heigth, volume, rampup and rampdown etc.
>> So it is logical that TNote is a descendant of TTone, which in itself
>> descends from Tobject. Both will have a play method that can be used,
>> but TTone will override the Play method of TNote.
> 
> I hadn't thought of breaking it down that granularly -- that's an
> interesting idea, I'll have to think about that.
> 
The advantage is of course that you can write clear code. Each object 
handles its own data, like saving and restoring.

>> Next is to define the Melody object, which can best be a descendant of
>> Tcollection. The collection can be filled with objects either being
note
>> or tone.
> 
> I had definitely not thought about that at all :-)  It's an
> interesting idea, but unfortunately memory and speed are at a premium
> on my target platform, and unless I'm terribly mistaken I don't think
> tcollection is the fastest thing I can use.
> 
Somehow the memory management of the OOP methods is very well optimised, 
at least I never noticed any difference. If you use a lot of data it is 
actually faster than conventional methods using arrays.

-- Femme
 




 21 Posts in Topic:
How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-04 17:18:17 
Re: How to handle this OOP/inheritance problem?
"Jason Burgon"   2008-02-05 19:17:21 
Re: How to handle this OOP/inheritance problem?
Femme Verbeek <fv2006@  2008-02-05 22:01:32 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-06 09:50:02 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-06 12:07:29 
Re: How to handle this OOP/inheritance problem?
Femme Verbeek <fv2006@  2008-02-07 02:02:07 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-06 21:04:50 
Re: How to handle this OOP/inheritance problem?
dik <quagga5@[EMAIL PR  2008-02-07 05:10:52 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-07 07:39:09 
Re: How to handle this OOP/inheritance problem?
dik <quagga5@[EMAIL PR  2008-02-07 11:01:54 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-08 08:49:39 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-09 19:45:14 
Re: How to handle this OOP/inheritance problem?
Marco van de Voort <ma  2008-02-10 11:31:10 
Re: How to handle this OOP/inheritance problem?
"Jason Burgon"   2008-02-10 11:56:57 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-10 10:42:20 
Re: How to handle this OOP/inheritance problem?
"Jason Burgon"   2008-02-11 01:54:58 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-10 21:31:25 
Re: How to handle this OOP/inheritance problem?
"Jason Burgon"   2008-02-11 12:04:54 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-11 09:06:30 
Re: How to handle this OOP/inheritance problem?
"Jason Burgon"   2008-02-11 20:37:17 
Re: How to handle this OOP/inheritance problem?
Jim Leonard <MobyGamer  2008-02-11 13:41:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:35:28 CDT 2008.