home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,617 of 2,978   
   Femme Verbeek to Jim Leonard   
   Re: How to handle this OOP/inheritance p   
   07 Feb 08 02:02:07   
   
   b5eb532f   
   From: fv2006@nospam.tcenl.com   
      
   Jim Leonard schreef:   
   > On Feb 5, 3:01 pm, Femme Verbeek  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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca