[fpc-pascal] same routine with different parameters?

Sven Barth pascaldragon at googlemail.com
Wed Oct 30 10:23:43 CET 2013

Am 29.10.2013 20:40, schrieb waldo kitty:
> FWIW: i decided to try this because i was unable to (hope i'm using 
> the proper terms here) derive a new object from the existing one and 
> override this one inherited routine with my modifications... this 
> would allow me to add my own variables to the object in addition to 
> what it comes with and allow me to have this routine as i need it... 
> but that didn't work for some reason and i've already ripped out all 
> that attempt and gone this route with my modified routine and direct 
> addition of the variable... i just want to be able to provide 
> something back with as little intrusion to the original as possible...
Overriding the behavior of an inherited function will only work if that 
function is a) at least "protected" (or you are in the same unit) and b) 
this function is declared as "virtual" (see also: 
http://www.freepascal.org/docs-html/ref/refsu29.html#x75-850006.3.3 )


More information about the fpc-pascal mailing list